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 'plc_minitabs.php';
19 require_once 'plc_tables.php';
21 // --------------------
22 // recognized URL arguments
23 $pattern=$_GET['pattern'];
28 $tabs['Tags'] = array('url'=>l_tags(),
29 'bubble'=>'Lists all known tag types');
30 // --------------------
35 $nodegroup_columns=array("nodegroup_id","groupname","tagname","value","node_ids");
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);
53 if ( ! $nodegroups ) {
54 drupal_set_message ('No node group found');
59 $headers = array ( "Name"=>"string",
64 # initial sort on groupname
65 plc_table_start("nodegroups",$headers,0);
67 foreach ($nodegroups as $nodegroup) {
69 $table->cell (href(l_nodegroup($nodegroup['nodegroup_id']),$nodegroup['groupname']));
70 $table->cell ($nodegroup['tagname']);
71 $table->cell ($nodegroup['value']);
72 $table->cell (count($nodegroup['node_ids']));
76 plc_table_end("nodegroups");
79 include 'plc_footer.php';