6 require_once 'plc_login.php';
8 // Get session and API handles
9 require_once 'plc_session.php';
13 require_once 'plc_drupal.php';
14 include 'plc_header.php';
17 require_once 'plc_functions.php';
18 require_once 'linetabs.php';
19 require_once 'table.php';
21 // --------------------
22 // recognized URL arguments
23 $pattern=$_GET['pattern'];
30 // --------------------
35 $nodegroup_columns=array("nodegroup_id","groupname","tagname","value","node_ids","tag_type_id");
37 // server-side filtering - set pattern in $_GET for filtering on hostname
39 $nodegroup_filter['groupname']=$pattern;
40 $title .= " matching " . $pattern;
42 $nodegroup_filter['groupname']="*";
46 $nodegroups=$api->GetNodeGroups($nodegroup_filter,$nodegroup_columns);
48 // --------------------
49 drupal_set_title($title);
51 plekit_linetabs($tabs);
53 if ( ! $nodegroups ) {
54 drupal_set_message ('No node group found');
59 $headers = array ( "Name"=>"string",
64 # initial sort on groupname
65 $table=new PlekitTable("nodegroups",$headers,0);
68 foreach ($nodegroups as $nodegroup) {
70 $table->cell (href(l_nodegroup($nodegroup['nodegroup_id']),$nodegroup['groupname']));
71 // yes, a nodegroup is not a tag, but knows enough for this to work
72 $table->cell (l_tag_obj($nodegroup));
73 $table->cell ($nodegroup['value']);
74 $table->cell (count($nodegroup['node_ids']));
80 //plekit_linetabs ($tabs,"bottom");
83 include 'plc_footer.php';