reservable nodes are all right
[plewww.git] / planetlab / nodes / node.php
index 8f1f25f..7a863f9 100644 (file)
@@ -187,7 +187,7 @@ if ($display_pcus) {
   if (! $site_pcus) {
     $pcu_update_area = "This site has no PCU - " . href ( l_pcu_add(), "add one here");
   } else {
-    $pcu_add_link = href (l_pcu_add(),plc_add_icon());
+    $pcu_add_link = href (l_pcu_add(),plc_add_icon() . "Add new");
 
     // first option in pcus
     if ($pcu_ids) 
@@ -217,7 +217,7 @@ if ($display_pcus) {
     $pcu_attach_button = 
       $details->form()->submit_html('attach_pcu',"Attach PCU");
 
-    $pcu_update_area = $pcu_add_link . " " . $pcu_chooser . " " . $port_chooser . " " . $pcu_attach_button;
+    $pcu_update_area = $pcu_add_link . "<br>Or, select existing  " . $pcu_chooser . " " . $port_chooser . " " . $pcu_attach_button;
   }
 
   if ($pcu_string) 
@@ -241,7 +241,8 @@ $details->th_td("Last contact",$Node->lastContact());
 
 // boot area
 $details->space ();
-$details->th_td ("Observed Boot state",$run_level . ( $Node->stale() ? " -- stale value" : "" ));
+$stale_text =  $Node->stale() ? ("... (more than " . Node::stale_text() . " ago)") : "" ;
+$details->th_td ("Observed Boot state", $run_level . $stale_text);
 if ( ! ($local_peer && $privileges)) {
   // just display it
   $boot_value=$boot_state;
@@ -274,10 +275,11 @@ if ( $local_peer  && $privileges) {
                     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)"),
-                    array("value"=>"download-generic-usb","display"=>"Download generic USB image (requires floppy)"));
+                    //              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)"),
+                    //              array("value"=>"download-generic-usb","display"=>"Download generic USB image (requires floppy)"),
+                     );
   $download_value .= $download_form->select_html("action",$selectors,
                                                 array('label'=>"Download mode",'autosubmit'=>true));
   $download_value .= $download_form->end_html();
@@ -328,7 +330,6 @@ $form->start();
       $table->row_start();
       $peers->cell ($table,$slice['peer_id']);
       $table->cell (l_slice_t ($slice['slice_id'],$slice['name']));
-      # 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();
     }
@@ -348,7 +349,7 @@ if ( $local_peer ) {
   $tagnames = array_map ("get_tagname",$tags);
   $nodegroups_hash=plc_nodegroup_global_hash($api,$tagnames);
   
-  $toggle = new PlekitToggle ('tags',count_english_warning($tags,'tag'),
+  $toggle = new PlekitToggle ('tags',count_english($tags,'tag'),
                              array('bubble'=>'Inspect and set tags on that node',
                                    'visible'=>get_arg('show_tags',false)));
   $toggle->start();
@@ -431,6 +432,8 @@ if ( $local_peer ) {
     $headers["Type"]="string";
     $headers["MAC"]="string";
     $headers["bw limit"]="sortBandwidth";
+    $headers["tags"]=array('type'=>'int',
+                          'title'=>"number of tags set on interface");
     // a single symbol, marking 'p' for primary and a delete button for non-primary
     if ( $privileges ) $headers[plc_delete_icon()]='string';
 
@@ -450,6 +453,8 @@ if ( $local_peer ) {
       $table->cell($interface['type']);
       $table->cell($interface['mac']);
       $table->cell(pretty_bandwidth($interface['bwlimit']));
+      $table->cell(href(l_interface_tags($interface_id),
+                       count($interface['interface_tag_ids'])));
       if ( $privileges ) {
        if ($interface['is_primary']) {
          $table->cell(plc_bubble("p","Cannot delete a primary interface"));