Author: jfthomps
Date: Thu Apr  8 14:39:37 2010
New Revision: 931958

URL: http://svn.apache.org/viewvc?rev=931958&view=rev
Log:
VCL-303
modified submitCompStateChange to look up the imageid and imagerevisionid for 
the noimage image

VCL-233
corrected where I forgot to change $passes to $fails when copy/pasting code

Modified:
    incubator/vcl/trunk/web/.ht-inc/computers.php

Modified: incubator/vcl/trunk/web/.ht-inc/computers.php
URL: 
http://svn.apache.org/viewvc/incubator/vcl/trunk/web/.ht-inc/computers.php?rev=931958&r1=931957&r2=931958&view=diff
==============================================================================
--- incubator/vcl/trunk/web/.ht-inc/computers.php (original)
+++ incubator/vcl/trunk/web/.ht-inc/computers.php Thu Apr  8 14:39:37 2010
@@ -2453,6 +2453,8 @@ function submitCompStateChange() {
                $data["notes"] = $user["unityid"] . " " . 
unixToDatetime(time()) . "@"
                               . $data["notes"];
                $vclreloadid = getUserlistID('vclrel...@local');
+               $imageid = getImageId('noimage');
+               $imagerevisionid = getProductionRevisionid($imageid);
                $noaction = array();
                $changenow = array();
                $changeasap = array();
@@ -2488,7 +2490,7 @@ function submitCompStateChange() {
                                $changetimes[$compid] = $start;
                                $end = datetimeToUnix($start) + SECINWEEK; // 
hopefully keep future reservations off of it
                                $end = unixToDatetime($end);
-                               if(simpleAddRequest($compid, 4, 3, $start, 
$end, 18, $vclreloadid))
+                               if(simpleAddRequest($compid, $imageid, 
$imagerevisionid, $start, $end, 18, $vclreloadid))
                                        $passes[] = $compid;
                                else
                                        $fails[] = $compid;
@@ -2553,10 +2555,7 @@ function submitCompStateChange() {
                        print "but no functional management node was found for 
them. Nothing will ";
                        print "be done with them at this time:\n";
                        print "<TABLE>\n";
-                       print "  <TR>\n";
-                       print "    <TH>Computer</TH>\n";
-                       print "  </TR>\n";
-                       foreach($passes as $compid) {
+                       foreach($fails as $compid) {
                                print "  <TR>\n";
                                print "    <TD align=center><font 
color=\"ff0000\">{$computers[$compid]['hostname']}</font></TD>\n";
                                print "  </TR>\n";
@@ -2684,7 +2683,7 @@ function submitCompStateChange() {
                        print "functional management node was found to reload 
them with the ";
                        print "VM host image. Nothing will be done with them at 
this time:\n";
                        print "<TABLE>\n";
-                       foreach($passes as $compid) {
+                       foreach($fails as $compid) {
                                print "  <TR>\n";
                                print "    <TD align=center><font 
color=\"ff0000\">{$computers[$compid]['hostname']}</font></TD>\n";
                                print "  </TR>\n";


Reply via email to