Changeset 13595 for trunk/ippMonitor/generate
- Timestamp:
- Jun 3, 2007, 10:24:09 AM (19 years ago)
- File:
-
- 1 edited
-
trunk/ippMonitor/generate (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippMonitor/generate
r13566 r13595 73 73 } 74 74 75 # the ARGS commands define sarguments to FIELDS commands75 # the ARGS commands define arguments to FIELDS commands 76 76 if ($key eq "ARGS") { 77 77 push @linkargs, $value; 78 } 79 80 # the OP commands define field operations 81 if ($key eq "OP") { 82 push @opwords, $value; 78 83 } 79 84 … … 123 128 } 124 129 130 foreach $opword (@opwords) { 131 &parse_opwords ($opword); 132 } 133 125 134 if (0) { 126 135 print STDERR "show: $show[0]\n"; … … 219 228 # add column sorting elements here 220 229 for ($i = 0; $i < @field; $i++) { 230 ($label, $value, $string) = &parse_label ($show[$i]); 221 231 if ($show[$i] eq "none") { next; } 222 232 # printf FILE "echo \"<th class=\\\"list\\\"> $name[$i] </th>\\n\";\n"; 223 printf FILE "write_table_header (\"list\", \"$name[$i]\", \"$field[$i]\", \$buttonLink, \$ID, '$myFile');\n"; 233 if ($label eq "op") { 234 printf FILE "write_table_header (\"list\", \"$name[$i]\", \"$opf{$value}\", \$buttonLink, \$ID, '$myFile');\n"; 235 } else { 236 printf FILE "write_table_header (\"list\", \"$name[$i]\", \"$field[$i]\", \$buttonLink, \$ID, '$myFile');\n"; 237 } 224 238 } 225 239 } … … 292 306 } 293 307 308 if ($label eq "op") { 309 # create the basic link variable 310 if ($link[$i]) { 311 printf FILE " \$link = \"$link[$i]\" . \"?menu=$MENU&\" . \$ID['link'];\n"; 312 # add extra GET data to target 313 if ($extras[$i]) { &parse_extras ($linkarg{$extras[$i]}); } 314 $myLink = "\$link"; 315 } else { 316 $myLink = "\"\""; 317 } 318 printf FILE " write_table_cell (\$class, $myLink, $ops{$value});\n"; 319 next; 320 } 321 294 322 if (($label eq "image") && !$link[$i]) { 295 323 # print the actual table cell line with the image... … … 485 513 } 486 514 515 sub parse_opwords { 516 my ($value) = $_[0]; 517 518 @words = split (" ", $value); 519 $name = shift (@words); 520 521 $opline = ""; 522 foreach $word (@words) { 523 $fword = &parse_fieldname ($word); 524 push @outwords, $fword; 525 if ($word =~ m|^\$|) { 526 $word = substr ($word, 1); 527 } 528 push @outfields, $word; 529 } 530 $outline = join (" ", @outwords); 531 $ops{$name} = $outline; 532 $outline = join (" ", @outfields); 533 $opf{$name} = $outline; 534 535 return 1; 536 } 537 487 538 sub init_key { 488 539 my ($key) = $_[0];
Note:
See TracChangeset
for help on using the changeset viewer.
