[llvm-commits] CVS: nightlytest-serverside/popup.js test.php

Patrick Jenkins pjenkins at apple.com
Mon Aug 21 14:57:13 PDT 2006



Changes in directory nightlytest-serverside:

popup.js updated: 1.1 -> 1.2
test.php updated: 1.17 -> 1.18
---
Log message:

A button entitled "Check All" now appears next to the buttons that allow
the user to graph long term results. When this button is clicked it will
select all the checkboxes in the corresponding table. Upon being clicked,
the button will also rename itself to "Uncheck All" and when it is clicked
a second time will deselect all boxes.



---
Diffs of the changes:  (+27 -8)

 popup.js |   22 +++++++++++++++++++++-
 test.php |   13 ++++++-------
 2 files changed, 27 insertions(+), 8 deletions(-)


Index: nightlytest-serverside/popup.js
diff -u nightlytest-serverside/popup.js:1.1 nightlytest-serverside/popup.js:1.2
--- nightlytest-serverside/popup.js:1.1	Fri Jul  7 19:32:18 2006
+++ nightlytest-serverside/popup.js	Mon Aug 21 16:56:57 2006
@@ -110,4 +110,24 @@
 			document.layers[whichLayer+"_"].innerHTML="(+)"+link.substring(3,link.length);
 		}
 	}
-}//end function
\ No newline at end of file
+}//end function
+
+var checkflag="false";
+function check(field) {
+  if (checkflag == "false") {
+    for (i = 0; i < field.length; i++) {
+      field[i].checked = true;
+    }
+    checkflag = "true";
+    return "Uncheck all"; 
+  }  
+  else {
+    for (i = 0; i < field.length; i++) {
+      if(field[i].type == 'checkbox'){
+        field[i].checked = false; 
+      }
+    }
+    checkflag = "false";
+    return "Check all"; 
+  }
+}
\ No newline at end of file


Index: nightlytest-serverside/test.php
diff -u nightlytest-serverside/test.php:1.17 nightlytest-serverside/test.php:1.18
--- nightlytest-serverside/test.php:1.17	Mon Aug 21 15:21:55 2006
+++ nightlytest-serverside/test.php	Mon Aug 21 16:56:57 2006
@@ -27,11 +27,9 @@
         die();
 }
 
-
 $mysql_link=mysql_connect("127.0.0.1","llvm","ll2002vm") or die("Error: could not connect to database!\n");
 mysql_select_db("nightlytestresults");
 
-
 $row = getMachineInfo($machine_id,$mysql_link);
 $today_row = getNightInfo($night_id,$mysql_link);
 $cur_date=$today_row['added'];
@@ -41,9 +39,7 @@
 $yesterday_row = mysql_fetch_array($today_query);
 $oldday_row = mysql_fetch_array($today_query);
 mysql_free_result($today_query);
-
-$previous_succesful_id = getPreviousWorkingNight($night_id, $mysql_link);
-
+$previous_succesful_id = $yesterday_row['id'];
 ?>
 
 <html>
@@ -124,7 +120,7 @@
 
 /*****************************************************
  *
- * Printing the times table
+ * Printing the build status
  *
  ******************************************************/
 if(strpos($today_row['buildstatus'], "OK")===FALSE){
@@ -176,6 +172,7 @@
   $disp="";
   $sign="(+)";
 }
+
 print "<font size=\"-1\"><a href=\"javascript://\"onclick=\"toggleLayer('testSuite');\", id=\"testSuite_\">$sign Test Suite Changes</a></font>\n";
 print "<div id=\"testSuite\" style=\"display: $disp;\" class=\"hideable\">\n";
 print"<h3><u>Test suite changes:</u></h3>\n";
@@ -582,7 +579,7 @@
 
     print "\t<tr bgcolor=\"$def_color\">\n";
     if(strcmp($d, "Total Sum")!=0){
-      print "\t\t<td><input type=checkbox name=files[] multiple=\"multiple\" value=\"$d\">\n";
+      print "\t\t<td><input type=checkbox name=files[] multiple=\"multiple\" value=\"$d\" >\n";
     }
     else{
       print "\t\t<td>\n";
@@ -605,6 +602,7 @@
 print "</table>\n";
 print "</td></tr></table><br>\n"; #ending black border around table  
 print "<input type=submit name=action value=\"Compare values\"> | ";
+print "<input type=button value=\"Check all\" onClick=\"this.value=check(this.form.elements)\"> | \n"; 
 print "<input type=reset>\n";
 print "</form>\n";
 print "</div><br><br>\n";
@@ -719,6 +717,7 @@
   print "</table>\n";
   print "</td></tr></table><br>\n"; #ending black border around table  
   print "<input type=submit name=action value=\"Examine Longterm Results\"> | ";
+  print "<input type=button value=\"Check all\" onClick=\"this.value=check(this.form.elements)\"> | \n"; 
   print "<input type=reset>\n";
   print "</form>\n";
   print "</div><br><br>\n";






More information about the llvm-commits mailing list