Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

fixed replicate bug and added spaces in html between labels and vaules

  • Loading branch information...
commit 524d6fc9f7583abefbb3c522d7e6a2088509f502 1 parent 2c94e4c
jeads jeads authored
5 datazilla/controller/admin/refdata/objectstore_refdata.py
@@ -41,11 +41,12 @@ def get_json_blob_by_test_run_id(project, test_run_id):
41 41
42 42 return {}
43 43
44   -def get_json_blob_by_revisions(project, branch, gaia_revision, gecko_revision):
  44 +def get_json_blob_by_revisions(
  45 + project, branch, gaia_revision, gecko_revision, testId):
45 46
46 47 ptm = PerformanceTestModel(project)
47 48 test_run_ids = ptm.get_test_run_ids_by_revisions(
48   - branch, gaia_revision, gecko_revision
  49 + branch, gaia_revision, gecko_revision, testId
49 50 )
50 51 ptm.disconnect()
51 52
4 datazilla/model/base.py
@@ -993,7 +993,7 @@ def get_value_summary_by_test_ids(
993 993 return data
994 994
995 995 def get_test_run_ids_by_revisions(
996   - self, branch, revision, gecko_revision):
  996 + self, branch, revision, gecko_revision, test_id):
997 997 #TODO: This method is specific to the b2g project and should
998 998 # be placed in a derived class
999 999
@@ -1002,7 +1002,7 @@ def get_test_run_ids_by_revisions(
1002 1002 data = self.sources["perftest"].dhub.execute(
1003 1003 proc=proc,
1004 1004 debug_show=self.DEBUG,
1005   - placeholders=[revision, gecko_revision, branch]
  1005 + placeholders=[revision, gecko_revision, branch, test_id]
1006 1006 )
1007 1007
1008 1008 test_run_ids = []
2  datazilla/model/sql/perftest.json
@@ -579,7 +579,7 @@
579 579 FROM test_run AS tr
580 580 LEFT JOIN build AS b ON tr.build_id = b.id
581 581 LEFT JOIN product AS pr ON b.product_id = pr.id
582   - WHERE tr.revision = ? AND tr.gecko_revision = ? AND pr.branch = ?
  582 + WHERE tr.revision = ? AND tr.gecko_revision = ? AND pr.branch = ? AND tr.test_id = ?
583 583 ORDER BY tr.id ASC",
584 584
585 585 "host":"read_host"
13 datazilla/webapp/apps/datazilla/refdata/objectstore_views.py
@@ -38,11 +38,18 @@ def get_json_blob_by_revisions(request, project):
38 38 branch = request.GET.get("branch")
39 39 gaia_revision = request.GET.get("gaia_revision")
40 40 gecko_revision = request.GET.get("gecko_revision")
  41 + test_id = request.GET.get("test_id")
  42 +
  43 + bad_param = False
  44 + try:
  45 + test_id = int(test_id)
  46 + except ValueError:
  47 + bad_param = True
41 48
42 49 blobs = objectstore_refdata.get_json_blob_by_revisions(
43   - project, branch, gaia_revision, gecko_revision)
  50 + project, branch, gaia_revision, gecko_revision, test_id)
44 51
45   - if blobs:
  52 + if blobs and not bad_param:
