GOT NODES
"); +//print_r($nodes); + +$ConfigureColumns->fetch_live_data($nodes); + +$show_conf = explode(";",$show_configuration); +foreach ($show_conf as $ss) { + if ($ss =="columns") + $show_columns_message = '0'; +} + + + // build site_ids - interface_ids $site_ids=array(); $interface_ids=array(); @@ -102,9 +293,7 @@ $interface_filter=array('is_primary'=>TRUE,'interface_id'=>$interface_ids); $interfaces=$api->GetInterfaces($interface_filter,$interface_columns); $interface_hash=array(); -foreach ($interfaces as $interface) { - $interface_hash[$interface['node_id']]=$interface; -} +foreach ($interfaces as $interface) $interface_hash[$interface['node_id']]=$interface; // fetch related sites $site_columns=array('site_id','login_base'); @@ -112,71 +301,152 @@ $site_filter=array('site_id'=>$site_ids); $sites=$api->GetSites($site_filter,$site_columns); $site_hash=array(); -foreach ($sites as $site) { - $site_hash[$site['site_id']]=$site; -} +foreach ($sites as $site) $site_hash[$site['site_id']]=$site; // -------------------- drupal_set_title($title); -plc_tabs($tabs); +plekit_linetabs($tabs); if ( ! $nodes ) { drupal_set_message ('No node found'); return; } -$columns = array ("Peer"=>"string", - "Region"=>"string", - "Site"=>"string", - "State"=>"string", - "Hostname"=>"string", - "IP"=>"IPAddress", - "Type"=>"string", - "?"=>"string", - "Int"=>"int", - "Float"=>"float"); +$nifty=new PlekitNifty ('','objects-list','big'); +$nifty->start(); +$headers = array (); $offset=0; +$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); +//$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', + "Node table layout", + array('visible'=>$column_conf_visible, 'info_div'=>'note_columns_div')); +$toggle_nodes->start(); +print(""); +print(""); +print(""); +print(""); +print(""); +print(""); +print(""); +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. + | + |