code related with monitor interface is put here.
*/
function displayMapper_mon($mapper)
{
//display the Mapper for monitoring interface;
//the argument $mapper is an array
//$mapper = {
// "home" => "main.php",
// "Monitor" => "monitor/monlist.php",
//};
echo "
";
}
#displayMonitorLists() will generate all the monitoring plug-ins,
#the user can select the plug-ins he wants to operate on,
#and press the "Next" button;
function displayMonitorLists() {
#The command "monls -a" is used to get the monitoring plug-ins list
$xml = docmd("monls"," ", array('-a'));
if(getXmlErrors($xml,$errors)) {
echo "
",implode(' ', $errors), "
";
exit;
}
#then, parse the xml data
$ooe = 0;
$line = 0;
foreach($xml->children() as $response) foreach($response->children() as $data) {
list($name, $stat, $nodemonstatus) = preg_split("/\s+/", $data);
$ooe = $ooe%2;
echo "
";
}
return 0;
}
function displayTips($tips)
{
//to tell the user how to operate on the current web page
//the argument $tips is an array like this:
//{
// "Click the name of each plugin, you can get the plugin's description.",
// "You can also select one plugin, then you can set node/application status monitoring for the selected plugin.",
//}
echo '
Tips:
';
foreach ($tips as $tip) {
echo "
$tip
";
echo "\n";
}
echo '
';
return 0;
}
function displayDialog($id, $title)
{
//add one new
to display jQuery dialog;
echo "";
return 0;
}
function displayMonTable()
{
//create one table to display the monitoring plugins' list
echo '
';
echo <<
Plug-in Name
Status
Node Status Monitoring
Action
TOS1;
echo '';
displayMonitorLists();
echo "
";
return 0;
}
function display_stat_mon_table($args)
{
//create one table to disable or enable node/application monitoring
//the argument $args are one array like this:
//{ 'xcatmon' => {
// 'nodestat' => 'Enabled',
// 'appstat' => 'Disabled',
// },
//};
//
echo '
';
}
function displayStatus()
{
//tell the user that the current interface is not done yet...
echo "
This interface is still under development -use accordingly.
";
}
function displayOSITree()
{
//display the node range tree, but only with the nodes with OSI type
//this follows the function displayNrTree();
//it doesn't work on firefox!!!
echo <<
$(init_ositree());
EOS3;
}
function displayAssociation()
{
echo '
";
exit;
}
foreach($xml->children() as $response) foreach($response->children() as $data) {
//get all the class name
$classes = explode("=", $data);
}
$ooe = 0;
$line = 0;
foreach($classes as $class) {
$ooe = $ooe%2;
echo "
";
echo "
";
echo "
$class
";
echo "
";
$ooe++;
$line++;
}
echo "
";
return 0;
}
function displayRMCAttr()
{
echo "
Select the RMC Resource, you will see all its available attributes here.