//

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 "
"; if($name == "rmcmon") {//special cases for RMCMON echo "

RMC Event Monitor Setting

"; echo "
"; echo <<

RMC Event configuration is independent from the monstart/monstop command

To make your change effect, you don't need to restart RMC plugin

TOS11; showRMCAssocTab(); echo "

click the REDIRECT button to go to the configure web page

"; echo ""; echo "
"; echo "

The Available RMC Resources and their attributes

"; echo <<

For your convenience, all the available RMC Resources and their attributes will list here

TOS15; } echo ""; } /* showRMCAssocTab() * is used to display all the current associations of RMC conditions&responses */ function showRMCAssocTab() { 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 << $(function() { setMonsettingTab(); }); TOS22; 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"; echo "
"; $_SESSION["editable-$tab"] = & $editable; # save the array so we can access it in the next call of this file or change.php echo "

"; echo ""; echo ""; echo "

"; echo ""; echo ""; echo "
"; echo "

\n"; } ?>