Changeset 34014
- Timestamp:
- Jun 14, 2012, 11:31:25 AM (14 years ago)
- Location:
- trunk/ippMonitor
- Files:
-
- 3 edited
-
def/autocode.php (modified) (2 diffs)
-
def/rawBurntoolState.d (modified) (1 diff)
-
scripts/generate (modified) (12 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippMonitor/def/autocode.php
r34012 r34014 29 29 30 30 // Note: the restriction is now moved AFTER the count query 31 // unless the RESTRICT_COUNT keyword is used 32 if ($restricted == 0) { 33 if ("$RESTRICT_COUNT" != "none") { 34 $WHERE = "$WHERE $RESTRICT_COUNT"; 35 } 36 } 31 37 32 38 // Add GROUP BY statements if any … … 55 61 // Restrict the query if it is necessary 56 62 if ($restricted == 0) { 57 if ( "$UNRESTRICTED" != "none") {63 if ( ("$UNRESTRICTED" != "none") && ("$RESTRICT_COUNT" == "none") ) { 58 64 $WHERE = "$WHERE $UNRESTRICTED"; 59 65 } -
trunk/ippMonitor/def/rawBurntoolState.d
r30690 r34014 5 5 6 6 # if no query restrictions are supplied, we want to limit the query or it is extremely long running: 7 RESTRICT_COUNT WHERE 0>1 7 8 UNRESTRICTED WHERE exp_id = 0 8 9 -
trunk/ippMonitor/scripts/generate
r31816 r34014 29 29 &init_key ("MODE"); 30 30 &init_key ("UNRESTRICTED"); 31 &init_key ("RESTRICT_COUNT"); 31 32 &init_key ("TABLE"); 32 33 &init_key ("TITLE"); … … 46 47 if ($key eq "TABLE") { ($value) = $value =~ m|^\s*(.+)\s*$|; } 47 48 if ($key eq "TYPE") { ($value) = $value =~ m|^\s*(.+)\s*$|; } 48 if ($key eq "TOPLOT") { ($value) = $value =~ m|^\s*(.+)\s*$|; }49 if ($key eq "PLOTTER") { ($value) = $value =~ m|^\s*(.+)\s*$|; }50 if ($key eq "PLOTTITLE") { 51 ($value) = $value =~ m|^\s*(.+)\s*$|;52 $value =~ s/\s/_/g;53 }49 if ($key eq "TOPLOT") { ($value) = $value =~ m|^\s*(.+)\s*$|; } 50 if ($key eq "PLOTTER") { ($value) = $value =~ m|^\s*(.+)\s*$|; } 51 if ($key eq "PLOTTITLE") { 52 ($value) = $value =~ m|^\s*(.+)\s*$|; 53 $value =~ s/\s/_/g; 54 } 54 55 55 56 &set_keypair ($key, $value); … … 61 62 if ($field =~ m|\S+\s+as\s+\S+|) { 62 63 ($fieldreal) = $field =~ m|\S+\s+as\s+(\S+)|; 63 #print STDERR "Case 1\n";64 #print STDERR "Case 1\n"; 64 65 } elsif ($field =~ m|\S+\s+AS\s+\S+|) { 65 #print STDERR "field=$field\n";66 $fieldreal = $field;67 $fieldreal =~ s/\s+AS.*$//;66 #print STDERR "field=$field\n"; 67 $fieldreal = $field; 68 $fieldreal =~ s/\s+AS.*$//; 68 69 #($fieldreal) = $field =~ m|\S+\s+as\s+(\S+)|; 69 #print STDERR "Case 2\n";70 #print STDERR "Case 2\n"; 70 71 } else { 71 72 $fieldreal = $field; 72 #print STDERR "Case 3\n";73 #print STDERR "Case 3\n"; 73 74 } 74 #print STDERR "field=[$field]\tfieldreal=[$fieldreal]\n";75 #print STDERR "field=[$field]\tfieldreal=[$fieldreal]\n"; 75 76 76 77 if ($VERBOSE) { printf "%-20s %-20s %-20s %-20s %-20s %-20s\n", $field, $name, $format, $show, $link, $extras; } … … 141 142 &check_key ("MODE", "basic"); 142 143 &check_key ("UNRESTRICTED", "none"); 144 &check_key ("RESTRICT_COUNT", "none"); 143 145 &check_key ("TABLE", ""); 144 146 &check_key ("TITLE", ""); … … 324 326 # generate a WHERE test for each field (field != *) 325 327 sub write_table_restrict { 326 327 328 if ($WHERE) { 328 329 print FILE "\$WHERE = \"WHERE $WHERE\";\n"; … … 348 349 } 349 350 350 # Generate GROUP BY statement if any 351 # Generate GROUP BY statement if any 351 352 sub write_group_by { 352 353 print FILE "\$WHERE = check_ordering ('$GROUPS', \$WHERE);\n"; … … 536 537 @extfields = split (/,/, $extras); 537 538 for ($i = 0; $i < @extfields; $i++) { 538 # print STDERR $extfields[$i],"\n";539 # print STDERR $extfields[$i],"\n"; 539 540 ($label, $value, $outline) = &parse_label ($extfields[$i]); 540 # print STDERR "[",$label,"]","[",$value,"]","[",$outline,"\n";541 # print STDERR "[",$label,"]","[",$value,"]","[",$outline,"\n"; 541 542 print FILE " \$link = \$link . \"&$outline\";\n"; 542 543 } … … 553 554 # print STDERR "#############################\n"; 554 555 # foreach my $key ( keys %linkarg ) { 555 # print STDERR "key: $key, value: $linkarg{$key}\n";556 # print STDERR "key: $key, value: $linkarg{$key}\n"; 556 557 # } 557 558 … … 560 561 561 562 if ($linkarg{$word}) { 562 # print STDERR "Case 1\n";563 # print STDERR "Case 1\n"; 563 564 $linkarg{$word} = "$linkarg{$word},$value"; 564 565 } else { 565 # print STDERR "Case 2\n";566 # print STDERR "Case 2\n"; 566 567 $linkarg{$word} = $value; 567 568 } … … 585 586 # print STDERR "### parse_label ###\n"; 586 587 # for ($i = 0; $i < @field; $i++) { 587 # print STDERR "field[$i]=$field[$i]\n";588 # print STDERR "field[$i]=$field[$i]\n"; 588 589 # } 589 590 # for ($i = 0; $i < @fieldreal; $i++) { 590 # print STDERR "fieldreal[$i]=$fieldreal[$i]\n";591 # print STDERR "fieldreal[$i]=$fieldreal[$i]\n"; 591 592 # } 592 593 # for ($i = 0; $i < @count; $i++) { 593 # print STDERR "count[$i]=$count[$i]\n";594 # print STDERR "count[$i]=$count[$i]\n"; 594 595 # } 595 596 … … 598 599 if ($string =~ m|\S+=\S+|) { 599 600 ($label, $value) = $string =~ m|(\S+)=(\S+)|; 600 # print STDERR "value=$value\n";601 # print STDERR "value=$value\n"; 601 602 if ($value =~ m|^\$|) { 602 603 MATCH_LABEL: … … 669 670 $name = &parse_fieldname ($name); 670 671 if (exists $ops{$name}) { 671 #if OPx was defined, replace it by its value672 $name = $ops{$name};673 $name =~ s/\s+//g;672 #if OPx was defined, replace it by its value 673 $name = $ops{$name}; 674 $name =~ s/\s+//g; 674 675 } 675 676 $camera = &parse_fieldname ($camera);
Note:
See TracChangeset
for help on using the changeset viewer.
