2 <h2>All current node configuration files</h2>
8 <th width=50%>Destination File <font size=-1>[click to view/edit details]</font></th>
9 <th width=40%>Scope</th>
10 <th width=10%>Enabled</th>
15 foreach( $all_conf_files as $conf_file )
17 $conf_file_id = $conf_file['conf_file_id'];
18 $enabled = $conf_file['enabled'];
19 $dest = $conf_file['dest'];
20 $node_id = $conf_file['node_ids'];
21 $nodegroup_id = $conf_file['nodegroup_ids'];
23 if( $enabled == True )
28 // find out what the scope is for this conf file
29 if( count($node_id) == 0 && count($nodegroup_id) == 0)
31 // if there is no associate entry, its a global scope
34 if( count($nodegroup_id) == 0 && is_numeric($node_id[0]) )
36 $nodes= $api->GetNodes( $node_id, array("hostname") );
38 $hostname= $nodes[0]["hostname"];
39 $scope= "node: $hostname";
40 } elseif(count($node_id) == 0 && is_numeric($nodegroup_id[0]) )
42 $nodegroups= $api->GetNodeGroups( $nodegroup_id );
43 $group_name= $nodegroups[0]["name"];
44 $scope= "group: $group_name";
48 print( "<tr>\n<td>" );
49 print( "<a href=\"conffile/update/$conf_file_id\">$dest</a></td>\n" );
50 print( "<td>$scope</td>\n" );
51 print( "<td>$enabled</td>\n</tr>\n" );
59 <p><a href="edit.php?action=create">Create new...</a>
60 <br><a href="copy.php">Copy...</a>
61 <br><a href="delete.php">Delete...</a>
64 <h2>File scope priority</h2>
66 The following priority is applied to files that have the same destination:
68 <li>Files that have a one-node scope
69 <li>Files that have a group scope
70 <li>Files that have a global scope