Пример #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())
Пример #2
0
def controller():
    rel = qt.get_latest_release().encode('utf-8')
    target_milestone = []
    target_milestone.append(rel)
    severity = ["BLOCKER", "MAJOR", "CRITICAL"]
    status = ["RESOLVED", "REOPENED", "NEW", "ASSIGNED", "UNCONFIRMED"]

    p_data = {
        "target_milestone": target_milestone,
        "severity": severity,
        "status": status
    }
    params = []
    params.append(p_data)

    q = {
        'method': 'Bug.search',
        'params': params
    }
    q = urllib.urlencode(q)
    q = q.replace('%27', '%22')
    resp = urllib2.urlopen(BUGZ_URL + q, timeout=30).read()
    resp = parse_response(resp)
    return resp