/*if (0) { // tmp for speed */
//////////////////// nodes currently in
$toggle_nodes=new PlekitToggle('my-slice-nodes-current',
- "$count node(s) currently in $name",
+ count_english($nodes,"node") . " currently in $name",
array('visible'=>get_arg('show_nodes_current',!$privileges)));
$toggle_nodes->start();
$headers['hostname']='string';
$short="ST"; $long=Node::status_footnote(); $type='string';
$headers[$short]=array('type'=>$type,'title'=>$long); $notes []= "$short = $long";
-// the extra tags
+$short="R"; $long="reservable nodes"; $type='string';
+ $headers[$short]=array('type'=>$type,'title'=>$long); $notes []= "$short = $long";
+// the extra tags, configured for the UI
$headers=array_merge($headers,$visibletags->headers());
$notes=array_merge($notes,$visibletags->notes());
$run_level=$node['run_level'];
list($label,$class) = Node::status_label_class_($node);
$table->cell ($label,array('class'=>$class));
+ $table->cell( ($node['node_type']=='reservable')?"R":"" );
foreach ($visiblecolumns as $tagname) $table->cell($node[$tagname]);
if ($privileges) $table->cell ($form->checkbox_html('node_ids[]',$node['node_id']));
$count=count($potential_nodes);
$toggle_nodes=new PlekitToggle('my-slice-nodes-add',
- "$count more node(s) available",
+ count_english($potential_nodes,"more node") . " available",
array('visible'=>get_arg('show_nodes_add',false)));
$toggle_nodes->start();
- if ( ! $potential_nodes ) {
- // xxx improve style
- echo "<p class='not-relevant'>No node to add</p>";
- } else {
+ if ( $potential_nodes ) {
$headers=array();
$notes=array();
$headers['peer']='string';
if ($count && $privileges) {
// having reservable nodes in white lists looks a bit off scope for now...
$toggle_nodes=new PlekitToggle('my-slice-nodes-reserve',
- "$count reservable node(s)",
+ count_english($reservable_nodes,"reservable node") . " in slice",
array('visible'=>get_arg('show_nodes_resa',false)));
$toggle_nodes->start();
$grain=$api->GetLeaseGranularity();
# pass the slicename as the [0,0] coordinate as thead>tr>td
echo "<thead><tr><td>" . $slice['name'] . "</td>";
for ($i=0; $i<$steps; $i++)
- echo "<th>" . strftime("%H:%M",$start+$i*$grain). "</th>";
+ // expose in each header cell the full timestamp, and how to display it - use & as a separator*/
+ echo "<th>" . ($start+$i*$grain) . "&" . strftime("%H:%M",$start+$i*$grain). "</th>";
echo "</tr></thead><tbody>";
// todo - sort on hostnames
foreach ($reservable_nodes as $node) {