add a check for whether observed boot state is stale or not.
[plewww.git] / planetlab / nodes / node.php
index 25edde1..ebade5e 100644 (file)
@@ -41,6 +41,7 @@ $node=$nodes[0];
 // node info
 $hostname= $node['hostname'];
 $boot_state= $node['boot_state'];
+$run_level = $node['run_level'];
 $site_id= $node['site_id'];
 $model= $node['model'];
 $version= $node['version'];
@@ -166,6 +167,7 @@ $details->th_td("Last update",$Node->lastUpdated());
 
 // boot area
 $details->space ();
+$details->th_td ("Observed Boot state",$run_level . ( $Node->stale() ? " -- stale value" : "" ));
 if ( ! ($local_peer && $privileges)) {
   // just display it
   $boot_value=$boot_state;
@@ -174,8 +176,8 @@ if ( ! ($local_peer && $privileges)) {
   $boot_form = new PlekitForm (l_actions(), array("node_id"=>$node_id,
                                               "action"=>"node-boot-state"));
   $boot_value .= $boot_form->start_html();
-  $states = array( 'boot'=>'Boot', 'safeboot'=>'SafeBoot', 'failboot'=>'FailBoot', 
-                  'disabled' => 'Disabled', 'install'=>'Install', 'reinstall'=>'Reinstall');
+  $states = array( 'boot'=>'Boot', 'safeboot'=>'SafeBoot', 
+                  'disabled' => 'Disabled', 'reinstall'=>'Reinstall');
   $selectors=array();
   foreach ($states as $dbname=>$displayname) { 
     $selector=array("display"=>$displayname, "value"=>$dbname);
@@ -185,7 +187,7 @@ if ( ! ($local_peer && $privileges)) {
   $boot_value .= $boot_form->select_html("boot_state",$selectors,array('autosubmit'=>true));
   $boot_value .= $boot_form->end_html();
  }
-$details->th_td ("Boot state",$boot_value);
+$details->th_td ("Preferred Boot state",$boot_value);
 
 // same here for the download area
 if ( $local_peer  && $privileges) {
@@ -197,6 +199,7 @@ if ( $local_peer  && $privileges) {
                     array("display"=>"-- All in one images --","disabled"=>true),
                     array("value"=>"download-node-iso","display"=>"Download ISO image for $hostname"),
                     array("value"=>"download-node-usb","display"=>"Download USB image for $hostname"),
+                    array("value"=>"download-node-usb-partition", "display"=>"Download partitioned, USB image for $hostname"),
                     array("display"=>"-- Floppy + generic image --","disabled"=>true),
                     array("value"=>"download-node-floppy","display"=>"Download Floppy file for $hostname"),
                     array("value"=>"download-generic-iso","display"=>"Download generic ISO image (requires floppy)"),
@@ -235,7 +238,7 @@ $form->start();
   } else {
     $headers=array();
     $headers['Peer']="string";
-    $headers['Name']="string";
+    $headers['Slice Name']="string";
     $headers['Sliver']="string";
     $reasonable_page=10;
     $table_options = array('notes_area'=>false,"search_width"=>10,'pagesize'=>$reasonable_page);
@@ -248,9 +251,10 @@ $form->start();
 
     foreach ($slices as $slice) {
       $table->row_start();
-      $table->cell ($peers->shortname($peer_id));
+      $peers->cell ($table,$slice['peer_id']);
       $table->cell (l_slice_t ($slice['slice_id'],$slice['name']));
-      $table->cell (l_sliver_t ($node_id,$slice['slice_id'],'view'));
+      # xxx l_sliver not implemented yet - what should we show exactly ?
+      $table->cell (l_sliver_t ($node_id,$slice['slice_id'],'sliver tags'));
       $table->row_end();
     }
     $table->end();
@@ -327,7 +331,7 @@ if ( $local_peer ) {
 
 //////////////////////////////////////////////////////////// interfaces
 if ( $local_peer ) {
-  $toggle=new PlekitToggle ('interfaces',count_english_warning($interfaces,'interfaces'),
+  $toggle=new PlekitToggle ('interfaces',count_english_warning($interfaces,'interface'),
                            array('bubble'=>'Inspect and tune interfaces on that node',
                                  'visible'=>get_arg('show_interfaces',false)));
   $toggle->start();