Merge lp:~stevanr/lava-dashboard/fix-1197322 into lp:lava-dashboard

Proposed by Stevan Radaković
Status: Merged
Approved by: Senthil Kumaran S
Approved revision: 411
Merged at revision: 411
Proposed branch: lp:~stevanr/lava-dashboard/fix-1197322
Merge into: lp:lava-dashboard
Diff against target: 51 lines (+1/-15)
2 files modified
dashboard_app/static/dashboard_app/js/image-report.js (+0/-11)
dashboard_app/views/images.py (+1/-4)
To merge this branch: bzr merge lp:~stevanr/lava-dashboard/fix-1197322
Reviewer Review Type Date Requested Status
Senthil Kumaran S Approve
Review via email: mp+172791@code.launchpad.net

Description of the change

Remove test cases name which was not necessary.
Remove units from legend for now to get rid of hundreds of additional queries django was making.

To post a comment you must log in.
Revision history for this message
Senthil Kumaran S (stylesen) wrote :

Looks good. +1 to merge.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'dashboard_app/static/dashboard_app/js/image-report.js'
2--- dashboard_app/static/dashboard_app/js/image-report.js 2013-07-01 15:49:15 +0000
3+++ dashboard_app/static/dashboard_app/js/image-report.js 2013-07-03 11:44:27 +0000
4@@ -284,7 +284,6 @@
5 // Get the plot data.
6
7 data = [];
8- units = "";
9 for (test in table_data) {
10
11 if ($("#test_select").val().indexOf(test) >= 0) {
12@@ -306,7 +305,6 @@
13 } else { // measurements
14 if (row[iter]["measurements"] && row[iter]["measurements"].length != 0) {
15 row_data.push([iter, row[iter]["measurements"][0]["measurement"]]);
16- units = row[iter]["measurements"][0]["units"];
17 }
18 }
19 }
20@@ -376,15 +374,6 @@
21 options["yaxis"]["min"] = 0;
22 }
23
24- if (units != "") {
25- options["legend"]["labelFormatter"] = function(label, series) {
26- if (label.length > 20) {
27- return label.substring(0,20) + "...";
28- }
29- return label + " (" + units + ")";
30- }
31- }
32-
33 $.plot($("#outer-container #inner-container"), data, options);
34 }
35
36
37=== modified file 'dashboard_app/views/images.py'
38--- dashboard_app/views/images.py 2013-07-01 15:49:15 +0000
39+++ dashboard_app/views/images.py 2013-07-03 11:44:27 +0000
40@@ -89,10 +89,7 @@
41 cls = 'present fail'
42 bug_ids = sorted([b.bug_id for b in test_run.launchpad_bugs.all()])
43
44- measurements = [{'item': str(item.test_case),
45- 'measurement': str(item.measurement),
46- 'units': str(item.units)
47- }
48+ measurements = [{'measurement': str(item.measurement)}
49 for item in test_run.test_results.all()]
50
51 test_run_data = dict(

Subscribers

People subscribed via source and target branches