diff --git a/xCAT-web/functions.php b/xCAT-web/functions.php index c49041730..93c950f57 100644 --- a/xCAT-web/functions.php +++ b/xCAT-web/functions.php @@ -209,7 +209,7 @@ $plusgif = "$TOPDIR/images/plus-sign.gif"; foreach ($list as $key => $link) { if ($key == $currentLink){ - echo " $link[1]\n"; + echo " $link[1]\n"; }else{ echo " $link[1]\n"; } diff --git a/xCAT-web/index.php b/xCAT-web/index.php index 46890a23c..f895f4f9e 100644 --- a/xCAT-web/index.php +++ b/xCAT-web/index.php @@ -5,6 +5,7 @@ $TOPDIR = '.'; require_once "$TOPDIR/functions.php"; //require_once "$TOPDIR/nav.php"; +if (isAIX()) { $aixDisabled = 'disabled'; } //require_once("globalconfig.php"); require_once("lib/XCAT/HTML/HTMLProducer.class.php"); @@ -13,35 +14,39 @@ require_once("lib/XCAT/XCATCommand/XCATCommandRunner.class.php"); insertHeader('Nodes', NULL, NULL); insertNav('nodes'); -if (isAIX()) { $aixDisabled = 'disabled'; } -?> -
-

Cluster Groups and Nodes

- - - - - - - - - - - - - - - - - - - - - -
-
-
-

Cluster Groups and Nodes

"; + + +insertButtons(array( + array( + 'name=propButton value="Attributes"', + 'name=defineButton value="Create Like"', + 'name=createGroupButton value="Create Group"', + 'name=pingNodesButton value="Ping"', + //'name=updateButton value="Updatenode"', + 'name=runcmdButton value="Run Cmd"', + 'name=copyFilesButton value="Copy Files"' + ), + array( + //'name=softMaintButton value="Soft Maint" onclick="this.form.nodesNeeded=1;"', + 'name=hwctrlButton value="HW Ctrl"', + 'name=rsaButton value="RSA/MM/FSP" onclick="this.form.nodesNeeded=1;"', + 'name=installButton value="Install"', + 'name=perfmonButton value="Perf Mon"', + //'name=webminButton value="Webmin" onclick="this.form.nodesNeeded=1;"', + 'name=diagButton value="Diagnose" onclick="this.form.nodesNeeded=1;"', + 'name=removeButton value="Remove"' + ), +)); + +echo '
'; + +/* +$output = array(); +runcmd("\bin\sudo listattr", 2, $output); +foreach ($output as $line) { echo "

line=$line

"; } +*/ echo HTMLProducer::getXCATNodeTableHeader(); diff --git a/xCAT-web/lib/XCAT/XCATCommand/XCATCommandRunner.class.php b/xCAT-web/lib/XCAT/XCATCommand/XCATCommandRunner.class.php index 9b20cd077..540281005 100644 --- a/xCAT-web/lib/XCAT/XCATCommand/XCATCommandRunner.class.php +++ b/xCAT-web/lib/XCAT/XCATCommand/XCATCommandRunner.class.php @@ -14,8 +14,9 @@ class XCATCommandRunner { var $XCATNodeGroupManager; function XCATCommandRunner() { - $this->XCATRoot = '/opt/xcat/bin'; //todo: get rid of these - $this->CurrDir = '/opt/xcat/web'; + $this->XCATRoot = ''; //'/opt/xcat/bin'; //todo: get rid of these + $this->CurrDir = ''; //'/opt/xcat/web'; + $this->Sudo = '\bin\sudo '; $this->XCATNodeManager = &XCATNodeManager::getInstance(); $this->XCATNodeGroupManager = &XCATNodeGroupManager::getInstance(); @@ -44,7 +45,7 @@ class XCATCommandRunner { * @return An array containing names of all nodes. */ function getAllNodeNames() { - $cmdString = "sudo " . $this->XCATRoot . "/nodels"; + $cmdString = $this->Sudo . $this->XCATRoot . "/nodels"; $outputStat = $this->runCommand($cmdString); return $outputStat["output"]; @@ -57,7 +58,7 @@ class XCATCommandRunner { * @return An array containing the name of all nodes in the group. */ function getNodeNamesByGroupName($groupName) { - $cmdString = "sudo " . $this->XCATRoot . "/nodels $groupName"; + $cmdString = $this->Sudo . $this->XCATRoot . "/nodels $groupName"; $outputStat = $this->runCommand($cmdString); return $outputStat["output"]; @@ -68,7 +69,7 @@ class XCATCommandRunner { */ function getXCATNodeByName($nodeName) { - $cmdString = "sudo " . $this->XCATRoot . "/nodestat $nodeName"; + $cmdString = $this->Sudo . $this->XCATRoot . "/nodestat $nodeName"; $outputStat = $this->runCommand($cmdString); $xcn = new XCATNode(); @@ -91,7 +92,7 @@ class XCATCommandRunner { * @return An array containing the name of every node group. */ function getAllGroupNames() { - $cmdString = "sudo " . $this->XCATRoot . "/listattr"; + $cmdString = $this->Sudo . $this->XCATRoot . "/listattr"; $outputStat = $this->runCommand($cmdString); return $outputStat["output"]; @@ -136,6 +137,7 @@ class XCATCommandRunner { $groupStatArr = $this->getGroupStatus(); //get the status of all the groups foreach($xcatGroupNames as $groupName) { + //echo "

group=$groupName

"; $xcatGroup = $this->getXCATGroupByName($groupName, $groupStatArr); array_push($xcatGroups, $xcatGroup); } @@ -160,7 +162,7 @@ class XCATCommandRunner { * @return An array containing the status of all the groups */ function getGroupStatus() { - $cmdString = "sudo " . $this->CurrDir . "/cmds/grpattr"; + $cmdString = $this->Sudo . $this->CurrDir . "/grpattr"; // "/cmds/grpattr"; $outputStat = $this->runCommand($cmdString); $groupStats = $outputStat["output"]; $groupStatArr = array(); @@ -178,7 +180,7 @@ class XCATCommandRunner { function getNodeOrGroupStatus($nodegroupName, $group) { $stat = ""; if ($group == FALSE){ - $cmdString = "sudo " . $this->XCATRoot . "/nodestat " . $nodegroupName; + $cmdString = $this->Sudo . $this->XCATRoot . "/nodestat " . $nodegroupName; $outputStat = $this->runCommand($cmdString); $nodegroupStat = $outputStat["output"][0]; diff --git a/xCAT-web/menu.css b/xCAT-web/menu.css index 52f7e98a4..0a388f64c 100644 --- a/xCAT-web/menu.css +++ b/xCAT-web/menu.css @@ -57,6 +57,11 @@ tr.indent td { padding:0px 0 0px 10px; } /* LEFT VERTICAL MENU/Navigation area */ +#nav TD{ + white-space: nowrap; + vertical-align : middle; +} + #menu_level1 { float: left; color: #3F5B7F; @@ -122,128 +127,5 @@ tr.indent td { padding:0px 0 0px 10px; } #menu_level3 a img { border: 0 none; } #menu_level3 a:hover { background: #999999; color: #fff; } /* #menu_level3 a.current { background: #999999; color: #fff; } */ - #menu_level3.current { background: #FFFFFF ; } + #menu_level3.CurrentMenuItem { background: #FFFFFF ; } -/* CONTENT WRAPPER */ -/* #main { width: 900px; margin: 25px auto 0 auto; } */ - -/* TOP LEFT LOGO - not used... -#logo { float: left; } - #logo h1 { color: #FFFFFF; background: inherit;} - #logo h3 { color: #999999; background: inherit;} -*/ - -/* .main_table { border-collapse:collapse; } */ - -/* TOP RIGHT HORIZONTAL MENU - not used... -#menu { - float: right; - /*background: #fff url(images/barul.gif) no-repeat bottom right; *//* - color: #808080; - padding: 18px 1px 11px 0; - margin: 0; -} - #menu li { - padding: 14px 18px 14px 18px; - color: #444; - /*background: #fff url(images/bar.gif) no-repeat bottom left; *//* - display: inline; - } - #menu li.active { - /*background: #fff url(images/baractive.gif) no-repeat bottom left; *//* - color: #FFFF00; - font-weight: bold; - padding: 14px 18px 14px 18px; - margin: 0 1px 0 0; - } - #menu li a { - /*background: #f8f8f8; *//* - color: #808080; - text-decoration: none; font: bold 2em "Trebuchet MS", Helvetica, Sans-Serif; margin: 0; color: #fff; background-color:transparent; - } - #menu li a:hover { - color: #000; - /*background: #f8f8f8; *//* - } - .key { text-decoration: underline; } /* ACCESKEY UNDERLINED LETTER */ - -/* LEFT INTRO SIDE - not used -#intro_left { - clear: left; - float: left; - width: 250px; - background: #8D9CAF url(images/leftintrobg.gif) repeat-x; - color: #E5EAF2; - margin: 0 0 1px 0; -} - #intro_left a { color: #fff; background: inherit; } - #intro_left p { padding: 14px 15px; margin: 0; } -*/ - -/* RIGHT INTRO SIDE - not used... -#intro_right { - float: right; - width: 340px; - padding: 25px 280px 0 20px; - background: #BCCEDA url(images/intro.jpg) no-repeat; - color: #547592; - margin: 0 0 6px 0; - height: 174px; - border: 2px solid #e2e2e2; -} - #intro_right h1 { margin: 0 0 20px 0; } - #intro_right .white { color: #FFF; background-color:transparent; } -*/ - -/* LEFT SIDE - not used... -#left { - float: left; - width: 250px; -} - .box { - padding: 4px 15px; - border: 1px solid #ccc; - margin: 0 0 10px 0; - } - .note { - padding: 15px 15px 20px 100px; - border: 1px solid #CFCB66; - margin: 0 0 5px 0; - background: #FFFFAD url(images/package.gif) no-repeat; - color: #585616; - } -*/ - -/* RIGHT SIDE - not used... -#right { - float: right; - width: 643px; -} - .leftcol { - float: left; - padding: 12px 15px; - width: 285px; - border:#ccc 1px solid; - text-align: justify; - margin: 0 0 10px 0; - } - .rightcol { - float: right; - padding: 10px 15px; - width: 285px; - border:#ccc 1px solid; - margin: 0 0 10px 0; - } - .special { - clear: both; - margin:0px 0 20px 0; - padding: 5px 20px; - border: 1px solid #ccc; - background: #eee; - color: #444; - } -*/ - -/* FOOTER - not used... -#footer { clear: both; padding: 5px; border-top: 1px solid #ccc; } -*/ diff --git a/xCAT-web/style.css b/xCAT-web/style.css index 22a28e76a..de106ff5d 100644 --- a/xCAT-web/style.css +++ b/xCAT-web/style.css @@ -8,8 +8,8 @@ div#nav { div#content { background-color : #fcfaeb; position: absolute; - left: 125px; - top: 95px; + left: 120px; + top: 90px; } /* not used... @@ -87,6 +87,7 @@ P#logo { .txtfld {font-size : 8pt; font-family : sans-serif; font-weight : bold;} +/* this was used to make buttons out of table cells... .bt { font-size : 8pt; font-weight : bold; @@ -94,18 +95,17 @@ P#logo { background-image : url(images/bt.gif); text-align: center; } +*/ INPUT {vertical-align : middle; font-size : 8pt; font-family : sans-serif; font-weight : bold;} SELECT {vertical-align : middle; font-size : 8pt; font-family : sans-serif; font-weight : bold;} TEXTAREA {vertical-align : middle; font-size : 8pt; font-family : sans-serif; font-weight : bold;} TABLE {font-size : 10pt; font-family : Arial;} -BODY {font-size : 10pt; font-family : Arial; -} - -/* The rest of the styles are for the navigation area */ +BODY {font-size : 10pt; font-family : Arial; } +/* The rest of the styles were for the navigation area, but are not used any more... table#navtable { - /* width: 105px; */ + width: 105px; font-size : 8pt; padding-left : 1px; border: 0px; @@ -114,9 +114,7 @@ table#navtable { .NavCurLink { background-color: #fcfaeb; } - #nav A{ - /* text-decoration : none; */ font-weight : bold; font-family : sans-serif; } @@ -131,17 +129,7 @@ table#navtable { vertical-align : middle; } -#nav TD{ - white-space: nowrap; - vertical-align : middle; - font-weight : bold; - font-family : sans-serif; - /* border: 1px solid gray; */ -} - -#nav IMG { - border: 0px; -} +#nav IMG { border: 0px; } .InnerTable{ margin-left : 0px; @@ -154,11 +142,10 @@ table#navtable { white-space: nowrap; } - -/* OuterTable is not currently used */ .OuterTable{ margin-left : 1px; margin-right : 1px; margin-top : 0px; margin-bottom : 0px; } +*/ \ No newline at end of file