-ping tab is added; ping tab need the support of web.pm;
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@3536 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
f1b0bc933a
commit
8b5dd1b4c9
@ -7,7 +7,10 @@ $(document).ready(function(){
|
||||
if (ui.tab.href.search('#rvitals-tab$') > -1) { loadVitalsTab($(ui.panel)); }
|
||||
if (ui.tab.href.search('#rpower-tab$') > -1) {
|
||||
loadRpowerTab($(ui.panel));
|
||||
}
|
||||
}
|
||||
if (ui.tab.href.search('#ping-tab$') > -1) {
|
||||
loadPingTab($(ui.panel));
|
||||
}
|
||||
}}); // ends the properties passed to tabs()
|
||||
});
|
||||
|
||||
|
@ -7,7 +7,7 @@ require_once "$TOPDIR/lib/functions.php";
|
||||
if (isAIX()) { $aixDisabled = 'disabled'; }
|
||||
|
||||
insertHeader('xCAT Groups and Nodes', array("$TOPDIR/jq/jsTree/tree_component.css",'groups.css','attributes.css',"$TOPDIR/manage/dsh.css"),
|
||||
array("$TOPDIR/jq/jsTree/css.js","$TOPDIR/jq/jsTree/jquery.listen.js","$TOPDIR/jq/jsTree/tree_component.js","$TOPDIR/jq/jquery.cookie.js",'noderangetree.js','groups.js','attributes.js','rvitals.js','rpower.js'),
|
||||
array("$TOPDIR/jq/jsTree/css.js","$TOPDIR/jq/jsTree/jquery.listen.js","$TOPDIR/jq/jsTree/tree_component.js","$TOPDIR/jq/jquery.cookie.js",'noderangetree.js','groups.js','attributes.js','rvitals.js','rpower.js','ping.js'),
|
||||
array('machines','groups'));
|
||||
|
||||
echo "<div id=content>\n";
|
||||
@ -21,9 +21,10 @@ $tabs = array('Attributes' => '#attributes-tab',
|
||||
'Run Cmd' => '../manage/dsh.php?intab=1',
|
||||
'Rvitals' => '#rvitals-tab',
|
||||
'Rpower' => '#rpower-tab',
|
||||
'Ping' => '#ping-tab',
|
||||
);
|
||||
$tabsDisabled = array(//'Rpower' => 'rpower.php',
|
||||
'Ping' => 'ping.php',
|
||||
//'Ping' => 'ping.php',
|
||||
'Copy' => 'copyfiles.php',
|
||||
'SP Config' => 'spconfig.php',
|
||||
'Diagnose' => 'diagnode.php',
|
||||
@ -43,6 +44,7 @@ echo "</ul>\n";
|
||||
echo "<div id='attributes-tab'></div>\n";
|
||||
echo "<div id='rvitals-tab'></div>\n";
|
||||
echo "<div id='rpower-tab'></div>\n";
|
||||
echo "<div id='ping-tab'></div>\n";
|
||||
|
||||
echo "</div></td></tr></table>\n";
|
||||
|
||||
|
@ -22,6 +22,9 @@ function updatenoderange() {
|
||||
if (index == 3) {
|
||||
loadRpowerTab($('#rpower-tab'));
|
||||
}
|
||||
if (index == 4) {
|
||||
loadPingTab($('#ping-tab'));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -5,13 +5,62 @@ require_once "$TOPDIR/lib/functions.php";
|
||||
|
||||
//echo "<LINK rel=stylesheet href='$TOPDIR/manage/dsh.css' type='text/css'>\n";
|
||||
//echo "<script type='text/javascript' src='$TOPDIR/manage/dsh.js'></script>\n";
|
||||
echo "<LINK rel=stylesheet href='$TOPDIR/jq/theme/jquery-ui-themeroller.css' type='text/css'>\n";
|
||||
echo "<script type='text/javascript' src='$TOPDIR/jq/jquery.min.js'></script>\n";
|
||||
echo "<script type='text/javascript' src='$TOPDIR/jq/jquery-ui-all.min.js'></script>\n";
|
||||
//use the attributes.css for help
|
||||
echo "<LINK rel=stylesheet href='$TOPDIR/machines/attributes.css' type='text/css'>\n";
|
||||
|
||||
echo "<FORM NAME=pingForm>\n";
|
||||
echo <<<CSS1
|
||||
<style>
|
||||
body {font-size: 8pt; }
|
||||
</style>
|
||||
CSS1;
|
||||
|
||||
//Get the noderange
|
||||
$noderange = @$_REQUEST['noderange'];
|
||||
if(empty($noderange)) { echo "<p>Select one or more groups or nodes for ping.</p>\n"; exit; }
|
||||
|
||||
//pping is one local command, which doesn't use xcat client/server protocol;
|
||||
$xml = docmd('webrun',$noderange,array("pping $noderange",));#The default pping option is NULL
|
||||
|
||||
if(getXmlErrors($xml,$errors)) { echo "<p class=Error>ping failed: ", implode(' ',$errors), "</p>\n"; exit; }
|
||||
|
||||
//show the result of "pping"
|
||||
//TODO
|
||||
echo "<p>\n";
|
||||
echo <<<TAB1
|
||||
<table id=nodeAttrTable>
|
||||
<tr class='colHeaders'>
|
||||
<th>Node Name</th>
|
||||
<th>Ping Status</th>
|
||||
</tr>
|
||||
TAB1;
|
||||
foreach ($xml->children() as $response) foreach ($response->children() as $o) {
|
||||
$nodename=$o->name;
|
||||
if(empty($nodename)) {
|
||||
continue;
|
||||
}
|
||||
$contents = $o->data->contents;
|
||||
//echo "$nodename: $contents<br>\n";
|
||||
echo "<tr>\n";
|
||||
echo "<td>$nodename</td>";
|
||||
echo "<td>$contents</td>";
|
||||
echo "</tr>\n";
|
||||
|
||||
//echo "$nodename: $contents<br>\n";
|
||||
}
|
||||
echo <<<TAB2
|
||||
</table>
|
||||
TAB2;
|
||||
echo "</p>\n";
|
||||
|
||||
//echo "<FORM NAME=pingForm>\n";
|
||||
|
||||
//insertButtons(array('label' => 'Show Attributes', 'id' => 'attrButton', 'onclick' => ''));
|
||||
|
||||
echo "</FORM>\n";
|
||||
//echo "</FORM>\n";
|
||||
//<script type='text/javascript'>dshReady();</script>
|
||||
|
||||
insertNotDoneYet();
|
||||
?>
|
||||
//insertNotDoneYet();
|
||||
?>
|
||||
|
@ -5,7 +5,7 @@ require_once "$TOPDIR/lib/functions.php";
|
||||
|
||||
//echo "<LINK rel=stylesheet href='$TOPDIR/manage/dsh.css' type='text/css'>\n";
|
||||
//echo "<script type='text/javascript' src='$TOPDIR/manage/dsh.js'></script>\n";
|
||||
|
||||
echo "<LINK rel=stylesheet href='$TOPDIR/machines/attributes.css' type='text/css'>\n";
|
||||
|
||||
//get the noderange
|
||||
$noderange = @$_REQUEST['noderange'];
|
||||
@ -24,6 +24,13 @@ if (getXmlErrors($xml,$errors)) {
|
||||
//echo "<p>debug<br>";print_r($xml);echo "<br>debug end</p>\n";
|
||||
echo '<div>';
|
||||
echo "<p>";
|
||||
echo <<<TAB1
|
||||
<table id=nodeAttrTable>
|
||||
<tr class='colHeaders'>
|
||||
<th>Node Name</th>
|
||||
<th>Rpower Status</th>
|
||||
</tr>
|
||||
TAB1;
|
||||
foreach ($xml->children() as $response) foreach ($response->children() as $o) {
|
||||
$nodename = (string)$o->name;
|
||||
if(empty($nodename)) {
|
||||
@ -33,15 +40,20 @@ foreach ($xml->children() as $response) foreach ($response->children() as $o) {
|
||||
$contents = (string)$data->contents;
|
||||
$desc = (string)$data->desc;
|
||||
|
||||
echo "$nodename: $contents<br>\n";
|
||||
echo "<tr>\n";
|
||||
echo "<td>$nodename</td>";
|
||||
echo "<td>$contents</td>";
|
||||
echo "</tr>\n";
|
||||
|
||||
//echo "$nodename: $contents<br>\n";
|
||||
}
|
||||
|
||||
echo <<<TAB2
|
||||
</table>
|
||||
TAB2;
|
||||
echo "</p>\n";
|
||||
echo "</div>\n";
|
||||
|
||||
//echo '<div>';
|
||||
//echo "<p>Rpower Actions</p>";
|
||||
//echo "</div>\n";
|
||||
|
||||
//echo "<FORM NAME=rpowerForm>\n";
|
||||
|
||||
//insertButtons(array('label' => 'Show Attributes', 'id' => 'attrButton', 'onclick' => ''));
|
||||
|
@ -27,7 +27,7 @@ foreach ($xml->children() as $response) foreach ($response->children() as $o) {
|
||||
$desc = (string)$data->desc;
|
||||
//echo "<p>"; print_r($data); echo "</p>\n";
|
||||
echo "$nodename: $desc: $contents<br>\n";
|
||||
}
|
||||
}
|
||||
echo "</p>\n";
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user