Changeset 18193 for trunk/ippMonitor/scripts/generate
- Timestamp:
- Jun 19, 2008, 6:15:23 AM (18 years ago)
- File:
-
- 1 edited
-
trunk/ippMonitor/scripts/generate (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippMonitor/scripts/generate
r18143 r18193 228 228 sub write_table_header { 229 229 230 # add column sorting elements here 230 # print the table header (field labels) 231 print FILE "echo \"<tr><td></td>\\n\";\n"; 231 232 for ($i = 0; $i < @field; $i++) { 232 233 ($label, $value, $string) = &parse_label ($show[$i]); 233 234 if ($show[$i] eq "none") { next; } 234 # print FILE "echo \"<th class=\\\"list\\\"> $name[$i] </th>\\n\";\n"; 235 print FILE "write_header_cell (\"list\", \"$name[$i]\");\n"; 236 } 237 print FILE "echo \"</tr>\\n\";\n"; 238 239 # print the column sort cells 240 print FILE "echo \"<tr><td></td>\\n\";\n"; 241 for ($i = 0; $i < @field; $i++) { 242 ($label, $value, $string) = &parse_label ($show[$i]); 243 if ($show[$i] eq "none") { next; } 235 244 if ($label eq "op") { 236 print FILE "write_ table_header (\"list\", \"$name[$i]\", \"$opf{$value}\", \$buttonLink, \$ID, '$myFile');\n";245 print FILE "write_sort_cell (\"list\", \"$opf{$value}\", \$buttonLink, \$ID, '$myFile');\n"; 237 246 } else { 238 print FILE "write_table_header (\"list\", \"$name[$i]\", \"$field[$i]\", \$buttonLink, \$ID, '$myFile');\n"; 239 } 240 } 247 print FILE "write_sort_cell (\"list\", \"$field[$i]\", \$buttonLink, \$ID, '$myFile');\n"; 248 } 249 } 250 print FILE "echo \"</tr>\\n\";\n"; 241 251 } 242 252 … … 248 258 249 259 # TD_CLASS class field expression 250 ($class, $field, $testline) = split (" ", $tdClass, 3); 251 252 $field = &parse_fieldname ($field); 253 254 print FILE " if ($field $testline) {\n"; 260 ($class, $testline) = split (" ", $tdClass, 2); 261 262 $testlineFixed = ""; 263 @testlineBits = split (" ", $testline); 264 foreach my $bit (@testlineBits) { 265 $newbit = &parse_fieldname ($bit); 266 $testlineFixed = "$testlineFixed $newbit"; 267 } 268 269 print FILE " if ($testlineFixed) {\n"; 255 270 print FILE " \$class = \"$class\";\n"; 256 271 print FILE " }\n"; … … 270 285 print FILE "\$WHERE = check_restrict ('$value', \$WHERE, 'string');\n"; 271 286 } else { 287 print FILE "\$WHERE = check_restrict ('$value', \$WHERE, 'string');\n"; 272 288 print FILE "\$WHERE = check_restrict ('$value', \$WHERE, 'min');\n"; 273 289 print FILE "\$WHERE = check_restrict ('$value', \$WHERE, 'max');\n"; … … 286 302 print FILE "\$buttonLink = button_restrict_string ('$value', \$buttonLink);\n"; 287 303 } else { 304 print FILE "\$buttonLink = button_restrict_string ('$value', \$buttonLink);\n"; 288 305 print FILE "\$buttonLink = button_restrict_min ('$value', \$buttonLink);\n"; 289 306 print FILE "\$buttonLink = button_restrict_max ('$value', \$buttonLink);\n"; … … 297 314 my ($i); 298 315 299 print FILE "echo \"<tr> \\n\";\n";316 print FILE "echo \"<tr><td>&ge</td>\\n\";\n"; 300 317 for ($i = 0; $i < @field; $i++) { 301 318 if ($show[$i] eq "none") { next; } … … 311 328 } 312 329 } 313 print FILE "echo \"</tr> <tr>\\n\";\n";330 print FILE "echo \"</tr><tr><td>&le</td>\\n\";\n"; 314 331 for ($i = 0; $i < @field; $i++) { 315 332 if ($show[$i] eq "none") { next; } … … 347 364 # print the actual table cell line with the link... 348 365 if (! $value && ($field[$i] ne "*")) { $value = "\$row[$Nrow]"; } 366 367 # add special format elements 368 # $realFormat = $format[$i]; 369 # if ($format[$i] eq '%T') { 370 # $realFormat = '%s'; 371 # } 349 372 print FILE " write_table_cell (\$class, '$format[$i]', $myLink, $value);\n"; 350 373 next; … … 557 580 foreach $word (@words) { 558 581 $fword = &parse_fieldname ($word); 582 # print "field: $word -> $fword\n"; 559 583 push @outwords, $fword; 560 584 if ($word =~ m|^\$|) {
Note:
See TracChangeset
for help on using the changeset viewer.
