Clean up of the main table

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@34 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
bp-sawyers 2007-11-02 19:42:07 +00:00
parent ac08846b6c
commit 2e2b4e59db
10 changed files with 226 additions and 77 deletions

View File

@ -64,15 +64,17 @@ if ($javascripts) {
?>
</head>
<body>
<div id=header>
<table border=0 align=left cellspacing=0 cellpadding=0>
<tr>
<td><img src="images/xCAT_icon.gif"></td>
<td background="images/header_bg.gif" width=700>
<!-- <td background="images/header_bg.gif" width=700> -->
<td width=600>
<p id=banner>xCAT - e<u>x</u>treme <u>C</u>luster <u>A</u>dministration <u>T</u>ool</p>
<p id=disclaimer>This interface is still under construction and not yet ready for use.</p>
</td>
</tr>
</table>
</div>
<?php } // end insertHeader
@ -104,7 +106,7 @@ $bulgif = "$TOPDIR/images/h3bg_new.gif";
$minusgif = "$TOPDIR/images/minus-sign.gif";
$plusgif = "$TOPDIR/images/plus-sign.gif";
echo '<div id=nav><table border="0" cellpadding="0" cellspacing="1" width="70">';
echo '<div id=nav><table border=1 cellpadding=0 cellspacing=1 width=70>';
//Console section
insertInner('open', 1,'Console', 'constab', $currentLink, array(
@ -198,14 +200,14 @@ $plusgif = "$TOPDIR/images/plus-sign.gif";
$hoverTxt = $exTxt;
$style = "display:none";
}
?>
<TR><TD id=<?php echo $menu_level; ?>>
<P title="<?php echo $hoverTxt; ?>" onclick="toggleSection(this,'<?php echo $id ?>')" ondblclick="toggleSection(this,'<?php echo $id ?>')">
<IMG src=<?php echo $gif; ?> id=<?php echo $id."-im" ?>> <?php echo $title ?></P></TD></TR>
<TR><TD >
<TABLE id=<?php echo $id ?> width="100%" cellpadding="0" cellspacing="0" border=0 style=<?php echo $style ?>>
<?php
echo <<<EOS
<TR><TD id=$menu_level>
<P title="$hoverTxt" onclick="toggleSection(this,'$id')" ondblclick="toggleSection(this,'$id')">
<IMG src=$gif id=$id-im> $title</P></TD></TR>
<TR><TD >
<TABLE id=$id width="100%" cellpadding="0" cellspacing="0" border=0 style=$style>
EOS;
foreach ($list as $key => $link) {
if ($key == $currentLink){
@ -214,10 +216,10 @@ foreach ($list as $key => $link) {
echo "<TR><TD id='menu_level3'><A href='$link[0]'><IMG src='$TOPDIR/images/h3bg_new.gif'>&nbsp;$link[1]</A></TD></TR>\n";
}
}
?>
</TABLE></TD></TR>
<?php }//end insertInner
echo "</TABLE></TD></TR>\n";
} //end insertInner
/** ----------------------------------------------------------------------------------------------

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

1
xCAT-web/index.css Normal file
View File

@ -0,0 +1 @@
/* Styles specific to the index.php page */

View File

