diff --git a/xCAT-web/cmds/grpattr b/xCAT-web/cmds/grpattr deleted file mode 100644 index d8959b38c..000000000 --- a/xCAT-web/cmds/grpattr +++ /dev/null @@ -1,89 +0,0 @@ -#!/usr/bin/perl - -# NOTE: this cmd is not ported to xCAT 2.0 and is not used any more!!!!!! - -# Display some aggregate information about each group, gathered from the db and its nodes - -use strict; -use Getopt::Std; - -sub usage { print "Usage: grpattr [-h] [-v]\n"; exit (scalar(@_) ? $_[0] : 1); } - -if (! getopts('hv') ) { usage(); } -if ($::opt_h) { usage(0); } -#if (scalar(@ARGV) < 1) { &usage; } -#$::VERBOSE = $::opt_v; - -# Get the status of each node and save in a hash -my @ns = runcmd("nodestat '/.*'"); -my %nodestat; -foreach my $line (@ns) { - my ($node, $stat) = split(/[:\s]+/, $line); - $nodestat{$node} = $stat; -} -if ($::opt_v) { foreach my $n (keys %nodestat) { print "$n: $nodestat{$n}\n"; } } - - -# Get the list of nodes/groups and aggregate the status of the group using the status of each node -#TODO: this must be changed for xcat 2.0 -my @nodelist = runcmd("egrep '^[A-Za-z]' $ENV{XCATROOT}/etc/nodelist.tab"); -verbose("Found ", scalar(@nodelist), " items in nodelist.tab\n"); -my %groups; -foreach my $line (@nodelist) { - my ($node, $groupstr) = split(/\s+/, $line); - my @grouplist = split(/[,\s]+/, $groupstr); - foreach my $g (@grouplist) { - $groups{$g} = minstat($groups{$g}, $nodestat{$node}); - } -} -foreach my $g (keys %groups) { print "$g: $groups{$g}\n"; } - -exit; - -# For 2 status strings from nodestat, return the "lowest". -sub minstat { - my %statnum = ( 'unknown' => 0, - 'noping' => 1, - 'ping' => 2, - 'snmp' => 3, - 'sshd' => 4, - 'pbs' => 5, - 'ready ww' => 6 - ); - my %statstr = ( 0 => 'unknown', - 1 => 'noping', - 2 => 'ping', - 3 => 'snmp', - 4 => 'sshd', - 5 => 'pbs', - 6 => 'ready ww' - ); - my ($s1, $s2) = @_; - - # if either value is empty, just return the other one - if (!length($s1)) { return $s2; } - if (!length($s2)) { return $s1; } - - my $n1 = defined($statnum{$s1}) ? $statnum{$s1} : 0; - my $n2 = defined($statnum{$s2}) ? $statnum{$s2} : 0; - if ($n1 < $n2) { return $statstr{$n1}; } - else { return $statstr{$n2}; } -} - -# Assign a numerical order number to each status string -sub statnum { - my $s = shift @_; - if ($s eq 'noping') { return 1; } - elsif ($s eq 'ping') { return 2; } -} - -sub runcmd { - my $cmd = shift @_; - my @out = `$cmd`; - my $rc = $? >> 8; - if ($rc) { print join('',@out); return; } - chop(@out); - return @out; -} - -sub verbose { if ($::opt_v) { print @_; } } diff --git a/xCAT-web/config/cfm.php b/xCAT-web/config/cfm.php new file mode 100644 index 000000000..c57b5e3c3 --- /dev/null +++ b/xCAT-web/config/cfm.php @@ -0,0 +1,11 @@ + diff --git a/xCAT-web/config/db.css b/xCAT-web/config/db.css index 1ae34f199..edd6159bd 100644 --- a/xCAT-web/config/db.css +++ b/xCAT-web/config/db.css @@ -24,12 +24,6 @@ margin-right: 0.6em; } -#helpLinks A { - margin-left: 0.4em; - margin-right: 0.4em; -} - - .middlepane { /* float: left; */ padding: 5px; @@ -37,26 +31,14 @@ min-width: 600px; } -/* -.bottompane { - float: left; - padding: 5px; - margin: 10px; - min-width: 600px; - border-top: 1px dotted #555; -} -*/ - - - .colHeaders { font-weight: bold; text-align: center; } /* the alternating rows of the table */ -.ListLine0 { background: #e0f8f8; } -.ListLine1 { background: #b0f8f8; } +.ListLine0 { background: #EFF6FF; /*#e0f8f8;*/ } +.ListLine1 { background: #D8E8FF; /*#b0f8f8;*/ } .Xcell { /* the table cell that contains the red x */ background-color: white; @@ -69,36 +51,3 @@ .edit { background: #8f8f0b; } - -a.gbutton { - background: transparent url('../images/bg_button_a.gif') no-repeat scroll top right; - color: #444; - display: inline-block; - /* float: left; */ - font: normal 12px arial, sans-serif; - height: 24px; - margin-right: 6px; - padding-right: 18px; /* sliding doors padding */ - text-decoration: none; -} - -a.gbutton span { - background: transparent url('../images/bg_button_span.gif') no-repeat; - display: inline-block; - line-height: 14px; - padding: 5px 0 5px 18px; - cursor: pointer; -} - - -a.gbutton:active { - background-position: bottom right; - color: #000; - outline: none; /* hide dotted outline in Firefox */ -} - -a.gbutton:active span { - background-position: bottom left; - padding: 6px 0 4px 18px; /* push text down 1px */ - cursor: pointer; -} diff --git a/xCAT-web/config/edittab.php b/xCAT-web/config/edittab.php index 5b6c80319..108d9e8e8 100644 --- a/xCAT-web/config/edittab.php +++ b/xCAT-web/config/edittab.php @@ -35,7 +35,7 @@ if(!is_array($headers)){ die("
Can't find header line in $tab
"); } echo "\n"; // extra cell is for the red x foreach($headers as $colHead) { echo " | $colHead | "; } -echo "
Add Row\n"; -echo "Save\n"; -echo "Cancel
\n"; +insertButtons(array('label' => 'Add Row', 'id' => 'newrow'), + array('label' => 'Save', 'id' => 'saveit'), + array('label' => 'Cancel', 'id' => 'reset') + ); ?> @@ -124,6 +125,9 @@ function getTabHeaders($xml){ function savexCATchanges($tab, & $editable){ $request = simplexml_load_string('