diff mbox

[Branch,~linaro-validation/lava-dashboard/trunk] Rev 407: Fix couple of problems when build numbers are presented and not the build dates. Reviewed by styl...

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

Commit Message

Stevan Radakovic June 14, 2013, 10:09 a.m. UTC
Merge authors:
  Stevan Radaković (stevanr)
Related merge proposals:
  https://code.launchpad.net/~stevanr/lava-dashboard/image-reports-fix2/+merge/169370
  proposed by: Stevan Radaković (stevanr)
  review: Approve - Senthil Kumaran S (stylesen)
------------------------------------------------------------
revno: 407 [merge]
committer: Stevan Radakovic <stevan.radakovic@linaro.org>
branch nick: trunk
timestamp: Fri 2013-06-14 12:08:19 +0200
message:
  Fix couple of problems when build numbers are presented and not the build dates. Reviewed by stylesen.
modified:
  dashboard_app/static/dashboard_app/js/image-report.js


--
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-06-13 08:26:40 +0000
+++ dashboard_app/static/dashboard_app/js/image-report.js	2013-06-14 09:11:32 +0000
@@ -69,7 +69,7 @@ 
 	build_number_end = parseInt(build_number_end);
     }
 
-    if (build_number_start > build_number_end) {
+    if (build_number_start >= build_number_end) {
 	alert("End build number must be greater then the start build number.");
 	return false;
     }
@@ -218,8 +218,8 @@ 
 
 	    row = table_data[test];
 	    for (iter in row) {
-		build_number = column_data[iter]["number"].split('.')[0];
-		if (build_number <= $("#build_number_end").val() && build_number >= $("#build_number_start").val()) {
+
+		if (test_build_number(column_data, iter)) {
 		    if (row[iter]["cls"]) {
 			if ($('input:radio[name=graph_type]:checked').val() == "number") {
 			    row_data.push([iter, row[iter]["passes"]]); 
@@ -242,8 +242,7 @@ 
 	row_data = [];
 	row = table_data[test_run_names[0]];
 	for (iter in row) {
-	    build_number = column_data[iter]["number"].split('.')[0];
-	    if (build_number <= $("#build_number_end").val() && build_number >= $("#build_number_start").val()) {
+	    if (test_build_number(column_data, iter)) {
 		row_data.push([iter, $("#target_goal").val()]);
 	    }
 	}