diff --git a/xCAT-web/functions.php b/xCAT-web/functions.php index 93c950f57..4bfe31028 100644 --- a/xCAT-web/functions.php +++ b/xCAT-web/functions.php @@ -64,15 +64,17 @@ if ($javascripts) { ?> + '; +echo '
'; //Console section insertInner('open', 1,'Console', 'constab', $currentLink, array( @@ -198,14 +200,14 @@ $plusgif = "$TOPDIR/images/plus-sign.gif"; $hoverTxt = $exTxt; $style = "display:none"; } -?> - - + + + +EOS; + return; +} + +function insertGroupTableFooter() { + echo "
> -

- id=>

- width="100%" cellpadding="0" cellspacing="0" border=0 style=> - + -\n"; + +} //end insertInner /** ---------------------------------------------------------------------------------------------- diff --git a/xCAT-web/images/Thumbs.db b/xCAT-web/images/Thumbs.db index d04552cae..97ae00819 100644 Binary files a/xCAT-web/images/Thumbs.db and b/xCAT-web/images/Thumbs.db differ diff --git a/xCAT-web/images/xCAT_icon.gif b/xCAT-web/images/xCAT_icon.gif index ce87160e8..e69ef91f6 100644 Binary files a/xCAT-web/images/xCAT_icon.gif and b/xCAT-web/images/xCAT_icon.gif differ diff --git a/xCAT-web/index.css b/xCAT-web/index.css new file mode 100644 index 000000000..55589ab37 --- /dev/null +++ b/xCAT-web/index.css @@ -0,0 +1 @@ +/* Styles specific to the index.php page */ \ No newline at end of file diff --git a/xCAT-web/index.php b/xCAT-web/index.php index f895f4f9e..da533653a 100644 --- a/xCAT-web/index.php +++ b/xCAT-web/index.php @@ -4,18 +4,16 @@ $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"); +require_once("lib/GroupNodeTable.class.php"); require_once("lib/XCAT/XCATCommand/XCATCommandRunner.class.php"); insertHeader('Nodes', NULL, NULL); insertNav('nodes'); -echo "

Cluster Groups and Nodes

"; +echo "

Cluster Groups and Nodes

"; insertButtons(array( @@ -40,15 +38,11 @@ insertButtons(array( ), )); -echo '
'; +echo ''; -/* -$output = array(); -runcmd("\bin\sudo listattr", 2, $output); -foreach ($output as $line) { echo "

line=$line

"; } -*/ +/* $output = array(); runcmd("\bin\sudo listattr", 2, $output); foreach ($output as $line) { echo "

line=$line

"; } */ -echo HTMLProducer::getXCATNodeTableHeader(); +GroupNodeTable::insertGroupTableHeader(); // Get all the names of the groups $xcmdr = new XCATCommandRunner(); @@ -57,10 +51,10 @@ $nodeGroupNames = $xcmdr->getAllXCATGroups(); // Print the HTML for each of them foreach($nodeGroupNames as $key => $nodeGroupName) { - echo HTMLProducer::getXCATGroupTableRow($nodeGroupName); + echo GroupNodeTable::insertGroupTableRow($nodeGroupName); } -echo HTMLProducer::getXCATNodeTableFooter(); +GroupNodeTable::insertGroupTableFooter(); ?> @@ -70,21 +64,21 @@ echo HTMLProducer::getXCATNodeTableFooter(); --> -
+

+ $title

