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
1=== modified file 'common/static/js/graph.js'
2--- common/static/js/graph.js 2013-12-04 02:51:17 +0000
3+++ common/static/js/graph.js 2013-12-12 04:40:11 +0000
4@@ -246,18 +246,17 @@
5 on: {
6 success: function (id, result) {
7 var data = Y.JSON.parse(result.responseText);
8- var has_duration = false;
9
10 var values = Array();
11 var values_labels = Array();
12
13 var graphs = Array();
14
15- var d = [values.length, null, null, null, null, null];
16 if (data.last_release_avg > 0) {
17- d.push(null);
18+ values.push([0, null, null, null, null, null, null, null]);
19+ } else {
20+ values.push([0, null, null, null, null, null, null]);
21 }
22- values.push(d);
23 values_labels.push("");
24
25 for (x in data.image_data) {
26@@ -274,21 +273,18 @@
27 labels.push("");
28 }
29
30- if (record.hasOwnProperty('duration')) {
31- has_duration = true;
32- row_data.push(record.duration);
33- labels.push("duration");
34- }
35+ row_data.push(record.duration);
36+ labels.push("duration");
37
38 values.push(row_data);
39 values_labels.push(record.build_number)
40 }
41
42- d = [values.length, null, null, null, null, null];
43 if (data.last_release_avg > 0) {
44- d.push(null);
45+ values.push([values.length, null, null, null, null, null, null, null]);
46+ } else {
47+ values.push([values.length, null, null, null, null, null, null]);
48 }
49- values.push(d);
50 values_labels.push("");
51
52 var width = 400;
53@@ -299,7 +295,10 @@
54 height = 400;
55 }
56
57- var graph_data = {
58+ g = new Dygraph(
59+ document.getElementById(div_id),
60+ values,
61+ {
62 width: width,
63 height: height,
64 plotter: errorBarChartPlotter,
65@@ -311,8 +310,15 @@
66 drawXGrid: false,
67 drawYGrid: false,
68 ylabel: unit,
69+ y2label: "seconds",
70 hideOverlayOnMouseOut: false,
71 legend: "always",
72+ 'duration': {
73+ axis: {
74+ digitsAfterDecimal: 0,
75+ valueRange: [0,1000]
76+ }
77+ },
78 unhighlightCallback: function(me, e) {
79 if (me.isZoomed('x')) return;
80 var range = me.xAxisRange();
81@@ -333,40 +339,24 @@
82 return "";
83 }
84 },
85- }
86- }
87-
88- if (has_duration) {
89- graph_data.y2label = "seconds";
90- graph_data.duration = {
91- axis: {
92- digitsAfterDecimal: 0,
93- valueRange: [0,1000]
94+ y2: {
95+ ticker: function(min, max, pixels, opts, dygraph, vals) {
96+ return [
97+ {v:0, label:"0"},
98+ {v:100, label:"100"},
99+ {v:200, label:"200"},
100+ {v:300, label:"300"},
101+ {v:400, label:"400"},
102+ {v:500, label:"500"},
103+ {v:600, label:"600"},
104+ {v:700, label:"700"},
105+ {v:800, label:"800"},
106+ {v:900, label:"900"}
107+ ];
108+ }
109 }
110- }
111-
112- graph_data.axis.y2 = {
113- ticker: function(min, max, pixels, opts, dygraph, vals) {
114- return [
115- {v:0, label:"0"},
116- {v:100, label:"100"},
117- {v:200, label:"200"},
118- {v:300, label:"300"},
119- {v:400, label:"400"},
120- {v:500, label:"500"},
121- {v:600, label:"600"},
122- {v:700, label:"700"},
123- {v:800, label:"800"},
124- {v:900, label:"900"}
125- ];
126 }
127 }
128- }
129-
130- g = new Dygraph(
131- document.getElementById(div_id),
132- values,
133- graph_data
134 );
135
136 var rows = g.numRows();
137
138=== modified file 'eventstat/api.py'
139--- eventstat/api.py 2013-12-04 02:51:17 +0000
140+++ eventstat/api.py 2013-12-12 04:40:11 +0000
141@@ -90,6 +90,7 @@
142 max=metric.maximum,
143 avg=metric.average,
144 std=metric.stddev,
145+ duration=0,
146 )
147 if method == "image":
148 image_info['build_number'] = metric.image.build_number
149@@ -141,6 +142,7 @@
150 max=t['maximum'],
151 avg=t['average'],
152 std=t['stddev'],
153+ duration=0,
154 ),
155 )
156
157@@ -186,6 +188,7 @@
158 max=t['maximum'],
159 avg=t['average'],
160 std=t['stddev'],
161+ duration=0,
162 ),
163 )
164
165
166=== modified file 'qa_dashboard/settings.py'
167--- qa_dashboard/settings.py 2013-12-04 02:50:38 +0000
168+++ qa_dashboard/settings.py 2013-12-12 04:40:11 +0000
169@@ -94,10 +94,7 @@
170 # Example: "/home/media/media.lawrence.com/static/"
171 STATIC_ROOT = 'www/static/'
172
173-try:
174- from local_settings import STATIC_URL_BASE
175-except ImportError:
176- STATIC_URL_BASE = '//assets.ubuntu.com/sites/dashboard/'
177+STATIC_URL_BASE = '//assets.ubuntu.com/sites/dashboard/'
178
179 from assets_revision import revision as assets_revision
180

Subscribers

People subscribed via source and target branches