From 7a3e3068d809da001c4ce54b23a45a6aaac1678a Mon Sep 17 00:00:00 2001 From: "mcafee%netscape.com" Date: Thu, 13 Dec 2001 07:17:48 +0000 Subject: [PATCH] Adding line style UI git-svn-id: svn://10.0.0.236/trunk@110423 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/webtools/graph/query.cgi | 66 ++++++++++++++++++++++---------- 1 file changed, 46 insertions(+), 20 deletions(-) diff --git a/mozilla/webtools/graph/query.cgi b/mozilla/webtools/graph/query.cgi index 268965310e2..138bee160d9 100755 --- a/mozilla/webtools/graph/query.cgi +++ b/mozilla/webtools/graph/query.cgi @@ -10,6 +10,7 @@ my $UNITS = lc($req->param('units')); my $TBOX = lc($req->param('tbox')); my $AUTOSCALE = lc($req->param('autoscale')); my $DAYS = lc($req->param('days')); +my $LTYPE = lc($req->param('ltype')); # # Testing only: @@ -40,7 +41,7 @@ sub make_filenames_list { # Print out a list of testnames in db directory sub print_testnames { - my ($tbox, $autoscale, $days, $units) = @_; + my ($tbox, $autoscale, $days, $units, $ltype) = @_; # HTTP header print "Content-type: text/html\n\n\n"; @@ -55,7 +56,7 @@ sub print_testnames { my $machines_string = join(" ", @machines); foreach (@machines) { - print "
  • $_\n"; + print "
  • $_\n"; } print ""; @@ -64,7 +65,7 @@ sub print_testnames { # Print out a list of machines in db/ directory, with links. sub print_machines { - my ($testname, $autoscale, $days, $units) = @_; + my ($testname, $autoscale, $days, $units, $ltype) = @_; # HTTP header print "Content-type: text/html\n\n\n"; @@ -79,7 +80,7 @@ sub print_machines { my $machines_string = join(" ", @machines); foreach (@machines) { - print "
  • $_\n"; + print "
  • $_\n"; } print ""; @@ -96,46 +97,71 @@ sub show_graph { print "\n"; print "\n"; - print "\n"; - print "\n"; + # Line style (lines|steps|points) + print "\n"; + + + print "\n"; print "
    \n"; # Scale Y-axis - my $neg_autoscale = !$AUTOSCALE; + print "\n"; if($AUTOSCALE) { print "Y-axis: (zoom|"; - print "100%"; + print "100%"; print ") \n"; } else { print "Y-axis: ("; - print "zoom"; + print "zoom"; print "|100%) \n"; } print "\n"; # Days, Time-axis - print "
    \n"; + print "
    \n"; + print "\n"; print ""; print ""; print ""; print "Days:"; if($DAYS) { - print "(all data|"; - print "\n"; - print ")"; + print "(all data|"; + print ""; + print ")\n"; } else { print "(all data|"; - print "\n"; - print ")"; + print ""; + print ")\n"; } print "\n"; print "\n"; + print "Style:"; + if($LTYPE eq "steps") { + print "("; + print "lines"; + print "|steps|"; + print "points"; + print ")"; + } elsif($LTYPE eq "points") { + print "("; + print "lines"; + print "|"; + print "steps"; + print "|points)"; + } else { + print "(lines|"; + print "steps"; + print "|"; + print "points"; + print ")"; + } + print "
    \n"; print "
    \n"; # graph - print "\"$TBOX"; + print "\"$TBOX"; print "
    \n"; print "
    \n"; @@ -143,11 +169,11 @@ sub show_graph { # Other machines print ""; print "
  • \n"; - print "Other machines running the $TESTNAME test"; + print "Other machines running the $TESTNAME test"; print "
  • \n"; print "
  • \n"; - print "Other tests that $TBOX is running"; + print "Other tests that $TBOX is running"; print "
  • \n"; print "
    "; @@ -156,9 +182,9 @@ sub show_graph { } if(!$TESTNAME) { - print_testnames($TBOX, $AUTOSCALE, $DAYS, $UNITS); + print_testnames($TBOX, $AUTOSCALE, $DAYS, $UNITS, $LTYPE); } elsif(!$TBOX) { - print_machines($TESTNAME, $AUTOSCALE, $DAYS, $UNITS); + print_machines($TESTNAME, $AUTOSCALE, $DAYS, $UNITS, $LTYPE); } else { show_graph(); }