Ejemplo n.º 1
0
def home():
    rel = q.get_latest_release(src='performance')
    results = q.get_performance_data(release=rel, order_by=True).limit(5)
    cps = []
    hps = []
    throughput = []
    build = []
    for row in results:
         build_name, perf = row
         build.append(dict(name=build_name))
         cps.append(dict(cps=perf.cps))
         hps.append(dict(hps=perf.hps))
         throughput.append(dict(throughput=perf.throughput))
    
    rel = q.get_latest_release(src='testcase')
    smoke_results = q.dashboard_results(category="smoke", release=rel)
    reg_results = q.dashboard_results(category="regression", release=rel)

    build.reverse()
    cps.reverse()
    hps.reverse()
    throughput.reverse()
    smoke_results.reverse()
    reg_results.reverse()
    

    data = q.nav_tree_as_json()
    return render_template('dashboard/dashboard.html',
            build=build, cps=cps, hps=hps, 
            throughput=throughput,  
            smoke_results=smoke_results,
            reg_results=reg_results,data=data, release_name=rel, all_releases=q.get_all_release())
Ejemplo n.º 2
0
def show_executive_report():
    smoke = q.get_executive_results(category="smoke")
    regression = q.get_executive_results(category="regression")
    data = q.nav_tree_as_json()
    return render_template('/reports/report-tabs.html',
                            smoke=smoke, regression=regression,
                            data=data)
Ejemplo n.º 3
0
def show_graphs(product=None, category=None, release=None, build=None):
    label = ""
    breadcrumb = []
    result = []
    if product is not None and category is None and release is None and build is None:
        # only product flag
        total, passed, failed  = q.get_graph_data_ex(product=product)
        label += "Overall {} tests report".format(product)
        breadcrumb.append(dict(crumb=product, url='/reports/graphs/{}'.format(product)))
        result = q.get_tabular_failure_report(component=product)

    if product is not None and category is not None and release is None and build is None:
        # product and category flag
        total, passed, failed = q.get_graph_data_ex(product=product, category=category)
        label += "{} {} tests report".format(product, category)
        breadcrumb.append(dict(crumb=product, url='/reports/graphs/{}'.format(product)))
        breadcrumb.append(dict(crumb=category, url='/reports/graphs/{}/{}'.format(product, category)))
        result = q.get_tabular_failure_report(component=product, category=category)

    if product is not None and category is not None and release is not None and build is None:
        # Product category and release flag
        total, passed, failed = q.get_graph_data_ex(product=product, category=category, release=release)
        label += "{} {} tests report for {}".format(product, category, release)
        breadcrumb.append(dict(crumb=product, url='/reports/graphs/{}'.format(product)))
        breadcrumb.append(dict(crumb=category, url='/reports/graphs/{}/{}'.format(product, category)))
        breadcrumb.append(dict(crumb=release, url='/reports/graphs/{}/{}/{}'.format(product, category, release)))
        result = q.get_tabular_failure_report(component=product, category=category, release=release)

    if product is not None and category is not None and release is not None and build is not None:
        # Product, category, release and build
        total, passed, failed = q.get_graph_data_ex(product=product, category=category, release=release, build=build)
        label += "{} {} tests report for release: {} and build: {}".format(product, category, release, build)
        breadcrumb.append(dict(crumb=product, url='/reports/graphs/{}'.format(product)))
        breadcrumb.append(dict(crumb=category, url='/reports/graphs/{}/{}'.format(product, category)))
        breadcrumb.append(dict(crumb=release, url='/reports/graphs/{}/{}/{}'.format(product, category, release)))
        breadcrumb.append(dict(crumb=build, url='/reports/graphs/{}/{}/{}/{}'.format(product, category, release, build)))
        result = q.get_tabular_failure_report(component=product, category=category, release=release, build=build)

    data = q.nav_tree_as_json()
    return render_template('reports/single_graph.html', 
            total=total, 
            passed=passed, 
            failed=failed, 
            label=label,
            tabledata=result,
            breadcrumb=breadcrumb,
            data=data)