@ -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 "<div id=content align=center> <h1 class=PageHeading>Cluster Groups and Nodes</h1>";
echo "<div id=content align=center> <p class=PageHeading>Cluster Groups and Nodes</p>";
insertButtons(array(
@ -40,15 +38,11 @@ insertButtons(array(
),
));
echo '<br><form name="nodelist">';
echo '<form name="nodelist" class=ContentForm>';
/*
$output = array();
runcmd("\bin\sudo listattr", 2, $output);
foreach ($output as $line) { echo "<p>line=$line</p>"; }
*/
/* $output = array(); runcmd("\bin\sudo listattr", 2, $output); foreach ($output as $line) { echo "<p>line=$line</p>"; } */
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();
?>
<script type="text/javascript" src="js_xcat/event.js"> </script>
<script type="text/javascript" src="js_xcat/ui.js"> </script>
@ -70,21 +64,21 @@ echo HTMLProducer::getXCATNodeTableFooter();
-->
</SCRIPT>
</form>
<br>
<table>
<tr>
<td><div align="center"><img src="images/green-ball-m.gif"></div></td>
<td>Node is good (Status is ready/pbs/sshd)</td>
<td><img src="images/green-ball-m.gif"></td>
<td align=left>Node is good (Status is ready/pbs/sshd)</td>
</tr>
<tr>
<td><div align="center"><img src="images/red-ball-m.gif"></div></td>
<td>Node is bad (Status is 'noping')</td>
<td><img src="images/red-ball-m.gif"></td>
<td align=left>Node is bad (Status is 'noping')</td>
</tr>
<tr>
<td><div align="center"><img src="images/yellow-ball-m.gif"></div></td>
<td>Other status (unknown/node unavailable...)</td>
<td><img src="images/yellow-ball-m.gif"></td>
<td align=left>Other status (unknown/node unavailable...)</td>
</tr>
</table>
<p id=disclaimer>This interface is still under construction and not yet ready for use.</p>
</div>
</BODY>
</HTML>

View File

@ -0,0 +1,135 @@
<?php
/**
* Produces HTML for use in the interface.
*/
//require_once("config.php");
class GroupNodeTable {
function GroupNodeTable() {}
/**
* @return A string containing the HTML for the header of the table.
*/
function insertGroupTableHeader() {
echo <<<EOS
<table border="0" cellspacing="1" cellpadding=1>
<tr class=TableHeader>
<td width="88" align=left><input type="checkbox" name="chk_node_all" id="chk_node_all">Groups</td>
<td>HW Type</td><td>OS</td><td>Mode</td><td>Status</td><td>HW Ctrl Pt</td><td>Comment</td>
</tr>
EOS;
return;
}
function insertGroupTableFooter() {
echo "</table>";
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
<span
title="$exTxt"
id="img_gr_$nodeGroupName"
onclick="XCATui.updateNodeList('$nodeGroupName')"
ondblclick="toggleSection(this,'div_$nodeGroupName')">
<img src="$plusgif" id="div_$nodeGroupName-im" name="div_$nodeGroupName-im">
EOS;
return $html;
}
/**
* @param String nodeGroup The group.
*/
function insertGroupTableRow($nodeGroup) {
$nodeGroupName = $nodeGroup->getName();
$img_string = XCATNodeGroupUtil::getImageString($nodeGroup->getStatus());
//echo '<tr bgcolor="#FFCC00"><td align=left>';
echo '<tr class=TableRow><td align=left>';
echo GroupNodeTable::getToggleString($nodeGroupName);
echo <<<EOE
<input type="checkbox" name="chk_node_group_$nodeGroupName" id="chk_node_group_$nodeGroupName"><b>$nodeGroupName</b></span>
</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>$img_string</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr style="display:none"><td colspan=7><div id=div_$nodeGroupName style="display:none"></div></td></tr>
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
<table id="
EOS;
$html .= $nodeGroup->getName();
$html .= <<<EOS
" width='100%' cellpadding=0 cellspacing=1 border=0>
EOS;
$nodes = $nodeGroup->getNodes();
foreach($nodes as $nodeName => $node) {
$html .= GroupNodeTable::getXCATNodeTableRow($node);
}
$html .= "<TR bgcolor=\"#FFFF66\"><TD colspan=9 align=\"right\"><image src=\"$left_arrow_gif\" alt=\"Previous page\">&nbsp;&nbsp;&nbsp;&nbsp;<image src=\"$right_arrow_gif\" alt=\"Next page\">&nbsp;&nbsp;</TD></TR>";
$html .= <<<EOS
</table>
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 = "<tr bgcolor=\"#FFFF66\" class=\"indent\">
<td width=89><input type=\"checkbox\" name=\"node_" .$node->getName(). "\" />" .$node->getName(). "</td>" .
"<td width=38><div align=center>" . $node->getHwType(). "</div></td>".
"<td width=22><div align=center>" . $node->getOs(). "</div></td>".
"<td width=43><div align=center>" . $node->getMode(). "</div></td>";
$stat = $node->getStatus();
$img_string = XCATNodeGroupUtil::getImageString($stat);
$html .= "<td width=43><div align=center>" . $img_string . "</div></td>".
"<td width=85><div align=center>" . $node->getHwCtrlPt(). "</div></td>".
"<td width=71><div align=center>" . $node->getComment(). "</div></td></tr>";
EOS;
return $html;
}
}
?>

View File

@ -1,4 +1,5 @@
<?php
// This file is not longer used...
/**
* Produces HTML for use in the interface.
*/

View File

@ -6,15 +6,6 @@ Some of this came from:
author: luka cvrk (www.solucija.com)
*/
body {
margin: 0;
padding: 10px;
background: #fff url(images/bg.gif) repeat-x;
font: normal 12px Tahoma, Verdana, Arial, Helvetica, Sans-Serif;
line-height: 1.6em;
color: #333;
}
.middle{ font: normal 1em Tahoma, Verdana, Arial, Helvetica, Sans-Serif; }
/* this overlaps the BlueBack class in style.css */
@ -34,7 +25,8 @@ a { color: #546F92; background: inherit; }
a:hover { color: #808080; background: inherit; }
h1 { font: bold 2em "Trebuchet MS", Helvetica, Sans-Serif; margin: 0; color: #000000; background-color:transparent; }
h2 { font: bold 1.4em "Trebuchet MS", Helvetica, Sans-Serif; }
h3 { clear: both; font-size: 1.1em; color: #000; background: #fff url(images/h3bg.gif) no-repeat center left; padding: 0 14px; margin: 0;}
/* h3 { clear: both; font-size: 1.1em; color: #000; background: #fff url(images/h3bg.gif) no-repeat center left; padding: 0 14px; margin: 0;} */
h3 { clear: both; font-size: 1.1em; color: #000; background-color: #fff; padding: 0 14px; margin: 0;}
.blue { color: #546F92; background: inherit; }
.image { float: left; border: 2px solid #e2e2e2; padding: 3px; margin: 0 15px 10px 0; }
.no-border {border:0;}
@ -64,8 +56,8 @@ tr.indent td { padding:0px 0 0px 10px; }
#menu_level1 {
float: left;
color: #3F5B7F;
background: #C2CEDE;
color: white; /* #3F5B7F; */
/* background: #C2CEDE; */
font-weight: bold;
font-size:12px;
width: 100%;
@ -84,9 +76,9 @@ tr.indent td { padding:0px 0 0px 10px; }
#menu_level2 {
float: left;
color: #3F5B7F;
color: white; /* #3F5B7F; */
/* background: #BDBDBD ; */
font-weight: bold;
background: #BDBDBD ;
font-size: 11px;
padding: 0px 5px 0px 3px;
border-bottom: 1px solid #fff;
@ -108,10 +100,10 @@ tr.indent td { padding:0px 0 0px 10px; }
*/
#menu_level3 {
float: left;
/* float: left; */
color: #3F5B7F;
font-weight: bold;
background: #CCCCCC ;
/* background: #CCCCCC ; */
border-bottom: 1px solid #fff;
font-size:11px;
padding: 0px 5px 0px 15px;

View File

@ -1,6 +1,6 @@
<?php
require_once("globalconfig.php");
require_once("XCAT/HTML/HTMLProducer.class.php");
require_once("lib/GroupNodeTable.class.php");
require_once("XCAT/XCATCommand/XCATCommandRunner.class.php");
$nodeGroupName = @$_REQUEST["nodeGroupName"];
@ -8,7 +8,7 @@ $nodeGroupName = @$_REQUEST["nodeGroupName"];
// Get all the nodes with node information of the group
$xcmdr = new XCATCommandRunner();
$nodeGroup = $xcmdr->getXCATNodeByGroupName($nodeGroupName);
echo HTMLProducer::getXCATNodeGroupSection($nodeGroup);
echo GroupNodeTable::getXCATNodeGroupSection($nodeGroup);
?>

View File

@ -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;