GetNodeGroups( array($nodegroup_id)); if (empty($nodegroups)) { drupal_set_message ("NodeGroup " . $nodegroup_id . " not found"); return; } $nodegroup=$nodegroups[0]; $node_ids=$nodegroup['node_ids']; $tagname=$nodegroup['tagname']; # fetch corresponding nodes $node_columns = array("hostname","node_id"); $nodes = $api->GetNodes( $node_ids, $node_columns); $tabs ["All nodegroups"] = array ('url'=>l_nodegroups(), 'bubble'=>'All nodegroups'); $tabs ["All tags"] = array ('url'=>l_tags(), 'bubble'=>'All tags'); $tabs ["Local nodes"] = array ('url'=>l_nodes_peer('local'), 'bubble'=>'All local nodes'); drupal_set_title("Details for node group " . $nodegroup['groupname']); plc_tabs($tabs); $details=new PlcDetails(false); $details->start(); $details->th_td ("Node group name",$nodegroup['groupname']); $details->th_td ("Based on tag",href(l_tag($nodegroup['tag_type_id']),$tagname)); $details->th_td("Matching value",$nodegroup['value']); $details->th_td("# nodes",count($nodegroup['node_ids'])); $details->end(); // xxx : add & delete buttons would make sense here too plc_section("Nodes"); $headers["Hostname"]="string"; $table = new PlcTable("nodegroup_nodes",$headers,0,array('search_width'=>15)); $table->start(); if ($nodes) foreach ($nodes as $node) { $table->row_start (); $table->cell ( href (l_node ($node['node_id']),$node['hostname'])); $table->row_end (); } $table->end (); // Print footer include 'plc_footer.php'; ?>