diff mbox

[Branch,~linaro-validation/lava-dashboard/trunk] Rev 411: Fix bug #1197322.

Message ID 20130703121416.18863.82767.launchpad@ackee.canonical.com
State Accepted
Headers show

Commit Message

Stevan Radakovic July 3, 2013, 12:14 p.m. UTC
Merge authors:
  Stevan Radaković (stevanr)
Related merge proposals:
  https://code.launchpad.net/~stevanr/lava-dashboard/fix-1197322/+merge/172791
  proposed by: Stevan Radaković (stevanr)
  review: Approve - Senthil Kumaran S (stylesen)
------------------------------------------------------------
revno: 411 [merge]
committer: Stevan Radakovic <stevan.radakovic@linaro.org>
branch nick: trunk
timestamp: Wed 2013-07-03 14:13:39 +0200
message:
  Fix bug #1197322.
modified:
  dashboard_app/static/dashboard_app/js/image-report.js
  dashboard_app/views/images.py


--
lp:lava-dashboard
https://code.launchpad.net/~linaro-validation/lava-dashboard/trunk

You are subscribed to branch lp:lava-dashboard.
To unsubscribe from this branch go to https://code.launchpad.net/~linaro-validation/lava-dashboard/trunk/+edit-subscription
diff mbox

Patch

=== modified file 'dashboard_app/static/dashboard_app/js/image-report.js'
--- dashboard_app/static/dashboard_app/js/image-report.js	2013-07-01 15:49:15 +0000
+++ dashboard_app/static/dashboard_app/js/image-report.js	2013-07-03 11:42:45 +0000
@@ -284,7 +284,6 @@ 
     // Get the plot data.
 
     data = [];
-    units = "";
     for (test in table_data) {
 
 	if ($("#test_select").val().indexOf(test) >= 0) {
@@ -306,7 +305,6 @@ 
 			} else { // measurements
 			    if (row[iter]["measurements"] && row[iter]["measurements"].length != 0) {
 				row_data.push([iter, row[iter]["measurements"][0]["measurement"]]);
-				units = row[iter]["measurements"][0]["units"];
 			    }
 			}
 		    }
@@ -376,15 +374,6 @@ 
 	options["yaxis"]["min"] = 0;
     }
 
-    if (units != "") {
-	options["legend"]["labelFormatter"] = function(label, series) {
-	    if (label.length > 20) {
-		return label.substring(0,20) + "...";
-	    }
-	    return label + " (" + units + ")";
-	}
-    }
-
     $.plot($("#outer-container #inner-container"), data, options); 
 }
 

=== modified file 'dashboard_app/views/images.py'
--- dashboard_app/views/images.py	2013-07-01 15:49:15 +0000
+++ dashboard_app/views/images.py	2013-07-03 11:42:45 +0000
@@ -89,10 +89,7 @@ 
                     cls = 'present fail'
             bug_ids = sorted([b.bug_id for b in test_run.launchpad_bugs.all()])
 
-            measurements = [{'item': str(item.test_case),
-                             'measurement': str(item.measurement),
-                             'units': str(item.units)
-                             }
+            measurements = [{'measurement': str(item.measurement)}
                             for item in test_run.test_results.all()]
 
             test_run_data = dict(