+ +EOS; foreach ($list as $key => $link) { if ($key == $currentLink){ @@ -214,10 +216,10 @@ foreach ($list as $key => $link) { echo "\n"; } } -?> -
- - + + - - + + - - + +
Node is good (Status is ready/pbs/sshd)Node is good (Status is ready/pbs/sshd)
Node is bad (Status is 'noping')Node is bad (Status is 'noping')
Other status (unknown/node unavailable...)Other status (unknown/node unavailable...)
+

This interface is still under construction and not yet ready for use.

\ No newline at end of file diff --git a/xCAT-web/lib/GroupNodeTable.class.php b/xCAT-web/lib/GroupNodeTable.class.php new file mode 100644 index 000000000..208ac5269 --- /dev/null +++ b/xCAT-web/lib/GroupNodeTable.class.php @@ -0,0 +1,135 @@ + +
GroupsHW TypeOSModeStatusHW Ctrl PtComment
"; + return; +} + +/** + * @param String nodeGroupName The name of the node group. + */ +function getToggleString($nodeGroupName) { +global $TOPDIR; +//$colTxt = "Click to collapse section"; +$exTxt = "Click to expand section"; +//$bulgif = "$TOPDIR/images/h3bg_new.gif"; +//$minusgif = "$TOPDIR/images/minus-sign.gif"; +$plusgif = "$TOPDIR/images/plus-sign.gif"; + + $html = << + +EOS; + + return $html; +} + +/** + * @param String nodeGroup The group. + */ +function insertGroupTableRow($nodeGroup) { +$nodeGroupName = $nodeGroup->getName(); +$img_string = XCATNodeGroupUtil::getImageString($nodeGroup->getStatus()); + +//echo ''; +echo ''; +echo GroupNodeTable::getToggleString($nodeGroupName); +echo <<$nodeGroupName + +   +   +   + $img_string +   +   + + +EOE; +return; +} + + /** + * @param XCATNodeGroup nodeGroup The node group for which we want to generate the html. + * returns the table that contains all the nodes information of that group + */ +function getXCATNodeGroupSection($nodeGroup) { + $imagedir = 'images'; + $right_arrow_gif = $imagedir . "/grey_arrow_r.gif"; + $left_arrow_gif = $imagedir . "/grey_arrow_l.gif"; + + $html .= << +EOS; + + $nodes = $nodeGroup->getNodes(); + + foreach($nodes as $nodeName => $node) { + $html .= GroupNodeTable::getXCATNodeTableRow($node); + } + + $html .= "\"Previous    \"Next  "; + $html .= << +EOS; + + return $html; +} + + /** + * @param XCATNode node The node for which we want to generate the html. + */ +function getXCATNodeTableRow($node) { + + $imagedir = 'images'; + + //echo $node->getName(); + $html = " + getName(). "\" />" .$node->getName(). "" . + "
" . $node->getHwType(). "
". + "
" . $node->getOs(). "
". + "
" . $node->getMode(). "
"; + + $stat = $node->getStatus(); + $img_string = XCATNodeGroupUtil::getImageString($stat); + + $html .= "
" . $img_string . "
". + "
" . $node->getHwCtrlPt(). "
". + "
" . $node->getComment(). "
"; + +EOS; + return $html; + } +} +?> diff --git a/xCAT-web/lib/XCAT/HTML/HTMLProducer.class.php b/xCAT-web/lib/XCAT/HTML/HTMLProducer.class.php index 283e3a143..413ab5250 100644 --- a/xCAT-web/lib/XCAT/HTML/HTMLProducer.class.php +++ b/xCAT-web/lib/XCAT/HTML/HTMLProducer.class.php @@ -1,4 +1,5 @@ getXCATNodeByGroupName($nodeGroupName); -echo HTMLProducer::getXCATNodeGroupSection($nodeGroup); +echo GroupNodeTable::getXCATNodeGroupSection($nodeGroup); ?> diff --git a/xCAT-web/style.css b/xCAT-web/style.css index de106ff5d..704ea3144 100644 --- a/xCAT-web/style.css +++ b/xCAT-web/style.css @@ -1,15 +1,23 @@ + +div#header { + /* background-color : #d8dff1; */ + position: absolute; + left: 15px; + top: 15px; +} + div#nav { /* background-color : #d8dff1; */ position: absolute; left: 0px; - top: 95px; + top: 80px; } div#content { - background-color : #fcfaeb; + /* background-color : #fcfaeb; */ position: absolute; left: 120px; - top: 90px; + top: 80px; } /* not used... @@ -25,9 +33,9 @@ P#logo { #banner { font-weight: bolder; - font-size: 20pt; + font-size: 16pt; font-style: italic; - color: gray; + color: #6a8ab5; /* #3F5B7F; gray; */ text-align: center; margin: 10px; } @@ -37,28 +45,55 @@ P#logo { font-size: 9pt; color: red; text-align: center; + margin: 5px; } .PageHeading { - background-color: #c0c0c0; - margin-top: 5px; - margin-bottom: 5px; + /* font-size: 10pt; */ + font: bold 1.4em "Trebuchet MS", Helvetica, Sans-Serif; + color: white; + background-color: transparent; /* #c0c0c0; */ + border: 1px solid white; + border-bottom-style: none; + margin: 2px 2px 10px 2px; } +.ContentForm { margin: 10px 2px 15px 2px; } + +BODY { + font-size : 10pt; + font-family : Arial; + margin: 0; + padding: 10px; + background: url(images/background.gif) repeat-y; + /* background: black; */ + font: normal 12px Tahoma, Verdana, Arial, Helvetica, Sans-Serif; + line-height: 1.6em; + color: white; /* #333; */ +} + +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;} + /* pre { padding: 0px; margin: 0px; } */ -.TableRow { background-color : #d8dff1; } +.TableHeader { color: black; background-color : #fffdb0; font-weight : bold; font-size : 9pt; white-space: nowrap; } +.TableRow { color: black; background-color : #b3c2d9; font-size : 9pt; white-space: nowrap; } /* #d8dff1 */ .Info {color : blue;} .Error {font-weight : bold; color : red;} .Trace {color: gray; padding: 0px; margin: 0px;} .BasicHeading {background-color : #8CA4D9;} .BlueBack {background-color : #C2CEDE; /* #8CA4D9; */ } - .LightBlueBack {background-color : #bfccea;} - .FilterBox {background-color : #e8e8e8;} .LightGrayBack {background-color : #e8e8e8;} +.CreamHeading { font-weight : bolder; background-color : #fffdb0; } +.LightCreamHeading { font-weight : bolder; background-color : #fffece; } +.SlateBackground { background-color : #95aece; } +.DarkSlateBackground { background-color : #698ebc; } .Middle {vertical-align : middle;} .Center {text-align : center;} @@ -70,19 +105,14 @@ P#logo { .Font8 {font-size : 8pt;} .Boxed { border: 1px solid gray; } .NoMargin { margin: 0px; } +.NoPadding { padding: 0px; margin: 0px; } .Hidden { visibility : hidden ;} .but{ - background-color : #fbf999; - padding-top : 0px; - padding-left : 0px; - padding-right : 0px; - padding-bottom : 0px; - margin-top : 0px; - margin-left : 0px; - margin-right : 0px; - margin-bottom : 0px; + background-color: #3F5B7F; /* #6a8ab5; #fbf999; */ + padding: 0px; + margin: 0px; } .txtfld {font-size : 8pt; font-family : sans-serif; font-weight : bold;} @@ -97,12 +127,6 @@ P#logo { } */ -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 were for the navigation area, but are not used any more... table#navtable { width: 105px;