Merge lp:~cjohnston/qa-dashboard/revert-r694 into lp:qa-dashboard

Proposed by Chris Johnston
Status: Merged
Approved by: Paul Larson
Approved revision: 699
Merged at revision: 699
Proposed branch: lp:~cjohnston/qa-dashboard/revert-r694
Merge into: lp:qa-dashboard
Diff against target: 179 lines (+38/-48)
3 files modified
common/static/js/graph.js (+34/-44)
eventstat/api.py (+3/-0)
qa_dashboard/settings.py (+1/-4)
To merge this branch: bzr merge lp:~cjohnston/qa-dashboard/revert-r694
Reviewer Review Type Date Requested Status
Paul Larson Approve
Review via email: mp+198660@code.launchpad.net

Commit message

Revert out r694

Description of the change

r694 is causing issues with power graphs. reverting them out until things can be properly fixed.

To post a comment you must log in.
Revision history for this message
Paul Larson (pwlars) wrote :

ack, hopefully we can sort out what's causing the issues in the morning. Thanks!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'common/static/js/graph.js'
--- common/static/js/graph.js 2013-12-04 02:51:17 +0000
+++ common/static/js/graph.js 2013-12-12 04:40:11 +0000
@@ -246,18 +246,17 @@
246 on: {246 on: {
247 success: function (id, result) {247 success: function (id, result) {
248 var data = Y.JSON.parse(result.responseText);248 var data = Y.JSON.parse(result.responseText);
249 var has_duration = false;
250249
251 var values = Array();250 var values = Array();
252 var values_labels = Array();251 var values_labels = Array();
253252
254 var graphs = Array();253 var graphs = Array();
255254
256 var d = [values.length, null, null, null, null, null];
257 if (data.last_release_avg > 0) {255 if (data.last_release_avg > 0) {
258 d.push(null);256 values.push([0, null, null, null, null, null, null, null]);
257 } else {
258 values.push([0, null, null, null, null, null, null]);
259 }259 }
260 values.push(d);
261 values_labels.push("");260 values_labels.push("");
262261
263 for (x in data.image_data) {262 for (x in data.image_data) {
@@ -274,21 +273,18 @@
274 labels.push("");273 labels.push("");
275 }274 }
276275
277 if (record.hasOwnProperty('duration')) {276 row_data.push(record.duration);
278 has_duration = true;277 labels.push("duration");
279 row_data.push(record.duration);
280 labels.push("duration");
281 }
282278
283 values.push(row_data);279 values.push(row_data);
284 values_labels.push(record.build_number)280 values_labels.push(record.build_number)
285 }281 }
286282
287 d = [values.length, null, null, null, null, null];
288 if (data.last_release_avg > 0) {283 if (data.last_release_avg > 0) {
289 d.push(null);284 values.push([values.length, null, null, null, null, null, null, null]);
285 } else {
286 values.push([values.length, null, null, null, null, null, null]);
290 }287 }
291 values.push(d);
292 values_labels.push("");288 values_labels.push("");
293289
294 var width = 400;290 var width = 400;
@@ -299,7 +295,10 @@
299 height = 400;295 height = 400;
300 }296 }
301297
302 var graph_data = {298 g = new Dygraph(
299 document.getElementById(div_id),
300 values,
301 {
303 width: width,302 width: width,
304 height: height,303 height: height,
305 plotter: errorBarChartPlotter,304 plotter: errorBarChartPlotter,
@@ -311,8 +310,15 @@
311 drawXGrid: false,310 drawXGrid: false,
312 drawYGrid: false,311 drawYGrid: false,
313 ylabel: unit,312 ylabel: unit,
313 y2label: "seconds",
314 hideOverlayOnMouseOut: false,314 hideOverlayOnMouseOut: false,
315 legend: "always",315 legend: "always",
316 'duration': {
317 axis: {
318 digitsAfterDecimal: 0,
319 valueRange: [0,1000]
320 }
321 },
316 unhighlightCallback: function(me, e) {322 unhighlightCallback: function(me, e) {
317 if (me.isZoomed('x')) return;323 if (me.isZoomed('x')) return;
318 var range = me.xAxisRange();324 var range = me.xAxisRange();
@@ -333,40 +339,24 @@
333 return "";339 return "";
334 }340 }
335 },341 },
336 }342 y2: {
337 }343 ticker: function(min, max, pixels, opts, dygraph, vals) {
338344 return [
339 if (has_duration) {345 {v:0, label:"0"},
340 graph_data.y2label = "seconds";346 {v:100, label:"100"},
341 graph_data.duration = {347 {v:200, label:"200"},
342 axis: {348 {v:300, label:"300"},
343 digitsAfterDecimal: 0,349 {v:400, label:"400"},
344 valueRange: [0,1000]350 {v:500, label:"500"},
351 {v:600, label:"600"},
352 {v:700, label:"700"},
353 {v:800, label:"800"},
354 {v:900, label:"900"}
355 ];
356 }
345 }357 }
346 }
347
348 graph_data.axis.y2 = {
349 ticker: function(min, max, pixels, opts, dygraph, vals) {
350 return [
351 {v:0, label:"0"},
352 {v:100, label:"100"},
353 {v:200, label:"200"},
354 {v:300, label:"300"},
355 {v:400, label:"400"},
356 {v:500, label:"500"},
357 {v:600, label:"600"},
358 {v:700, label:"700"},
359 {v:800, label:"800"},
360 {v:900, label:"900"}
361 ];
362 }358 }
363 }359 }
364 }
365
366 g = new Dygraph(
367 document.getElementById(div_id),
368 values,
369 graph_data
370 );360 );
371361
372 var rows = g.numRows();362 var rows = g.numRows();
373363
=== modified file 'eventstat/api.py'
--- eventstat/api.py 2013-12-04 02:51:17 +0000
+++ eventstat/api.py 2013-12-12 04:40:11 +0000
@@ -90,6 +90,7 @@
90 max=metric.maximum,90 max=metric.maximum,
91 avg=metric.average,91 avg=metric.average,
92 std=metric.stddev,92 std=metric.stddev,
93 duration=0,
93 )94 )
94 if method == "image":95 if method == "image":
95 image_info['build_number'] = metric.image.build_number96 image_info['build_number'] = metric.image.build_number
@@ -141,6 +142,7 @@
141 max=t['maximum'],142 max=t['maximum'],
142 avg=t['average'],143 avg=t['average'],
143 std=t['stddev'],144 std=t['stddev'],
145 duration=0,
144 ),146 ),
145 )147 )
146148
@@ -186,6 +188,7 @@
186 max=t['maximum'],188 max=t['maximum'],
187 avg=t['average'],189 avg=t['average'],
188 std=t['stddev'],190 std=t['stddev'],
191 duration=0,
189 ),192 ),
190 )193 )
191194
192195
=== modified file 'qa_dashboard/settings.py'
--- qa_dashboard/settings.py 2013-12-04 02:50:38 +0000
+++ qa_dashboard/settings.py 2013-12-12 04:40:11 +0000
@@ -94,10 +94,7 @@
94# Example: "/home/media/media.lawrence.com/static/"94# Example: "/home/media/media.lawrence.com/static/"
95STATIC_ROOT = 'www/static/'95STATIC_ROOT = 'www/static/'
9696
97try:97STATIC_URL_BASE = '//assets.ubuntu.com/sites/dashboard/'
98 from local_settings import STATIC_URL_BASE
99except ImportError:
100 STATIC_URL_BASE = '//assets.ubuntu.com/sites/dashboard/'
10198
102from assets_revision import revision as assets_revision99from assets_revision import revision as assets_revision
103100

Subscribers

People subscribed via source and target branches