예제 #1
0
def successful_invocations(root_wf_id, wf_id, job_id):
    '''
    Get list of successful invocations for a given job.
    '''
    dashboard = Dashboard(root_wf_id, wf_id)
    successful_invocations_list = dashboard.get_successful_job_invocation(
        wf_id, job_id)

    for item in successful_invocations_list:
        item.remote_duration_formatted = filters.time_to_str(
            item.remote_duration)

    # is_xhr = True if it is AJAX request.
    if request.is_xhr:
        if len(successful_invocations_list) > 0:
            return render_template(
                'workflow/job/invocations_successful.xhr.html',
                root_wf_id=root_wf_id,
                wf_id=wf_id,
                job_id=job_id,
                invocations=successful_invocations_list)
        else:
            return '', 204
    else:
        return render_template('workflow/job/invocations_successful.html',
                               root_wf_id=root_wf_id,
                               wf_id=wf_id,
                               job_id=job_id,
                               invocations=successful_invocations_list)
예제 #2
0
def workflow_summary_stats(root_wf_id, wf_id):
    dashboard = Dashboard(root_wf_id, wf_id)
    summary_times = dashboard.workflow_summary_stats(wf_id)

    for key, value in summary_times.items():
        summary_times[key] = filters.time_to_str(value)

    return json.dumps(summary_times)
예제 #3
0
def workflow_summary_stats(root_wf_id, wf_id):
    dashboard = Dashboard(root_wf_id, wf_id)
    summary_times = dashboard.workflow_summary_stats(wf_id)

    for key, value in summary_times.items():
        summary_times[key] = filters.time_to_str(value)

    return json.dumps(summary_times)
예제 #4
0
def statistics(root_wf_id, wf_id):
    '''
    Get workflow statistics information
    '''
    dashboard = Dashboard(root_wf_id, wf_id)
    summary_times = dashboard.workflow_summary_stats(wf_id)

    for key, value in summary_times.items():
        summary_times[key] = filters.time_to_str(value)

    workflow_stats = dashboard.workflow_stats()

    return render_template('workflow/statistics.html', root_wf_id=root_wf_id, wf_id=wf_id, summary_stats=summary_times, workflow_stats=workflow_stats)
예제 #5
0
def successful_jobs(root_wf_id, wf_id):
    '''
    Get a list of all successful jobs of the latest instance for a given workflow.
    '''
    dashboard = Dashboard(root_wf_id, wf_id)
    args = __get_datatables_args()

    total_count, filtered_count, successful_jobs_list = dashboard.get_successful_jobs(wf_id, **args)

    for job in successful_jobs_list:
        job.duration_formatted = filters.time_to_str(job.duration)
        job.exec_job_id = '<a href="' + url_for('job', root_wf_id=root_wf_id, wf_id=wf_id, job_id=job.job_id) + '">' + job.exec_job_id + '</a>'

    return render_template('workflow/jobs_successful.xhr.json', count=total_count, filtered=filtered_count, jobs=successful_jobs_list, table_args=args)
예제 #6
0
def statistics(root_wf_id, wf_id):
    '''
    Get workflow statistics information
    '''
    dashboard = Dashboard(root_wf_id, wf_id)
    summary_times = dashboard.workflow_summary_stats(wf_id)

    for key, value in summary_times.items():
        summary_times[key] = filters.time_to_str(value)

    workflow_stats = dashboard.workflow_stats()

    return render_template('workflow/statistics.html',
                           root_wf_id=root_wf_id,
                           wf_id=wf_id,
                           summary_stats=summary_times,
                           workflow_stats=workflow_stats)
예제 #7
0
def successful_invocations(root_wf_id, wf_id, job_id):
    '''
    Get list of successful invocations for a given job.
    '''
    dashboard = Dashboard(root_wf_id, wf_id)
    successful_invocations_list = dashboard.get_successful_job_invocation(wf_id, job_id)

    for item in successful_invocations_list:
        item.remote_duration_formatted = filters.time_to_str(item.remote_duration)

    # is_xhr = True if it is AJAX request.
    if request.is_xhr:
        if len(successful_invocations_list) > 0:
            return render_template('workflow/job/invocations_successful.xhr.html', root_wf_id=root_wf_id, wf_id=wf_id, job_id=job_id, invocations=successful_invocations_list)
        else:
            return '', 204
    else:
        return render_template('workflow/job/invocations_successful.html', root_wf_id=root_wf_id, wf_id=wf_id, job_id=job_id, invocations=successful_invocations_list)
예제 #8
0
def successful_jobs(root_wf_id, wf_id):
    '''
    Get a list of all successful jobs of the latest instance for a given workflow.
    '''
    dashboard = Dashboard(root_wf_id, wf_id)
    args = __get_datatables_args()

    total_count, filtered_count, successful_jobs_list = dashboard.get_successful_jobs(
        wf_id, **args)

    for job in successful_jobs_list:
        job.duration_formatted = filters.time_to_str(job.duration)
        job.exec_job_id = '<a href="' + url_for(
            'job', root_wf_id=root_wf_id, wf_id=wf_id,
            job_id=job.job_id) + '">' + job.exec_job_id + '</a>'

    return render_template('workflow/jobs_successful.xhr.json',
                           count=total_count,
                           filtered=filtered_count,
                           jobs=successful_jobs_list,
                           table_args=args)