Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Merge pull request #88 from mozilla/fix-displayed-url-bug

fixes display url bug and label area bug
  • Loading branch information...
commit aa229433af0388a786cca7252647f33f57dcb277 2 parents 4477ece + b24d709
jeads jeads authored
7 datazilla/webapp/static/js/b2g_apps/AppsPage.js
@@ -59,7 +59,8 @@ var AppsPage = new Class( {
59 59 this.history.pushState(
60 60 {state:paramData},
61 61 "Perf-o-Matic",
62   - this.refData.project + '?' + paramData['params_str']
  62 + //this.refData.project + '?' + paramData['params_str']
  63 + '?' + paramData['params_str']
63 64 );
64 65
65 66 },
@@ -137,6 +138,10 @@ var AppsPage = new Class( {
137 138 var urlObj = jQuery.url(window.location).data;
138 139 this.refData.project = urlObj.seg.path[0];
139 140
  141 + if(urlObj.attr.directory.search(/\/$/) === -1){
  142 + urlObj.attr.directory += '/';
  143 + }
  144 +
140 145 this.urlBase = urlObj.attr.base + urlObj.attr.directory;
141 146
142 147 this.defaults = {};
21 datazilla/webapp/static/js/b2g_apps/GraphControlsComponent.js
@@ -207,7 +207,7 @@ var GraphControlsComponent = new Class({
207 207
208 208 for(j=0; j<inputEls.length; j++){
209 209
210   - idAttr = $(inputEls[j]).parent().parent().attr('id');
  210 + idAttr = $(inputEls[j]).parent().attr('id');
211 211 id = this.view.getId(idAttr);
212 212
213 213 if( checkedAllowed[id] === undefined ){
@@ -239,7 +239,7 @@ var GraphControlsComponent = new Class({
239 239 },
240 240 toggleAppSeries: function(event){
241 241
242   - var idAttr = $(event.currentTarget).parent().parent().attr('id');
  242 + var idAttr = $(event.currentTarget).parent().attr('id');
243 243 var id = this.view.getId(idAttr);
244 244
245 245 $(APPS_PAGE.appContainerSel).trigger(
@@ -250,7 +250,7 @@ var GraphControlsComponent = new Class({
250 250 },
251 251 toggleTestSeries: function(event){
252 252
253   - var idAttr = $(event.currentTarget).parent().parent().attr('id');
  253 + var idAttr = $(event.currentTarget).parent().attr('id');
254 254 var id = this.view.getId(idAttr);
255 255
256 256 var eventData = this.testLookup[id];
@@ -388,7 +388,7 @@ var GraphControlsView = new Class({
388 388 for(var i=0; i<inputEls.length; i++){
389 389
390 390 inputEl = inputEls[i];
391   - idAttr = $(inputEl).parent().parent().attr('id');
  391 + idAttr = $(inputEl).parent().attr('id');
392 392 checked = $(inputEl).attr('checked');
393 393 id = this.getId(idAttr);
394 394
@@ -430,12 +430,13 @@ var GraphControlsView = new Class({
430 430 label = seriesDatum.name;
431 431 }
432 432
433   - var legendClone = $(legendIdSel).clone();
  433 + var labelClone = $(legendIdSel).parent().clone();
  434 + var legendClone = $(labelClone).children();
  435 +
434 436 $(legendClone).attr(
435 437 'id', idPrefix + seriesDatum.id
436 438 );
437 439
438   -
439 440 var inputEl = $(legendClone).find('input');
440 441 $(inputEl).bind('click', _.bind( fnCallback, context ) );
441 442
@@ -464,7 +465,7 @@ var GraphControlsView = new Class({
464 465 }
465 466 );
466 467
467   - $(containerSel).append(legendClone);
  468 + $(containerSel).append(labelClone);
468 469
469 470 },
470 471 getId: function(idAttr){
@@ -515,7 +516,7 @@ var GraphControlsModel = new Class({
515 516
516 517 getBranches: function(context, fnSuccess){
517 518
518   - var uri = APPS_PAGE.urlBase + '/refdata/perftest/ref_data/products';
  519 + var uri = APPS_PAGE.urlBase + 'refdata/perftest/ref_data/products';
519 520
520 521 jQuery.ajax( uri, {
521 522 accepts:'application/json',
@@ -529,7 +530,7 @@ var GraphControlsModel = new Class({
529 530 },
530 531 getApps: function(context, fnSuccess){
531 532
532   - var uri = APPS_PAGE.urlBase + '/refdata/perftest/ref_data/tests';
  533 + var uri = APPS_PAGE.urlBase + 'refdata/perftest/ref_data/tests';
533 534
534 535 jQuery.ajax( uri, {
535 536 accepts:'application/json',
@@ -544,7 +545,7 @@ var GraphControlsModel = new Class({
544 545
545 546 getTests: function(context, fnSuccess){
546 547
547   - var uri = APPS_PAGE.urlBase + '/refdata/perftest/ref_data/pages';
  548 + var uri = APPS_PAGE.urlBase + 'refdata/perftest/ref_data/pages';
548 549
549 550 jQuery.ajax( uri, {
550 551 accepts:'application/json',
2  datazilla/webapp/static/js/b2g_apps/PerformanceGraphComponent.js
@@ -484,7 +484,7 @@ var PerformanceGraphModel = new Class({
484 484
485 485 getAppData: function(context, fnSuccess, testIds, pageName, range, branch){
486 486
487   - var uri = APPS_PAGE.urlBase + '/testdata/test_values?' +
  487 + var uri = APPS_PAGE.urlBase + 'testdata/test_values?' +
488 488 'branch=BRANCH&test_ids=TEST_IDS&page_name=PAGE_NAME&range=RANGE';
489 489
490 490 uri = uri.replace('BRANCH', branch);
2  datazilla/webapp/static/js/b2g_apps/ReplicateGraphComponent.js
@@ -391,7 +391,7 @@ var ReplicateGraphModel = new Class({
391 391 ){
392 392
393 393 var uri = APPS_PAGE.urlBase +
394   - '/refdata/objectstore/json_blob/revisions?branch=' + branch +
  394 + 'refdata/objectstore/json_blob/revisions?branch=' + branch +
395 395 '&gaia_revision=' + gaiaRevision +
396 396 '&gecko_revision=' + geckoRevision +
397 397 '&test_id=' + testId + '&test_type=' + testType;
2  datazilla/webapp/static/js/b2g_apps/apps-summary-min.js
1 addition, 1 deletion not shown
25 datazilla/webapp/templates/apps.summary.html
@@ -22,18 +22,19 @@
22 22 </div>
23 23 </div>
24 24
25   -<div id="su_legend" class="ui-state-highlight ui-corner-all su-data-series-panel" style="display:none;">
26   - <label>
  25 +<label>
  26 + <div id="su_legend" class="ui-state-highlight ui-corner-all su-data-series-panel" style="display:none;">
27 27 <input type="checkbox" title="toggle" style="margin-left:2px; margin-right:5px; float:left;" />
28 28 <div name="su_dataset_title" class="su-wordwrap css-left" style="width:100px; margin-top:4px;"></div>
29   - </label>
30   -</div>
31   -<div id="su_test_legend" class="ui-state-highlight ui-corner-all su-data-series-panel" style="display:none;">
32   - <label>
  29 + </div>
  30 +</label>
  31 +
  32 +<label>
  33 + <div id="su_test_legend" class="ui-state-highlight ui-corner-all su-data-series-panel" style="display:none;">
33 34 <input type="radio" name="test_type" style="margin-left:2px; margin-right:5px; float:left;" />
34 35 <div name="su_dataset_title" class="su-wordwrap css-left" style="width:100px; margin-top:4px;"></div>
35   - </label>
36   -</div>
  36 + </div>
  37 +</label>
37 38
38 39 <div id="app_container" class="ui-widget ui-widget-header ui-corner-top app-container">
39 40 <div id="test_series" class="ui-widget ui-widget-header ui-corner-all app-list-two">
@@ -43,12 +44,12 @@
43 44 </div>
44 45 <div id="app_series" class="ui-widget ui-widget-header ui-corner-all app-list">
45 46 </div>
46   - <div class="ui-widget ui-widget-header ui-corner-all app-list-controls">
47   - <label>
  47 + <label>
  48 + <div class="ui-widget ui-widget-header ui-corner-all app-list-controls">
48 49 <input id="app_select_apps" type="checkbox" style="margin-top:5px; margin-left:5px; margin-right:5px; float:left;" title="Select/Unselect all applications" checked>
49 50 <div style="padding:5px;" class="su-large-text">Applications</div>
50   - </label>
51   - </div>
  51 + </div>
  52 + </label>
52 53 <div class="ui-widget ui-widget-header ui-corner-all app-control-container">
53 54 <div style="display:inline;">
54 55 <div style="width:280px;" class="app-control-element su-large-text">Firefox OS Application Performance</div>

0 comments on commit aa22943

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