Permalink
Browse files

added permalinks and fixed some bugs

  • Loading branch information...
1 parent 4b283e1 commit 3927663d76824e715326c2696ef2e874d74bea41 @jeads jeads committed Mar 1, 2013
@@ -42,11 +42,11 @@ 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, testId):
+ project, branch, gaia_revision, gecko_revision, testId, test_type):
ptm = PerformanceTestModel(project)
test_run_ids = ptm.get_test_run_ids_by_revisions(
- branch, gaia_revision, gecko_revision, testId
+ branch, gaia_revision, gecko_revision, testId, test_type
)
ptm.disconnect()
View
@@ -1006,16 +1006,22 @@ def get_value_summary_by_test_ids(
return data
def get_test_run_ids_by_revisions(
- self, branch, revision, gecko_revision, test_id):
+ self, branch, revision, gecko_revision, test_id, test_type):
#TODO: This method is specific to the b2g project and should
# be placed in a derived class
+ #
+ #NOTE: test_type corresponds to pages.url, b2g overloads the schema
+ # in the following way. The test table holds applications and
+ # the pages table holds tests
proc = 'perftest.selects.get_test_run_ids_from_revisions'
data = self.sources["perftest"].dhub.execute(
proc=proc,
debug_show=self.DEBUG,
- placeholders=[revision, gecko_revision, branch, test_id]
+ placeholders=[
+ revision, gecko_revision, branch, test_id, test_type
+ ]
)
test_run_ids = []
@@ -578,8 +578,9 @@
"sql":"SELECT tr.id
FROM test_run AS tr
LEFT JOIN build AS b ON tr.build_id = b.id
+ LEFT JOIN pages AS pg ON tr.test_id = pg.test_id
LEFT JOIN product AS pr ON b.product_id = pr.id
- WHERE tr.revision = ? AND tr.gecko_revision = ? AND pr.branch = ? AND tr.test_id = ?
+ WHERE tr.revision = ? AND tr.gecko_revision = ? AND pr.branch = ? AND tr.test_id = ? AND pg.url = ?
ORDER BY tr.id ASC",
"host":"read_host"
@@ -39,6 +39,7 @@ def get_json_blob_by_revisions(request, project):
gaia_revision = request.GET.get("gaia_revision")
gecko_revision = request.GET.get("gecko_revision")
test_id = request.GET.get("test_id")
+ test_type = request.GET.get("test_type")
bad_param = False
try:
@@ -47,7 +48,7 @@ def get_json_blob_by_revisions(request, project):
bad_param = True
blobs = objectstore_refdata.get_json_blob_by_revisions(
- project, branch, gaia_revision, gecko_revision, test_id)
+ project, branch, gaia_revision, gecko_revision, test_id, test_type)
if blobs and not bad_param:
try:
@@ -220,12 +220,20 @@ def get_test_value_summary(request, project):
branch = request.GET['branch']
test_ids = utils.get_id_list(request.GET['test_ids'])
page_name = request.GET.get("page_name", "")
- range = request.GET.get("range", 30)
+ range = request.GET.get("range", 7)
+
+ #make sure we're operating on an int
+ try:
+ range = int(range)
+ except ValueError:
+ range = 7
now = int(time.time())
- begin = now - 2592000
+ begin = now - 604800
+ if range == 30:
+ begin = now - 2592000
if range == 60:
begin = now - 5184000
elif range == 90:

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -131,6 +131,44 @@ div.app-build-data{
float:left;
}
div.app-spinner {
- background: transparent url(/static/images/spinner.gif) no-repeat center center;
- height:420px;
+ background: transparent url(/static/images/spinner.gif) no-repeat center center;
+ height:420px;
+}
+div.app-no-data-message {
+
+ width: 905px;
+ height: 370px;
+ margin-top: 170px;
+ margin-left: 425px;
+ font-size: 18px;
+ font-weight: bold;
+}
+.app-arrow-box {
+ position: relative;
+ background: #ffffff;
+ border: 2px solid #5CB2CB;
+}
+.app-arrow-box:after, .app-arrow-box:before {
+ bottom: 100%;
+ border: solid transparent;
+ content: " ";
+ height: 0;
+ width: 0;
+ position: absolute;
+ pointer-events: none;
+}
+
+.app-arrow-box:after {
+ border-color: rgba(255, 255, 255, 0);
+ border-bottom-color: #ffffff;
+ border-width: 10px;
+ left: 50%;
+ margin-left: -10px;
+}
+.app-arrow-box:before {
+ border-color: rgba(92, 178, 203, 0);
+ border-bottom-color: #5CB2CB;
+ border-width: 13px;
+ left: 50%;
+ margin-left: -13px;
}
@@ -29,6 +29,31 @@ var AppsPage = new Class( {
var urlObj = APPS_PAGE.urlObj.data;
APPS_PAGE.refData.project = urlObj.seg.path[0];
+ APPS_PAGE.urlBase = urlObj.attr.base + urlObj.attr.directory;
+
+ APPS_PAGE.defaults = {};
+ APPS_PAGE.defaults['branch'] = urlObj.param.query.branch;
+ APPS_PAGE.defaults['range'] = urlObj.param.query.range;
+ APPS_PAGE.defaults['test'] = urlObj.param.query.test;
+ APPS_PAGE.defaults['app'] = urlObj.param.query.app;
+
+ if( urlObj.param.query.app_list != undefined ){
+
+ var appLookup = {};
+
+ _.map(
+ urlObj.param.query.app_list.split(','),
+ function(app){
+ appLookup[app] = true;
+ }
+ );
+
+ APPS_PAGE.defaults['app_list'] = appLookup;
+ }
+
+ APPS_PAGE.defaults['gaia_rev'] = urlObj.param.query.gaia_rev;
+ APPS_PAGE.defaults['gecko_rev'] = urlObj.param.query.gecko_rev;
+
},
getRevisionSlice: function(revision){
return revision.slice(0, this.revisionLength);
Oops, something went wrong.

0 comments on commit 3927663

Please sign in to comment.