diff --git a/xCAT-web/machines/copyfiles.js b/xCAT-web/machines/copyfiles.js new file mode 100644 index 000000000..50c8bfddb --- /dev/null +++ b/xCAT-web/machines/copyfiles.js @@ -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('

Loading Copy tab...

'); + panel.load('copyfiles.php?noderange='+nr); +} + diff --git a/xCAT-web/machines/copyfiles.php b/xCAT-web/machines/copyfiles.php index 7a6e8ff11..2bada96c6 100644 --- a/xCAT-web/machines/copyfiles.php +++ b/xCAT-web/machines/copyfiles.php @@ -1,17 +1,103 @@ \n"; -//echo "\n"; +// Get the noderange +$noderange = @$_REQUEST['noderange']; +if(empty($noderange)) { echo "

Select one or more groups or nodes.

\n"; exit; } -echo "
\n"; +?> -//insertButtons(array('label' => 'Show Attributes', 'id' => 'attrButton', 'onclick' => '')); + -echo "
\n"; -// +
+

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. +

+ + + + 'Copy Files', 'id'=> 'copyButton', 'onclick' => 'copydialog()')); ?> + +
+ +

Options:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
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.
Prints starting and completion messages for each node. Useful with Streaming mode.
Verifies that nodes are responding before sending the command to them.
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.
Fanout: 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).
UserID: The user id to use to run the command on the nodes.
Remote Shell: The remote shell program to use to run the command on the nodes. The default is /usr/bin/ssh.
Shell Options: Options to pass to the remote shell being used.
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.
+ + +

Tips:

+ + +
+ + \ No newline at end of file +?> diff --git a/xCAT-web/machines/groups.js b/xCAT-web/machines/groups.js index e5ca80f6c..59d67f6fa 100644 --- a/xCAT-web/machines/groups.js +++ b/xCAT-web/machines/groups.js @@ -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() }); diff --git a/xCAT-web/machines/groups.php b/xCAT-web/machines/groups.php index ab68a67f6..ee086fb46 100644 --- a/xCAT-web/machines/groups.php +++ b/xCAT-web/machines/groups.php @@ -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 "
\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 "
\n"; echo "
\n"; echo "
\n"; echo "
\n"; +echo "
\n"; +echo "
\n"; echo "
\n"; diff --git a/xCAT-web/machines/noderangetree.js b/xCAT-web/machines/noderangetree.js index 9eeca4e50..a51bf5a72 100644 --- a/xCAT-web/machines/noderangetree.js +++ b/xCAT-web/machines/noderangetree.js @@ -25,6 +25,12 @@ function updatenoderange() { if (index == 4) { loadPingTab($('#ping-tab')); } + if (index == 5) { + loadCopyTab($('#copy-tab')); + } + if (index == 6) { + loadSPCfgTab($('#spcfg-tab')); + } } diff --git a/xCAT-web/machines/spconfig.js b/xCAT-web/machines/spconfig.js new file mode 100644 index 000000000..44231afd6 --- /dev/null +++ b/xCAT-web/machines/spconfig.js @@ -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('

Loading SP Config tab...

'); + panel.load('spconfig.php?noderange='+nr); +}