-rpower tab is enabled; now it can show the state of the selected noderange;
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@3512 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
5b071e01cd
commit
23572ee151
@ -5,7 +5,9 @@ $(document).ready(function(){
|
||||
show: function(e,ui) {
|
||||
if (ui.tab.href.search('#attributes-tab$') > -1) { loadAttrTab($(ui.panel)); }
|
||||
if (ui.tab.href.search('#rvitals-tab$') > -1) { loadVitalsTab($(ui.panel)); }
|
||||
}
|
||||
}); // ends the properties passed to tabs()
|
||||
if (ui.tab.href.search('#rpower-tab$') > -1) {
|
||||
loadRpowerTab($(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'),
|
||||
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('machines','groups'));
|
||||
|
||||
echo "<div id=content>\n";
|
||||
@ -20,8 +20,9 @@ echo "<td><div id=nrtree></div></td>\n"; // nrtree is the place to put the node
|
||||
$tabs = array('Attributes' => '#attributes-tab',
|
||||
'Run Cmd' => '../manage/dsh.php?intab=1',
|
||||
'Rvitals' => '#rvitals-tab',
|
||||
'Rpower' => '#rpower-tab',
|
||||
);
|
||||
$tabsDisabled = array('Rpower' => 'rpower.php',
|
||||
$tabsDisabled = array(//'Rpower' => 'rpower.php',
|
||||
'Ping' => 'ping.php',
|
||||
'Copy' => 'copyfiles.php',
|
||||
'SP Config' => 'spconfig.php',
|
||||
@ -41,6 +42,7 @@ foreach ($tabsDisabled as $key2 => $url2) {
|
||||
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></td></tr></table>\n";
|
||||
|
||||
@ -85,4 +87,4 @@ function getGroupStatus() {
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
?>
|
||||
|
@ -19,6 +19,9 @@ function updatenoderange() {
|
||||
loadVitalsTab($('#rvitals-tab'));
|
||||
}
|
||||
}
|
||||
if (index == 3) {
|
||||
loadRpowerTab($('#rpower-tab'));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
13
xCAT-web/machines/rpower.js
Normal file
13
xCAT-web/machines/rpower.js
Normal file
@ -0,0 +1,13 @@
|
||||
// Javascript functions for the Rpower tab
|
||||
|
||||
function loadRpowerTab(panel) {
|
||||
//alert('showing rpower tab');
|
||||
var nr = '';
|
||||
if (window.noderange && window.noderange != "") {
|
||||
nr = window.noderange;
|
||||
}
|
||||
|
||||
panel.children().remove(); //get rid of the previous contents
|
||||
panel.append('<p>Loading node rpower... <img src="../images/throbber.gif"></p>');
|
||||
panel.load('rpower.php?noderange='+nr);
|
||||
}
|
@ -6,12 +6,48 @@ 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 "<FORM NAME=rpowerForm>\n";
|
||||
|
||||
//get the noderange
|
||||
$noderange = @$_REQUEST['noderange'];
|
||||
if (empty($noderange)) {
|
||||
echo "<p>Select one or more groups or nodes for rpower.</p>\n";
|
||||
exit;
|
||||
}
|
||||
//echo "<p>noderange=$noderange.</p>\n";
|
||||
|
||||
$xml = docmd('rpower', $noderange, array('stat'));
|
||||
|
||||
if (getXmlErrors($xml,$errors)) {
|
||||
echo "<p class=Error>rpower failed:", implode(' ',$errors), "</p>\n";
|
||||
exit;
|
||||
}
|
||||
//echo "<p>debug<br>";print_r($xml);echo "<br>debug end</p>\n";
|
||||
echo '<div>';
|
||||
echo "<p>";
|
||||
foreach ($xml->children() as $response) foreach ($response->children() as $o) {
|
||||
$nodename = (string)$o->name;
|
||||
if(empty($nodename)) {
|
||||
continue;
|
||||
}
|
||||
$data = & $o->data;
|
||||
$contents = (string)$data->contents;
|
||||
$desc = (string)$data->desc;
|
||||
|
||||
echo "$nodename: $contents<br>\n";
|
||||
}
|
||||
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' => ''));
|
||||
|
||||
echo "</FORM>\n";
|
||||
//echo "</FORM>\n";
|
||||
//<script type='text/javascript'>dshReady();</script>
|
||||
|
||||
insertNotDoneYet();
|
||||
?>
|
||||
//insertNotDoneYet();
|
||||
?>
|
||||
|
@ -19,6 +19,9 @@ if (getXmlErrors($xml,$errors)) { echo "<p class=Error>rvitals failed: ", implod
|
||||
echo "<p>\n";
|
||||
foreach ($xml->children() as $response) foreach ($response->children() as $o) {
|
||||
$nodename = (string)$o->name;
|
||||
if(empty($nodename)) {
|
||||
continue;
|
||||
}
|
||||
$data = & $o->data;
|
||||
$contents = (string)$data->contents;
|
||||
$desc = (string)$data->desc;
|
||||
@ -35,4 +38,4 @@ echo "</p>\n";
|
||||
//echo "<script type='text/javascript'>vitalsReady();</script>\n";
|
||||
|
||||
//insertNotDoneYet();
|
||||
?>
|
||||
?>
|
||||
|
Loading…
Reference in New Issue
Block a user