\n"; insertButtons( array('label' => 'Attributes', 'onclick' => ''), array('label' => 'Create Group', 'onclick' => ''), array('label' => 'Ping', 'onclick' => ''), //'Updatenode', array('label' => 'Run Cmd', 'onclick' => ''), array('label' => 'Copy Files', 'onclick' => ''), array('label' => 'Sync Files', 'onclick' => '') ); insertButtons( //'Soft Maint', array('label' => 'HW Ctrl', 'onclick' => ''), array('label' => 'RSA/MM/FSP', 'onclick' => ''), array('label' => 'Deploy', 'onclick' => ''), array('label' => 'Diagnose', 'onclick' => ''), array('label' => 'Remove', 'onclick' => '') ); /* array( 'name=propButton value="Attributes"', 'name=defineButton value="Create Like"', 'name=createGroupButton value="Create Group"', 'name=pingNodesButton value="Ping"', //'name=updateButton value="Updatenode"', 'name=runcmdButton value="Run Cmd"', 'name=copyFilesButton value="Copy Files"' ), array( //'name=softMaintButton value="Soft Maint" onclick="this.form.nodesNeeded=1;"', 'name=hwctrlButton value="HW Ctrl"', 'name=rsaButton value="RSA/MM/FSP" onclick="this.form.nodesNeeded=1;"', 'name=installButton value="Install"', 'name=perfmonButton value="Perf Mon"', //'name=webminButton value="Webmin" onclick="this.form.nodesNeeded=1;"', 'name=diagButton value="Diagnose" onclick="this.form.nodesNeeded=1;"', 'name=removeButton value="Remove"' ), */ echo '
Good | '; echo ' | Possible problem | '; echo ' | Problem | '; echo ' | Unknown | '; echo '
line=$line
"; $vals = array(); preg_match('/^"([^"]*)","([^"]*)",(.*)$/', $line, $vals); //todo: create function to parse tabdump output better if (count($vals) > 3) { //$node = $vals[1]; $grplist = preg_split('/,/', $vals[2]); $rest = $vals[3]; $status = array(); preg_match('/^"([^"]*)"/', $rest, $status); if (count($status) < 2) { $status[1] = 'unknown'; } foreach ($grplist as $g) { if (array_key_exists($g,$groups)) { $groups[$g] = minStatus($groups[$g], $status[1]); } else { $groups[$g] = $status[1]; } } } } return $groups; } ?>