Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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
View
@@ -41,11 +41,12 @@ def get_json_blob_by_test_run_id(project, test_run_id):
return {}
-def get_json_blob_by_revisions(project, branch, gaia_revision, gecko_revision):
+def get_json_blob_by_revisions(
+ project, branch, gaia_revision, gecko_revision, testId):
ptm = PerformanceTestModel(project)
test_run_ids = ptm.get_test_run_ids_by_revisions(
- branch, gaia_revision, gecko_revision
+ branch, gaia_revision, gecko_revision, testId
)
ptm.disconnect()
4 datazilla/model/base.py
View
@@ -993,7 +993,7 @@ def get_value_summary_by_test_ids(
return data
def get_test_run_ids_by_revisions(
- self, branch, revision, gecko_revision):
+ self, branch, revision, gecko_revision, test_id):
#TODO: This method is specific to the b2g project and should
# be placed in a derived class
@@ -1002,7 +1002,7 @@ def get_test_run_ids_by_revisions(
data = self.sources["perftest"].dhub.execute(
proc=proc,
debug_show=self.DEBUG,
- placeholders=[revision, gecko_revision, branch]
+ placeholders=[revision, gecko_revision, branch, test_id]
)
test_run_ids = []
2  datazilla/model/sql/perftest.json
View
@@ -579,7 +579,7 @@
FROM test_run AS tr
LEFT JOIN build AS b ON tr.build_id = b.id
LEFT JOIN product AS pr ON b.product_id = pr.id
- WHERE tr.revision = ? AND tr.gecko_revision = ? AND pr.branch = ?
+ WHERE tr.revision = ? AND tr.gecko_revision = ? AND pr.branch = ? AND tr.test_id = ?
ORDER BY tr.id ASC",
"host":"read_host"
13 datazilla/webapp/apps/datazilla/refdata/objectstore_views.py
View
@@ -38,11 +38,18 @@ def get_json_blob_by_revisions(request, project):
branch = request.GET.get("branch")
gaia_revision = request.GET.get("gaia_revision")
gecko_revision = request.GET.get("gecko_revision")
+ test_id = request.GET.get("test_id")
+
+ bad_param = False
+ try:
+ test_id = int(test_id)
+ except ValueError:
+ bad_param = True
blobs = objectstore_refdata.get_json_blob_by_revisions(
- project, branch, gaia_revision, gecko_revision)
+ project, branch, gaia_revision, gecko_revision, test_id)
- if blobs:
+ if blobs and not bad_param:
try:
for index, b in enumerate(blobs):
blobs[index]['json_blob'] = json.loads(b['json_blob'])
@@ -52,7 +59,7 @@ def get_json_blob_by_revisions(request, project):
return HttpResponse(json.dumps(blobs), content_type=API_CONTENT_TYPE)
else:
return HttpResponse(
- "gaia revision, {0}, and gecko revision, {1} not found".format(gaia_revision, gecko_revision),
+ "gaia revision, {0}, and gecko revision, {1}, test {2} not found".format(gaia_revision, gecko_revision, str(test_id)),
status=404)
def get_json_blob(request, project, id):
13 datazilla/webapp/static/js/b2g_apps/ReplicateGraphComponent.js
View
@@ -64,10 +64,10 @@ var ReplicateGraphComponent = new Class({
this.datapoint = data.datapoint;
this.view.hideData();
-
this.model.getReplicateData(
this, this.renderPlot, this.datapoint.branch,
- this.datapoint.revision, this.datapoint.gecko_revision
+ this.datapoint.revision, this.datapoint.gecko_revision,
+ this.datapoint.test_id
);
},
@@ -244,7 +244,7 @@ var ReplicateGraphView = new Class({
jsonData['replicate_range']['end'];
this.loadField(
- 'replicate range:',
+ 'replicate range',
replicateRange,
this.buildDataContainerSel
);
@@ -300,7 +300,7 @@ var ReplicateGraphView = new Class({
var divEl = $('<div></div>');
$(divEl).addClass('app-control-element app-control-small-element app-build-data');
- $(divEl).append('Build Revision:');
+ $(divEl).append('Build Revision: ');
var aEl = $('<a></a>');
$(aEl).attr('href', APPS_PAGE.buildHrefBase + fullBuildRevision);
@@ -343,13 +343,14 @@ var ReplicateGraphModel = new Class({
},
getReplicateData: function(
- context, fnSuccess, branch, gaiaRevision, geckoRevision
+ context, fnSuccess, branch, gaiaRevision, geckoRevision, testId
){
var uri = '/' + APPS_PAGE.refData.project +
'/refdata/objectstore/json_blob/revisions?branch=' + branch +
'&gaia_revision=' + gaiaRevision +
- '&gecko_revision=' + geckoRevision;
+ '&gecko_revision=' + geckoRevision +
+ '&test_id=' + testId;
jQuery.ajax( uri, {
accepts:'application/json',
2  datazilla/webapp/static/js/b2g_apps/apps-summary-min.js
View
1 addition, 1 deletion not shown
6 datazilla/webapp/templates/apps.summary.html
View
@@ -70,7 +70,7 @@
<div id="app_perf_chart" style="width:905px; height:370px; margin-top:5px; margin-left:35px;"></div>
<div id="app_perf_detail_container" class="ui-widget ui-widget-header ui-corner-all app-detail-graph-container">
<div style="width:180px;" class="app-control-element app-control-small-element">Application:<span id="app_series_application" class="app-data"></span></div>
- <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>
+ <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>
<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>
<div style="width:85px;" class="app-control-element app-control-small-element">Avg:<span id="app_series_avg" class="app-data"></span></div>
<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 @@
<div style="width:150px;" class="app-control-element su-large-text">Test Replicates</div>
<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>
<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>
- <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>
- <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>
+ <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>
+ <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>
</div>
</div>
<div class="ui-widget ui-widget-header ui-corner-all app-graph-container-two">
Please sign in to comment.
Something went wrong with that request. Please try again.