diff --git a/xCAT-web/lib/functions.php b/xCAT-web/lib/functions.php
index ebb91206d..8ea0a5aba 100644
--- a/xCAT-web/lib/functions.php
+++ b/xCAT-web/lib/functions.php
@@ -76,10 +76,9 @@ $MENU = array(
'default' => 'groups',
'list' => array(
'lab' => array('label' => 'Lab Floor', 'url' => "$TOPDIR/machines/lab.php"),
- 'frames' => array('label' => 'Frames', 'url' => "$TOPDIR/machines/frames.php"),
- 'groups' => array('label' => 'Groups', 'url' => "$TOPDIR/machines/groups.php"),
- 'nodes' => array('label' => 'Nodes', 'url' => "$TOPDIR/machines/nodes.php"),
- 'layout' => array('label' => 'Layout', 'url' => "$TOPDIR/machines/layout.php"),
+ 'frames' => array('label' => 'Racks', 'url' => "$TOPDIR/machines/frames.php"),
+ 'groups' => array('label' => 'Groups/Nodes', 'url' => "$TOPDIR/machines/groups.php"),
+ 'discover' => array('label' => 'Discover', 'url' => "$TOPDIR/machines/discover.php"),
)
),
'manage' => array(
@@ -127,7 +126,7 @@ $MENU = array(
'default' => 'diagnose',
'list' => array(
'diagnose' => array('label' => 'Diagnose', 'url' => "$TOPDIR/support/diagnose.php"),
- 'update' => array('label' => 'Update', 'url' => "$TOPDIR/support/update.php"),
+ 'update' => array('label' => 'Update', 'url' => "$TOPDIR/support/updategui.php"),
'howtos' => array('label' => 'HowTos', 'url' => getDocURL('howto')),
'manpages' => array('label' => 'Man Pages', 'url' => getDocURL('manpage')),
'maillist' => array('label' => 'Mail List', 'url' => getDocURL('web','mailinglist')),
diff --git a/xCAT-web/lib/style.css b/xCAT-web/lib/style.css
index 1d07940c2..898dc571f 100644
--- a/xCAT-web/lib/style.css
+++ b/xCAT-web/lib/style.css
@@ -221,7 +221,7 @@ a.button {
background: transparent url('../images/bg_button_a.gif') no-repeat scroll top right;
color: #444;
display: block;
- float: left;
+ /* float: left; */
font: normal 12px arial, sans-serif;
height: 24px;
margin-right: 6px;
diff --git a/xCAT-web/lib/wizard.css b/xCAT-web/lib/wizard.css
new file mode 100644
index 000000000..046881670
--- /dev/null
+++ b/xCAT-web/lib/wizard.css
@@ -0,0 +1,29 @@
+
+/* Styles specific to the wizards */
+
+#outerWizardPane {
+ /* position: relative; so the h3 inside can be absolute to this div */
+ /* border: 1px solid black; */
+ background-color: #CCCCFF;
+ margin: 0px 20px 15px 20px;
+ padding: 5px 0px;
+}
+
+#wizardHeading { /* the inner pane where the wizard page contents goes */
+ /* position: absolute; move this up so it is part of the outerWizardPane border
+ top: -25px;
+ left: 50px;
+ background-color: white;
+ padding: 0px 5px; */
+ margin-bottom: 5px;
+}
+
+#wizardPane {
+ background-color: white;
+ padding: 10px 0px;
+ margin-bottom: 5px;
+}
+
+.NonCurrentSummaryItem {}
+
+.CurrentSummaryItem { background-color: yellow; }
diff --git a/xCAT-web/lib/wizard.php b/xCAT-web/lib/wizard.php
new file mode 100644
index 000000000..2041cfc7f
--- /dev/null
+++ b/xCAT-web/lib/wizard.php
@@ -0,0 +1,91 @@
+ 'Page One',
+ 'two' => 'Page Two',
+ 'three' => 'Page Three',
+ );
+*/
+
+function displayWizard($pages) {
+$keys = array_keys($pages);
+
+if (isset($_REQUEST['page'])) { // navigate to another page in the wizard
+ $page = $_REQUEST['page'];
+ $action = $_REQUEST['action'];
+
+ // Figure out the function for this page. Search the keys.
+ $k = array_search($page, $keys);
+ if ($k === FALSE) { msg('E',"Page $page not found in the wizard."); exit; }
+ if ($action == 'back') {
+ $k--;
+ if ($k < 0) { msg('E',"Can't go backward past the 1st page ($page)."); exit; }
+ }
+ elseif ($action == 'next') {
+ $k++;
+ if ($k >= count($pages)) { $k = 0; } // this was the Finish button - go back to the beginning
+ }
+ elseif ($action == 'cancel') {
+ $k = 0;
+ //todo: unset all the _SESSION variables
+ }
+
+ // Run the function for this page
+ $keys[$k]();
+ configureButtons($k, $pages);
+}
+
+else { // initial display of the wizard - show the 1st page
+
+echo "
\n";
+echo "
";
+$text = array();
+foreach ($keys as $k => $key) { $text[] = "$pages[$key]"; }
+echo implode(' -> ', $text);
+echo "
\n";
+echo "
", $pages[$keys[0]], "
\n";
+
+echo "
\n";
+// The contents of the specific page goes in here
+$keys[0]();
+echo "
\n"; // end the inner wizard pane
+
+// Add the wizard decorations
+insertButtons(
+ array('label' => 'Back', 'otherattrs' => 'id=backButton', 'onclick' => '$("#wizardPane").load("?page="+document.currentPage+"&action=back");'),
+ array('label' => 'Next', 'otherattrs' => 'id=nextButton', 'onclick' => '$("#wizardPane").load("?page="+document.currentPage+"&action=next");'),
+ array('label' => 'Cancel', 'onclick' => '$("#wizardPane").load("?page="'.$keys[0].'"&action=cancel");')
+ );
+configureButtons(0, $pages);
+echo "
\n"; // end the outer wizard pane
+}
+} // end of displayWizard()
+
+
+//-----------------------------------------------------------------------------
+// Disable buttons as appropriate and set current page
+function configureButtons($k, $arr) {
+$keys = array_keys($arr);
+echo "\n";
+}
+?>
\ No newline at end of file
diff --git a/xCAT-web/machines/discover.css b/xCAT-web/machines/discover.css
new file mode 100644
index 000000000..6310c98fc
--- /dev/null
+++ b/xCAT-web/machines/discover.css
@@ -0,0 +1,11 @@
+
+/* Styles specific to the Discover page. */
+
+#wizardPane H3 {
+ margin-top: 20px;
+ margin-bottom: 2px;
+}
+
+P#wizardDone {font-weight : bold; }
+
+.wizardProgressTable { margin: 10px 0px; }
diff --git a/xCAT-web/machines/discover.php b/xCAT-web/machines/discover.php
new file mode 100644
index 000000000..c48849674
--- /dev/null
+++ b/xCAT-web/machines/discover.php
@@ -0,0 +1,173 @@
+ 'Discover Hardware',
+ 'patterns' => 'Cluster Patterns',
+ 'patterns2' => 'More Cluster Patterns',
+ 'preparemn' => 'Prepare Management Node',
+ 'prediscover' => 'Power On Hardware',
+ 'discover' => 'Discover HW Control Points',
+ 'updatedefs' => 'Update Definitions',
+ 'configurehcps' => 'Configure HW Control Points',
+ 'createnodes' => 'Create Nodes',
+ 'testhcps' => 'Test HW Control',
+ 'done' => 'Complete',
+ );
+
+if (isset($_REQUEST['page'])) { displayWizard($pages); }
+
+else { // initial display of the wizard, show the whole page
+insertHeader('Discover New Nodes', array('discover.css',"$TOPDIR/lib/wizard.css"), array("$TOPDIR/jq/jquery.min.js"), array('machines','discover'));
+echo "\n";
+displayWizard($pages);
+echo "
\n"; // end the content div
+insertFooter();
+}
+
+
+//-----------------------------------------------------------------------------
+function intro() {
+echo "This wizard will guide you through the process of defining the naming conventions within your cluster, discovering the hardware on your network, and automatically defining it in the xCAT database.";
+echo " Choose which type of hardware you want to discover, and then click Next.
\n";
+echo "\n";
+}
+
+
+//-----------------------------------------------------------------------------
+function patterns() {
+echo "\n";
+
+//todo: get HCP userids/pws
+}
+
+
+//-----------------------------------------------------------------------------
+function patterns2() {
+echo "\n";
+// do we need to get any info about the resources that should be in each lpar, or do we just divide them evenly?
+}
+
+
+//-----------------------------------------------------------------------------
+function preparemn() {
+global $TOPDIR;
+echo "\n";
+echo " | Write Cluster Topology Configuration File. |
\n";
+echo " | Define networks. |
\n"; // run makenetworks and update the dynamic range for the service LAN
+echo " | Configure DHCP. |
\n"; // run makedhcp and show progress
+echo "
\n";
+}
+
+
+//-----------------------------------------------------------------------------
+function prediscover() {
+//todo: there's a better way to get this list left justified, but have the block in the center, but don't feel like figuring it out right now.
+echo "\n";
+echo "- Power on all of the HMCs.
- Then power on all of frames.
- Then click Next to discover the hardware on the service network.
\n";
+echo " |
\n";
+}
+
+
+//-----------------------------------------------------------------------------
+function discover() {
+global $TOPDIR;
+//todo: run lsslp and show progress
+echo "\n";
+echo " | Discovering HMCs, BPAs, and FSPs... |
\n";
+echo "
\n";
+echo "(This will show the list of hw discovered & located, including nodenames and IP addresses assigned, and then save all info to the DB.)
\n";
+}
+
+
+//-----------------------------------------------------------------------------
+function updatedefs() {
+global $TOPDIR;
+echo "\n";
+echo " | Determine which CECs each HMC should manage. |
\n";
+echo " | Assign frame numbers, supernode numbers, and building block numbers. |
\n";
+echo " | Assign building block subnets. |
\n";
+echo " | Update name resolution. |
\n"; // run makedhosts and makedns
+echo "
\n";
+}
+
+
+//-----------------------------------------------------------------------------
+function configurehcps() {
+global $TOPDIR;
+echo "\n";
+echo " | Assign CECs to their HMC. |
\n";
+echo " | Set frame numbers in BPAs. |
\n";
+echo " | Power on CECs to Standby. |
\n";
+echo "
\n";
+
+//todo: set HCP userids/pws
+}
+
+
+//-----------------------------------------------------------------------------
+function createnodes() {
+global $TOPDIR;
+echo "\n";
+echo " | Create LPARs in each CEC. |
\n";
+echo " | Save node definitions in xCAT database. |
\n";
+echo "
\n";
+}
+
+
+//-----------------------------------------------------------------------------
+function testhcps() {
+global $TOPDIR;
+echo "\n";
+echo " | (Output for rpower stat for sample nodes) |
\n";
+echo " | (Output for rinv for sample nodes) |
\n";
+echo " | (Output for rvitals for sample nodes) |
\n";
+echo "
\n";
+}
+
+
+//-----------------------------------------------------------------------------
+function done() {
+global $TOPDIR;
+echo "Cluster set up successfully completed!
\n";
+echo "You can now start to deploy nodes.
\n";
+}
+?>
\ No newline at end of file
diff --git a/xCAT-web/support/about.php b/xCAT-web/support/about.php
index 6b483df59..a526bd035 100644
--- a/xCAT-web/support/about.php
+++ b/xCAT-web/support/about.php
@@ -5,7 +5,7 @@
$TOPDIR = '..';
require_once "$TOPDIR/lib/functions.php";
-insertHeader('About', NULL, NULL, array('support','about'));
+insertHeader('About xCAT Web Interface', NULL, NULL, array('support','about'));
?>
xCAT Web Interface version: ???
@@ -14,7 +14,7 @@ insertHeader('About', NULL, NULL, array('support','about'));
- Vallard Benincosa
- Bruce Potter
- - Quyen Nguyen
+ - Jarrod Johnson
-