Changeset 198
- Timestamp:
- 05/08/08 15:53:43
- Files:
-
- obskml/trunk/QAQC/GenPlatformUptimeWebpage.pl (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
obskml/trunk/QAQC/GenPlatformUptimeWebpage.pl
r159 r198 11 11 #Set to 0 if running in a Linux/Unix environment. This mostly deals with how file paths are handled, as well as a couple 12 12 #of shell commands. 13 ############################################################################################################################## 14 #Revisions 15 #Rev: 1.1.0.0 16 #Author: DWR 17 #Changes: Added command line option to pass optional style sheet in. 18 ############################################################################################################################## 13 19 use constant MICROSOFT_PLATFORM => 0; 14 20 … … 27 33 my %CommandLineOptions; 28 34 GetOptions( \%CommandLineOptions, 29 "WorkingDir=s" ); 35 "WorkingDir=s", 36 "StyleSheet:s"); #DWR v1.1.0.0 30 37 31 38 my $strWorkingDir = $CommandLineOptions{"WorkingDir"}; … … 33 40 { 34 41 35 die print( "Missing required field (s).\n".42 die print( "Missing required field or fields.\n". 36 43 "Command Line format: -WorkingDir\n". 37 "-WorkingDir provides the path to the directory where the $PLATFORMCSVFILE resides for a given provider. HTML file created will be created here as well.\n" ); 44 "--WorkingDir provides the path to the directory where the $PLATFORMCSVFILE resides for a given provider. HTML file created will be created here as well.\n". 45 "--StyleSheet optional argument to give the style sheet to use in formatting the page.\n") ; 38 46 } 39 47 #DWR v1.1.0.0 48 my $strStyleSheet = $CommandLineOptions{"StyleSheet"}; 49 # If no style sheet provided, use the default. 50 if( length( $strStyleSheet ) == 0 ) 51 { 52 $strStyleSheet = 'http://carocoops.org/~dramage_prod/styles/main.css'; 53 } 40 54 my $PlatformPercentCSVFile; 41 55 my $PlatformPercentHTMLFile; … … 55 69 print( $PlatformPercentHTMLFile "<BODY>\n" ); 56 70 57 print( $PlatformPercentHTMLFile "<link href=\" http://carocoops.org/~dramage_prod/styles/main.css\" rel=\"stylesheet\" type=\"text/css\" media=\"screen\" />\n" );71 print( $PlatformPercentHTMLFile "<link href=\"$strStyleSheet\" rel=\"stylesheet\" type=\"text/css\" media=\"screen\" />\n" ); 58 72 my $iTestProfileNdx = 0; 59 73 #my @ReportIntervals; … … 73 87 print( $PlatformPercentHTMLFile "<tr><td><BR></td></tr>" ); 74 88 75 # print( $PlatformPercentHTMLFile "</table><BR><BR>" );76 89 } 77 90 #Start a new table per new header. 78 #print( $PlatformPercentHTMLFile "<table border=\"1\">" ); 79 80 #For each new haeder, let's add a row to help show this. 81 #my $strBuf = "<CAPTION><H2>Sensor Reporting Percentage</H2></CAPTION>"; 82 #print( $PlatformPercentHTMLFile $strBuf ); 83 91 84 92 $iTestProfileNdx++; 85 93 $iWriteTableHeader = 1; … … 106 114 #push( @ReportIntervals, $iInterval ); 107 115 } 108 print $PlatformPercentHTMLFile "<TH><STRONG>$strColumn</STRONG></TH>\n"; 116 #print $PlatformPercentHTMLFile "<TH><STRONG>$strColumn</STRONG></TH>\n"; 117 print $PlatformPercentHTMLFile "<TH>$strColumn</TH>\n"; 109 118 } 110 119 print $PlatformPercentHTMLFile "</THEAD >\n"; … … 117 126 { 118 127 my $strColumn = shift(@Columns); 119 my $rgbColor = RGB_DEFAULT; 128 #my $rgbColor = RGB_DEFAULT; 129 my $strBGColorID = "RGB_DEFAULT"; 120 130 if( $iCnt >= 3 ) 121 131 { 122 132 if( $strColumn >= 90.0 ) 123 133 { 124 $rgbColor = RGB_90THPERCENTILE; 134 #$rgbColor = RGB_90THPERCENTILE; 135 $strBGColorID = "RGB_90THPERCENTILE"; 125 136 } 126 137 elsif( $strColumn >= 70.0 ) 127 138 { 128 $rgbColor = RGB_70THPERCENTILE; 139 #$rgbColor = RGB_70THPERCENTILE; 140 $strBGColorID = "RGB_70THPERCENTILE"; 129 141 } 130 142 else 131 143 { 132 $rgbColor = RGB_UNDER70TH; 144 #$rgbColor = RGB_UNDER70TH; 145 $strBGColorID = "RGB_UNDER70TH"; 133 146 } 134 147 } … … 144 157 } 145 158 } 146 print $PlatformPercentHTMLFile "<td bgcolor=\"$rgbColor\" >$strColumn</td>\n"; 159 #print $PlatformPercentHTMLFile "<td bgcolor=\"$rgbColor\" >$strColumn</td>\n"; 160 print $PlatformPercentHTMLFile "<td id=\"$strBGColorID\" >$strColumn</td>\n"; 147 161 $iCnt++; 148 162 }