46 53 try:
47 54 for index, b in enumerate(blobs):
48 55 blobs[index]['json_blob'] = json.loads(b['json_blob'])
@@ -52,7 +59,7 @@ def get_json_blob_by_revisions(request, project):
52 59 return HttpResponse(json.dumps(blobs), content_type=API_CONTENT_TYPE)
53 60 else:
54 61 return HttpResponse(
55   - "gaia revision, {0}, and gecko revision, {1} not found".format(gaia_revision, gecko_revision),
  62 + "gaia revision, {0}, and gecko revision, {1}, test {2} not found".format(gaia_revision, gecko_revision, str(test_id)),
56 63 status=404)
57 64
58 65 def get_json_blob(request, project, id):
13 datazilla/webapp/static/js/b2g_apps/ReplicateGraphComponent.js
@@ -64,10 +64,10 @@ var ReplicateGraphComponent = new Class({
64 64 this.datapoint = data.datapoint;
65 65
66 66 this.view.hideData();
67   -
68 67 this.model.getReplicateData(
69 68 this, this.renderPlot, this.datapoint.branch,
70   - this.datapoint.revision, this.datapoint.gecko_revision
  69 + this.datapoint.revision, this.datapoint.gecko_revision,
  70 + this.datapoint.test_id
71 71 );
72 72
73 73 },
@@ -244,7 +244,7 @@ var ReplicateGraphView = new Class({
244 244 jsonData['replicate_range']['end'];
245 245
246 246 this.loadField(
247   - 'replicate range:',
  247 + 'replicate range',
248 248 replicateRange,
249 249 this.buildDataContainerSel
250 250 );
@@ -300,7 +300,7 @@ var ReplicateGraphView = new Class({
300 300
301 301 var divEl = $('<div></div>');
302 302 $(divEl).addClass('app-control-element app-control-small-element app-build-data');
303   - $(divEl).append('Build Revision:');
  303 + $(divEl).append('Build Revision: ');
304 304
305 305 var aEl = $('<a></a>');
306 306 $(aEl).attr('href', APPS_PAGE.buildHrefBase + fullBuildRevision);
@@ -343,13 +343,14 @@ var ReplicateGraphModel = new Class({
343 343 },
344 344
345 345 getReplicateData: function(
346   - context, fnSuccess, branch, gaiaRevision, geckoRevision
  346 + context, fnSuccess, branch, gaiaRevision, geckoRevision, testId
347 347 ){
348 348
349 349 var uri = '/' + APPS_PAGE.refData.project +
350 350 '/refdata/objectstore/json_blob/revisions?branch=' + branch +
351 351 '&gaia_revision=' + gaiaRevision +
352   - '&gecko_revision=' + geckoRevision;
  352 + '&gecko_revision=' + geckoRevision +
  353 + '&test_id=' + testId;
353 354
354 355 jQuery.ajax( uri, {
355 356 accepts:'application/json',
2  datazilla/webapp/static/js/b2g_apps/apps-summary-min.js
1 addition, 1 deletion not shown
6 datazilla/webapp/templates/apps.summary.html
@@ -70,7 +70,7 @@
70 70 <div id="app_perf_chart" style="width:905px; height:370px; margin-top:5px; margin-left:35px;"></div>
71 71 <div id="app_perf_detail_container" class="ui-widget ui-widget-header ui-corner-all app-detail-graph-container">
72 72 <div style="width:180px;" class="app-control-element app-control-small-element">Application:<span id="app_series_application" class="app-data"></span></div>
73   - <div style="width:185px;" class="app-control-element app-control-small-element">Gaia Revision:<a id="app_series_revision" target="_blank" class="app-data"></a></div>
  73 + <div style="width:185px;" class="app-control-element app-control-small-element">Gaia Revision:&nbsp;<a id="app_series_revision" target="_blank" class="app-data"></a></div>
74 74 <div style="width:140px;" class="app-control-element app-control-small-element">Date:<span id="app_series_formatted_date_run" class="app-data"></span></div>
75 75 <div style="width:85px;" class="app-control-element app-control-small-element">Avg:<span id="app_series_avg" class="app-data"></span></div>
76 76 <div style="width:80px;" class="app-control-element app-control-small-element">Min:<span id="app_series_min" class="app-data"></span></div>
@@ -86,8 +86,8 @@
86 86 <div style="width:150px;" class="app-control-element su-large-text">Test Replicates</div>
87 87 <div style="margin-left:10px; margin-right:10px;" class="app-control-element app-control-small-element">Application:<span id="app_replicate_application" class="app-data"></span></div>
88 88 <div style="margin-left:10px; margin-right:10px;" class="app-control-element app-control-small-element">Test:<span id="app_replicate_test" class="app-data"></span></div>
89   - <div style="margin-left:10px; margin-right:10px;" class="app-control-element app-control-small-element">Gaia Revision:<a id="app_replicate_revision" target="_blank" class="app-data"></a></div>
90   - <div style="margin-left:10px; margin-right:10px;" class="app-control-element app-control-small-element">Gecko Revision:<a id="app_replicate_gecko_revision" target="_blank" class="app-data"></a></div>
  89 + <div style="margin-left:10px; margin-right:10px;" class="app-control-element app-control-small-element">Gaia Revision:&nbsp;<a id="app_replicate_revision" target="_blank" class="app-data"></a></div>
  90 + <div style="margin-left:10px; margin-right:10px;" class="app-control-element app-control-small-element">Gecko Revision:&nbsp;<a id="app_replicate_gecko_revision" target="_blank" class="app-data"></a></div>
91 91 </div>
92 92 </div>
93 93 <div class="ui-widget ui-widget-header ui-corner-all app-graph-container-two">

0 comments on commit 524d6fc

Please sign in to comment.
Something went wrong with that request. Please try again.