-the COPY/spconfig tabs in nodes/groups webpage are in development

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@3596 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
mxi1 2009-06-17 09:45:13 +00:00
parent 8c3ef7a1c9
commit b1744c4d18
6 changed files with 136 additions and 12 deletions

View File

@ -0,0 +1,14 @@
// Javascript functions for the Ping tab
function loadCopyTab(panel) {
//alert('showing Copy tab');
var nr = '';
if (window.noderange && window.noderange != "") {
nr = window.noderange;
}
panel.children().remove(); //get rid of the previous contents
panel.append('<p>Loading Copy tab... <img src="../images/throbber.gif"></p>');
panel.load('copyfiles.php?noderange='+nr);
}

View File

@ -1,17 +1,103 @@
<?php
// Show some key attributes of the selected nodes
$TOPDIR = '..';
$expire_time = gmmktime(0,0,0,1,1,2038);
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";
// Get the noderange
$noderange = @$_REQUEST['noderange'];
if(empty($noderange)) { echo "<p>Select one or more groups or nodes.</p>\n"; exit; }
echo "<FORM NAME=copyForm>\n";
?>
//insertButtons(array('label' => 'Show Attributes', 'id' => 'attrButton', 'onclick' => ''));
</script>
echo "</FORM>\n";
//<script type='text/javascript'>dshReady();</script>
<FORM NAME=copyForm>
<p>Select the files, copy from or to multiple nodes.
In addtion, an option is provided to use rsync to update the files on the nodes,
or to an installation image on the local node.
</p>
<script type="text/javascript">
$.ui.dialog.defaults.bgiframe = true;
var diagOpts = {
bgiframe: true,
modal: true,
//autoOpen: false,
};
$(function() {
$("#copyDialog").dialog(diagOpts);
});
function copydialog() {
$("#copyDialog").dialog("show");
}
</script>
<?php insertButtons(array('label' => 'Copy Files', 'id'=> 'copyButton', 'onclick' => 'copydialog()')); ?>
<div id="copyDialog" title="This is the tile" class="flora"></div>
<h3>Options:</h3>
<TABLE id=inner_table cellspacing=0 cellpadding=5>
<TR>
<TD valign=top nowrap><label><INPUT type=checkbox name=serial id=serial>Streaming mode</label></TD>
<TD>Specifies that output is returned as it becomes available from each target, instead of waiting for the command to be completed on a target before returning output from that target.</TD>
</TR>
<TR>
<TD valign=top nowrap><label><INPUT type=checkbox name=monitor id=monitor>Monitor</label></TD>
<TD>Prints starting and completion messages for each node. Useful with Streaming mode.</TD>
</TR>
<TR>
<TD valign=top nowrap><label><INPUT type=checkbox name=verify id=verify>Verify</label></TD>
<TD>Verifies that nodes are responding before sending the command to them.</TD>
</TR>
<TR>
<TD valign=top nowrap><label><INPUT type=checkbox name=collapse id=collapse disabled>Collaspe Identical Output</label></TD>
<TD>Automatically pipe the xdsh output into xdshbak which will only display output once for all the nodes that display identical output. See the xdshbak man page for more info.</TD>
</TR>
<TR>
<TD valign=top nowrap>Fanout: <INPUT type=text name=fanout id=fanout></TD>
<TD>The maximum number of nodes the command should be run on concurrently. When the command finishes on 1 of the nodes, it will be started on an additional node (the default is 64).</TD>
</TR>
<TR>
<TD valign=top nowrap>UserID: <INPUT type=text name=userID id=userID></TD>
<TD>The user id to use to run the command on the nodes.</TD>
</TR>
<TR>
<TD valign=top nowrap>Remote Shell: <INPUT type=text name=rshell id=rshell></TD>
<TD>The remote shell program to use to run the command on the nodes. The default is /usr/bin/ssh.</TD>
</TR>
<TR>
<TD valign=top nowrap>Shell Options: <INPUT type=text name=shell_opt id=shell_opt></TD>
<TD>Options to pass to the remote shell being used.</TD>
</TR>
<TR>
<TD valign=top nowrap><label><INPUT type=checkbox name=ret_code id=ret_code>Return Code</label></TD>
<TD>Prints the return code of the (last) command that was run remotely on each node. The return code is appended at the end of the output for each node.</TD>
</TR>
</TABLE>
<h3>Tips:</h3>
<UL>
<li>See the <a href="<?php echo getDocURL('manpage','xdcp.1'); ?>">xdcp man page</a> for more information about this command.</li>
</UL>
</FORM>
<?php
insertNotDoneYet();
?>
?>

View File

@ -11,6 +11,12 @@ $(document).ready(function(){
if (ui.tab.href.search('#ping-tab$') > -1) {
loadPingTab($(ui.panel));
}
if (ui.tab.href.search('#copy-tab$') > -1) {
loadCopyTab($(ui.panel));
}
if (ui.tab.href.search('#spcfg-tab$') > -1) {
loadSPCfgTab($(ui.panel));
}
}}); // ends the properties passed to tabs()
});

View File

@ -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','ping.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','copyfiles.js','spconfig.js'),
array('machines','groups'));
echo "<div id=content>\n";
@ -22,11 +22,10 @@ $tabs = array('Attributes' => '#attributes-tab',
'Rvitals' => '#rvitals-tab',
'Rpower' => '#rpower-tab',
'Ping' => '#ping-tab',
'Copy' => '#copy-tab',
'SP Config' => '#spcfg-tab',
);
$tabsDisabled = array(//'Rpower' => 'rpower.php',
//'Ping' => 'ping.php',
'Copy' => 'copyfiles.php',
'SP Config' => 'spconfig.php',
$tabsDisabled = array(
'Diagnose' => 'diagnode.php',
'Add/Remove' => 'addremove.php',
);
@ -45,6 +44,8 @@ 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 id='copy-tab'></div>\n";
echo "<div id='spcfg-tab'></div>\n";
echo "</div></td></tr></table>\n";

View File

@ -25,6 +25,12 @@ function updatenoderange() {
if (index == 4) {
loadPingTab($('#ping-tab'));
}
if (index == 5) {
loadCopyTab($('#copy-tab'));
}
if (index == 6) {
loadSPCfgTab($('#spcfg-tab'));
}
}

View File

@ -0,0 +1,11 @@
function loadSPCfgTab(panel) {
//alert('showing ping tab');
var nr = '';
if (window.noderange && window.noderange != "") {
nr = window.noderange;
}
panel.children().remove(); //get rid of the previous contents
panel.append('<p>Loading SP Config tab... <img src="../images/throbber.gif"></p>');
panel.load('spconfig.php?noderange='+nr);
}