Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

fixed replicate selection bug

  • Loading branch information...
commit 4477ece556ccce1110b00faa5384d59942739ec7 1 parent 4dde690
jeads jeads authored
20 datazilla/webapp/static/js/b2g_apps/ReplicateGraphComponent.js
@@ -94,6 +94,9 @@ var ReplicateGraphComponent = new Class({
94 94
95 95 var totalReplicates = 1;
96 96
  97 + var chartIndex = 0;
  98 + var detailStructId = 0;
  99 +
97 100 for(j=0; j<data.length; j++){
98 101
99 102 results = data[j]['json_blob']['results'][this.datapoint.url];
@@ -106,8 +109,10 @@ var ReplicateGraphComponent = new Class({
106 109 this.data[j]['replicate_range']['start'] = totalReplicates;
107 110
108 111 for(i=0; i<results.length; i++){
109   -
110   - this.chartData['data'].push( [ totalReplicates, results[i] ] );
  112 + chartIndex = this.chartData['data'].push( [ totalReplicates, results[i] ] );
  113 + if(chartIndex === 1){
  114 + detailStructId = j;
  115 + }
111 116 this.hoverData[ totalReplicates ] = j;
112 117
113 118 totalReplicates++;
@@ -115,11 +120,6 @@ var ReplicateGraphComponent = new Class({
115 120
116 121 this.data[j]['replicate_range']['end'] = totalReplicates - 1;
117 122
118   - if( j === 0 ){
119   - this.view.setDetailContainer(
120   - this.series, this.datapoint, this.data[j]);
121   - }
122   -
123 123 this.view.showData(_.isEmpty(this.data));
124 124 }
125 125
@@ -129,9 +129,13 @@ var ReplicateGraphComponent = new Class({
129 129 this.chartOptions
130 130 );
131 131
  132 + this.view.setDetailContainer(
  133 + this.series, this.datapoint, this.data[detailStructId]
  134 + );
  135 +
132 136 //Initialize the replicate detail to first replicate
133 137 if(results != undefined){
134   - this.view.setHoverData(1, results[0]);
  138 + this.view.setHoverData(1, this.chartData['data'][0][1]);
135 139 }
136 140
137 141 /******
2  datazilla/webapp/static/js/b2g_apps/apps-summary-min.js
1 addition, 1 deletion not shown

0 comments on commit 4477ece

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