}
$tabs=array();
-$tabs[] = array('label'=>'Back to node', 'url'=>l_node($node_id),
+$tabs[] = array('label'=>'Back to node', 'url'=>l_node($node_id),
+ 'values' => array('show_details'=>False,'show_interfaces'=>True),
'bubble'=>'Cancel pending changes');
plekit_linetabs($tabs);
<script type="text/javascript" src="/planetlab/nodes/interface.js"></script>
');
+$toggle = new PlekitToggle ('interface',"Details",
+ array('bubble'=>'Display and modify details for that interface',
+ 'visible'=>get_arg('show_details',true)));
+$toggle->start();
+
$details=new PlekitDetails($can_update);
// xxx hardwire network type for now
$details->space();
$details->th_td("BW limit (bps)",$interface['bwlimit'],"bwlimit",array('width'=>11));
$details->th_td("Hostname",$interface['hostname'],"hostname");
+$details->th_td("Mac address",$interface['mac'],"mac", array('onChange'=>'macChecker("mac", true)'));
+
# xxx should the user be allowed to change this ?
-$mac=$interface['mac'];
-if ($mac) $details->th_td("MAC address",$mac);
+//$mac=$interface['mac'];
+//if ($mac) $details->th_td("MAC address",$mac);
// the buttons
$update_button = $form->submit_html ("update-interface","Update",
$details->end();
$form->end();
+$toggle->end();
// no tags if the interface has not been created yet
if ($mode == 'add') return;
//////////////////////////////////////// tags
-$toggle=new PlekitToggle ('tags','Tags');
+$toggle=new PlekitToggle ('tags','Tags',
+ array('visible'=>get_arg('show_tags',false)));
$toggle->start();
$form = new PlekitForm (l_actions(),array('interface_id'=>$interface_id));
$table->row_start();
$table->cell($form->submit_html("delete-interface-tags","Remove Tags"),
// use the whole columns and right adjust
- $table->columns(), "right");
+ array('hfill'=>true,'align'=>'right'));
$table->row_end();
// set tag area
$selector=array_map("tag_selector",$all_tags);
$table->cell($form->select_html("tag_type_id",$selector,array('label'=>"Choose")));
$table->cell($form->text_html("value","",array('width'=>8)));
+ //cell-xxx
$table->cell($form->submit_html("set-tag-on-interface","Set Tag"),2,"left");
$table->row_end();
}