//

All the options for configuration are here.

//

choose the options to update them

// // //TOS11; echo "
"; echo << $(function() { $("#accordion").accordion({autoHeight: false}); });

Application Monitor Setting

The configuration for application status monitoring has not been implemented; We will consider it later!

The monsetting table Setting

TOS10; showMonsettingTab(); echo "
"; echo "
"; } function showPluginView($name) { //TODO } function updatePluginStat($name) { $xml = docmd("monls", "", array("$name")); foreach($xml->children() as $response) foreach($response->children() as $data) { $result = preg_split("/\s+/", $data); if($result[0] == $name && $result[1] == "not-monitored") { echo "Disabled"; }else { echo "Enabled"; } } } function showPluginDesc($name) { //TODO: many "return" keys are missed in the response. //We have to figure them out $xml = docmd("monls"," ", array("$name", "-d")); if (getXmlErrors($xml, $errors)) { echo "

monls failed: ", implode(' ',$errors), "

\n"; exit; } $information = ""; foreach ($xml->children() as $response) foreach ($response->children() as $data) { $information .="

$data

"; } echo $information; } /* * changePluginStat($name) * which is used to enable/disable the selected plugin, * and which return whether they're sucessful or not */ function showPluginStat($name, $opt) { //display the nrtree here //let the user choose node/noderange to enable/disable monitor plugin echo "
"; echo "
"; echo << monPluginSetStat(); $('input').customInput(); TOS1; if($opt == 'enable') { //monadd: xcatmon has special options //moncfg //"moncfg rmcmon -r" is necessary for rmcmon //monstart echo "

The $name Plugin is in Disabled status

"; echo "

You can Press the Following button to change its status

"; echo "

Select the noderange from the right tree

"; echo "

OR: you can type the noderange in the following area

"; echo "
"; insertNRTextEntry(); echo "

When you are trying to enable the plugin

would you like to support node status monitoring?

"; insertRadioBtn(); insertButtonSet("Enable","Disable", 0); }else if($opt == 'disable') { //monstop //mondecfg echo "

The $name Plugin is in Enabled status

"; echo "

You can Press the Following button to change its status

"; echo "

Select the noderange from the right tree

"; echo "

OR: you can type the noderange in the following area

"; echo "
"; insertNRTextEntry(); echo "

When you are trying to enable the plugin

would you like to support node status monitoring?

"; insertRadioBtn(); insertButtonSet("Enable","Disable", 1); } echo ""; } function insertRadioBtn() { //to provide the choose to support "-n"(node status monitoring) echo <<
TOS21; } function insertNRTextEntry() { echo ""; } function insertButtonSet($state1, $state2, $default) { echo ""; echo "
"; if($default == 0) { echo ""; echo ""; }else { echo ""; echo ""; } echo "
"; } function showNRTreeInput() { echo "
"; echo << $(function() { nrtree = new tree_component(); // -Tree begin nrtree.init($("#nrtree-input"),{ rules: { multiple: "Ctrl" }, ui: { animation: 250 }, callback : { onchange : printtree }, data : { type : "json", async : "true", url: "noderangesource.php" } }); //Tree finish }); TOS3; echo "
"; } function showMonsettingTab() { $tab = "monsetting"; echo "
"; $xml = docmd('tabdump', '', array($tab)); echo "\n"; echo << TOS00; // $headers = getTabHeaders($xml); // if(!is_array($headers)){ die("

Can't find header line in $tab

"); } // echo "
name key value comments disable
\n"; // #echo "
\n"; // echo "\n"; # extra cell for the red x // #echo "\n"; # extra cell for the red x // foreach($headers as $colHead) {echo ""; } // echo "\n"; # close header row // #echo ""; $tableWidth = count($headers); $ooe = 0; $item = 0; $line = 0; $editable = array(); foreach($xml->children() as $response) foreach($response->children() as $arr){ $arr = (string) $arr; if(ereg("^#", $arr)){ $editable[$line++][$item] = $arr; continue; } $cl = "ListLine$ooe"; $values = splitTableFields($arr); # X row echo ""; foreach($values as $v){ echo ""; $editable[$line][$item++] = $v; } echo "\n"; $line++; $item = 0; $ooe = 1 - $ooe; } echo "
$colHead
$v
\n"; $_SESSION["editable-$tab"] = & $editable; # save the array so we can access it in the next call of this file or change.php echo "

"; echo ""; insertButtonSet("Apply", "Cancel", 0); echo "

\n"; } ?>