X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=planetlab%2Fnodes%2Fnodes.php;h=dc4768a392ac5913f8937f3205d50a4623c347d0;hb=HEAD;hp=a3121a7a8ae422476f7fdfb223d9a8da1bb5c490;hpb=bfdddb4d7f542119317a029424c3bf7d915b5000;p=plewww.git diff --git a/planetlab/nodes/nodes.php b/planetlab/nodes/nodes.php index a3121a7..dc4768a 100644 --- a/planetlab/nodes/nodes.php +++ b/planetlab/nodes/nodes.php @@ -1,7 +1,5 @@ GetPersonTags (array('person_id'=>$plc->person['person_id'])); //print_r($PersonTags); foreach ($PersonTags as $ptag) { - if ($ptag['tagname'] == 'columnconf') - { - $column_configuration = $ptag['value']; - $conf_tag_id = $ptag['person_tag_id']; - } - if ($ptag['tagname'] == 'showconf') - { - $show_configuration = $ptag['value']; - $show_tag_id = $ptag['person_tag_id']; - } + if ($ptag['tagname'] == 'columnconf') { + $column_configuration = $ptag['value']; + $conf_tag_id = $ptag['person_tag_id']; + } + if ($ptag['tagname'] == 'showconf') { + $show_configuration = $ptag['value']; + $show_tag_id = $ptag['person_tag_id']; + } } //print("column configuration = ".$column_configuration); $nodesconf_exists = false; -if ($column_configuration == "") -{ - $first_time_configuration = true; - $column_configuration = "nodes;default"; - $nodesconf_exists = true; -} -else { - $slice_conf = explode(";",$column_configuration); - for ($i=0; $istart(); -$headers = array (); $offset=0; +$headers = array (); $notes=array(); $notes [] = "For information about the different columns please see the node table layout tab above or mouse over the column headers"; - -/* -// fixed columns -if (plc_is_admin()) { - $short="I"; $long="node_id"; $type='int'; - $headers[$short]=array('type'=>$type,'title'=>$long); $notes []= "$short = $long"; - $offset=1; - } -$short="P"; $long="Peer"; $type='string'; - $headers[$short]=array('type'=>$type,'title'=>$long); $notes []= "$short = $long"; -$short="D"; $long="toplevel domain name"; $type='string'; - $headers[$short]=array('type'=>$type,'title'=>$long); $notes []= "$short = $long"; -$headers["Site"]="string"; -$headers["Hostname"]="string"; -$short="IP"; $long="IP Address"; $type='sortIPAddress'; - $headers[$short]=array('type'=>$type,'title'=>$long); $notes []= "$short = $long"; -$short="ST"; $long=Node::status_footnote(); $type='string'; - $headers[$short]=array('type'=>$type,'title'=>$long); $notes []= "$short = $long"; -$short="SL"; $long="Number of slivers"; $type='int'; - $headers[$short]=array('type'=>$type,'title'=>$long); $notes []= "$short = $long"; - -$headers=array_merge($headers,$visibletags->headers()); -$notes=array_merge($notes,$visibletags->notes()); -$short="?"; $long="extra status info"; $type='string'; - $headers[$short]=array('type'=>$type,'title'=>$long); $notes []= "$short = $long"; -*/ - $info_header = array(); -$short="?"; $long="extra status info"; $type='string'; -$info_header[$short]=array('type'=>$type,'title'=>$long, 'label'=>'?', 'header'=>'?', 'visible'=>true); +$short="?"; $long="extra status info"; $type='string'; +$info_header[$short]=array('type'=>$type,'title'=>$long, 'label'=>'?', 'header'=>'?', 'visible'=>true); //$notes []= "$short = $long"; //$info_header["?"] = "none"; $headers = array_merge($ConfigureColumns->get_headers(),$info_header); -if ($first_time_configuration) -$column_conf_visible = '1'; -else -$column_conf_visible = '0'; - -$toggle_nodes=new PlekitToggle('nodes-column-configuration', +$layout_help=' +This tab allows you to customize the columns in the node tables, +below. Information on the nodes comes from a variety of monitoring +sources. If you, as either a user or a provider of monitoring data, +would like to see additional columns made available, please send us +your request in mail to support@myslice.info. You can +find more information about the MySlice project at http://trac.myslice.info. +'; +$toggle_nodes=new PlekitToggle('nodes-layout', "Node table layout", - array('visible'=>$column_conf_visible, 'info_div'=>'note_columns_div')); + array('visible'=>NULL, + 'info-text'=>$layout_help, + 'info-visible'=>$show_columns_message)); $toggle_nodes->start(); print("
"); print(""); @@ -357,20 +346,7 @@ print(""); print(""); -if ($show_columns_message == '0') -$note_display = "display:none;"; -else -$note_display = ""; - - -print << -
-This tab allows you to customize the columns in the node tables, below. Information on the nodes comes from a variety of monitoring sources. If you, as either a user or a provider of monitoring data, would like to see additional columns made available, please send us your request in mail to support@myslice.info. You can find more information about the MySlice project at http://trac.myslice.info. -hide message permanently -
- -EOF; +////////// end $ConfigureColumns->configuration_panel_html(true); $ConfigureColumns->javascript_init(); @@ -382,13 +358,14 @@ $table_options = array('notes'=>$notes, 'configurable'=>true); # initial sort on hostnames -$table=new PlekitTable ("nodes",$headers,3+$offset, $table_options); +$table=new PlekitTable ("nodes",$headers,2, $table_options); $table->start(); $peers = new Peers ($api); // write rows foreach ($nodes as $node) { //$node_obj = new Node ($node); + $hostname=$node['hostname']; $node_id=$node['node_id']; $site_id=$node['site_id']; @@ -397,7 +374,7 @@ foreach ($nodes as $node) { $ip=$interface_hash[$node['node_id']]['ip']; $interface_id=$interface_hash[$node['node_id']]['interface_id']; $peer_id=$node['peer_id']; - + $table->row_start(); $table->cell($node['node_id'], array('display'=>'none')); if (plc_is_admin()) $table->cell(l_node_t($node_id,$node_id)); @@ -420,12 +397,13 @@ foreach ($nodes as $node) { $ConfigureColumns->cells($table, $node); $table->cell (node_status($node)); $table->row_end(); - + } $table->end(); $nifty->end(); + //plekit_linetabs ($tabs,"bottom"); // Print footer