fixed some little defects
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@4011 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
1e7e3317f3
commit
75117330a2
@ -435,19 +435,6 @@ function showRMCAttrib()
|
||||
}
|
||||
}
|
||||
|
||||
function monsetupAction(plugin, action_val)
|
||||
{
|
||||
//plugin = the name of plugin
|
||||
//action = "start" or "stop" or "restart"
|
||||
$.get("monitor/setup.php", {name: plugin, action: action_val}, function(data) {
|
||||
|
||||
|
||||
$.get("monitor/updateMonList.php", {}, function(data) {
|
||||
$("#monlist").html(data);
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
function showPluginOptions()
|
||||
{
|
||||
@ -469,6 +456,18 @@ function showPluginDescription()
|
||||
})
|
||||
});
|
||||
}
|
||||
function monsetupAction(plugin, action_val)
|
||||
{
|
||||
//plugin = the name of plugin
|
||||
//action = "start" or "stop" or "restart"
|
||||
$.get("monitor/setup.php", {name: plugin, action: action_val}, function(data) {
|
||||
$.get("monitor/updateMonList.php", {}, function(data) {
|
||||
$("#monlist_table").html(data);
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// load progress bar
|
||||
myBar.loaded('xcat.js');
|
||||
|
@ -98,11 +98,17 @@ echo <<<EOS4
|
||||
<a href="provision.php">provision</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="monitor/monlist.php">monitor</a>
|
||||
<a>monitor</a>
|
||||
<ul>
|
||||
<li>
|
||||
<a href="monitor.php">syslog</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="monitor/monlist.php">Monitor Setup</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#">View Events</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
@ -512,6 +518,12 @@ echo <<<EOS
|
||||
</ul>
|
||||
<h1><a href='#' onclick='loadMainPage("monitor/monlist.php")'>Monitor</a></h1>
|
||||
<ul>
|
||||
<li><a href='#' onclick='loadMainPage("monitor.php")'>Show syslog Entries</a></li>
|
||||
<li><a href='#' onclick='loadMainPage("monitor/monlist.php")'>Monitor Setup</a></li>
|
||||
<li><a href='#' onclick=''>View Events Log</a></li>
|
||||
<li>There's only text format for events' log</li>
|
||||
<li><a href='#' onclick=''>View Performance</a></li>
|
||||
<li>There're text/graphics formats for performance view</li>
|
||||
<li>Monitoring Events/Performances by Monitoring Plugins, such as RMC...</li>
|
||||
<li>This is still <b>UNDER DEVELOPMENT</b>.</li>
|
||||
</ul>
|
||||
|
@ -98,6 +98,12 @@ function displayMonTable()
|
||||
</tr>
|
||||
</thead>
|
||||
TOS1;
|
||||
echo <<<TOS9
|
||||
<script type="text/javascript">
|
||||
showPluginOptions();
|
||||
showPluginDescription();
|
||||
</script>
|
||||
TOS9;
|
||||
echo '<tbody id="monlist">';
|
||||
displayMonitorLists();
|
||||
echo "</tbody></table></div>";
|
||||
|
@ -6,12 +6,9 @@ if(!isset($TOPDIR)) { $TOPDIR="/opt/xcat/ui";}
|
||||
require_once "$TOPDIR/lib/monitor_display.php";
|
||||
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
showPluginOptions();
|
||||
showPluginDescription();
|
||||
</script>
|
||||
|
||||
<?php
|
||||
displayMapper_mon(array('home'=>'main.php', 'monitor'=>'monitor/monlist.php'));
|
||||
displayMapper_mon(array('home'=>'main.php', 'monitor' =>'monitor/monlist.php'));
|
||||
|
||||
displayTips(array("Click the name of each plugin, you can get the plugin's description.",
|
||||
"Select one plugin, choose the options for set up monitoring ",
|
||||
@ -22,4 +19,6 @@ displayMonTable();
|
||||
insertDiv("plugin_desc");
|
||||
|
||||
insertDiv("options");
|
||||
|
||||
insetDiv("view"); //display options to the users for viewing event log & performance in text/graphics format
|
||||
?>
|
@ -12,7 +12,7 @@ require_once "$TOPDIR/lib/display.php";
|
||||
require_once "$TOPDIR/lib/monitor_display.php";
|
||||
|
||||
|
||||
displayMapper_mon(array('home'=>'main.php', 'monitor'=>'monitor/monlist.php'));
|
||||
displayMapper_mon(array('home'=>'main.php', 'monitor' =>'monitor/monlist.php'));
|
||||
|
||||
displayTips(array(
|
||||
"All the conditions and the responses are here;",
|
||||
|
26
xCAT-UI/monitor/rmc_lsevent.php
Normal file
26
xCAT-UI/monitor/rmc_lsevent.php
Normal file
@ -0,0 +1,26 @@
|
||||
<?php
|
||||
/*
|
||||
* monstart.php
|
||||
* to display the web page for the command "monstart" and the command "monstop" for the selected plugins
|
||||
* the link looks like "monitor/monstart.php?name=rmcmon".
|
||||
*/
|
||||
if(!isset($TOPDIR)) { $TOPDIR="/opt/xcat/ui";}
|
||||
|
||||
require_once "$TOPDIR/lib/security.php";
|
||||
require_once "$TOPDIR/lib/functions.php";
|
||||
require_once "$TOPDIR/lib/display.php";
|
||||
require_once "$TOPDIR/lib/monitor_display.php";
|
||||
|
||||
$name = $_REQUEST['name'];
|
||||
|
||||
//echo $name;
|
||||
|
||||
displayMapper_mon(array('home'=>'main.php', 'monitor' =>'monitor/monlist.php'));
|
||||
|
||||
displayTips(array(""));
|
||||
|
||||
|
||||
displayStatus();
|
||||
|
||||
insertButtons(array('label' => 'Next', 'id'=> 'next', 'onclick'=>''));
|
||||
?>
|
@ -10,7 +10,7 @@ require_once "$TOPDIR/lib/functions.php";
|
||||
require_once "$TOPDIR/lib/display.php";
|
||||
require_once "$TOPDIR/lib/monitor_display.php";
|
||||
|
||||
displayMapper_mon(array('home'=>'main.php', 'monitor'=>'monitor/monlist.php'));
|
||||
displayMapper_mon(array('home'=>'main.php', 'monitor' =>'monitor/monlist.php'));
|
||||
|
||||
displayTips(array("All the available RMC resources are listed here;",
|
||||
"Edit this table to define the RMC performance monitoring;",
|
||||
|
@ -11,38 +11,26 @@ require_once "$TOPDIR/lib/functions.php";
|
||||
require_once "$TOPDIR/lib/display.php";
|
||||
require_once "$TOPDIR/lib/monitor_display.php";
|
||||
|
||||
$xml = docmd("monls"," ", array('-a'));
|
||||
if(getXmlErrors($xml,$errors)) {
|
||||
echo "<p class=Error>",implode(' ', $errors), "</p>";
|
||||
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 "<tr class='ListLine$ooe' id='row$line'>";
|
||||
echo "<td><input type='radio' name='plugins' value='$name' /></td>";
|
||||
echo "<td ><a class='description' href='#'>$name</a></td>";
|
||||
echo "<td >$stat</td>";
|
||||
if(isset($nodemonstatus)) { echo "<td >Enabled</td>";}else {echo "<td >Disabled</td>";}
|
||||
echo "<td>";
|
||||
$name_str = "\"$name\"";
|
||||
if($stat == "monitored") {
|
||||
$act_str = "\"stop\"";
|
||||
insertButtons(array('label'=>'Stop', 'id'=>'stop', 'onclick'=>"monsetupAction($name_str, $act_str)"));
|
||||
$act_str = "\"restart\"";
|
||||
insertButtons(array('label'=>'Restart', 'id'=>'restart', 'onclick'=>"monsetupAction($name_str, $act_str)"));
|
||||
}else {
|
||||
$act_str = "\"start\"";
|
||||
insertButtons(array('label' => 'Start', 'id'=>'start', 'onclick' => "monsetupAction($name_str, $act_str)"));
|
||||
}
|
||||
echo "</td>";
|
||||
echo " </tr>";
|
||||
$ooe++;
|
||||
$line++;
|
||||
//echo "<tr><td><input type='checkbox' />$name</td><td>$stat</td><td><a onclick='LoadMainPage("main.php")'>$name</a></td></tr>";
|
||||
}
|
||||
echo <<<TOS1
|
||||
<table id="tabTable" class="tabTable" cellspacing="1">
|
||||
<thead>
|
||||
<tr class="colHeaders">
|
||||
<td></td>
|
||||
<td>Plug-in Name</td>
|
||||
<td>Status</td>
|
||||
<td>Node Status Monitoring</td>
|
||||
<td>Action</td>
|
||||
</tr>
|
||||
</thead>
|
||||
TOS1;
|
||||
echo <<<TOS9
|
||||
<script type="text/javascript">
|
||||
showPluginOptions();
|
||||
showPluginDescription();
|
||||
</script>
|
||||
TOS9;
|
||||
echo '<tbody id="monlist">';
|
||||
displayMonitorLists();
|
||||
echo "</tbody></table>";
|
||||
|
||||
?>
|
||||
|
Loading…
Reference in New Issue
Block a user