rename 'all' to 'any'; remove obsolete code
smbaker [Mon, 26 Nov 2012 07:44:32 +0000 (23:44 -0800)]
apps/gacksadmin/wizard.php

index e9356c0..f4801d6 100644 (file)
@@ -51,22 +51,19 @@ if ($account_name != NULL) {
     $resources = json_decode($resources[2], true);
     $subgroup_selectors = array();
     foreach ($resources["resources"]["plc.vicci.cores"]["subgroups"] as $subgroup) {
-        $subgroup_selectors[]= array("display"=>$subgroup[0], "value"=>$subgroup[0]);
+        // rename "all" to "any"
+        if ($subgroup[0]=="all") {
+            $display="any";
+        } else {
+            $display=$subgroup[0];
+        }
+        $subgroup_selectors[]= array("display"=>$display, "value"=>$subgroup[0]);
     }
 
     $form = new PlekitForm(l_gacks_actions(), array("action"=>"node-wizard",
                                                     "account_name"=> $account_name,
                                                     "resource_name"=>"plc.vicci.cores"));
 
-    $image_selectors = array();
-    $image_selectors []= array("display"=>"No Change", "value"=>"");
-    $image_selectors []= array("display"=>"Default PlanetLab image", "value"=>"default");
-    $image_selectors []= array("display"=>"Hadoop", "value"=>"hadoop");
-    $image_selectors []= array("display"=>"MPI", "value"=>"mpi");
-
-    $image = get_slice_image($api, $account_name);
-    $headNode = get_slice_headnode($api, $account_name);
-
     $form->start();
     print <<< EOF
 <br><br>
@@ -75,17 +72,7 @@ to your slice.
 <br><br>
 EOF;
 
-    if ($image != NULL) {
-        print "This slice is currently using the image '" . $image . "'. ";
-    }
-    if ($headNode != NULL) {
-        print "The head node when using the MPI or Hadoop images is '" . $headNode . "'. ";
-    }
-    if (($image != NULL) or ($headNode !=NULL)) {
-        print "<br><br>";
-    }
-
-    print "Select which site you would like to allocate slivers from: <br>";
+    print "Select which site you would like the new slivers to be located: <br>";
     print $form->select_html("resource_group", $subgroup_selectors);
     print "<br><br>Enter the number of slivers you would like to allocate: <br>";
     print $form->input_html("int", "amount", "0");