From c280fe56c85c7dbbdbdbff4dfa90b73631fe5510 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Tue, 11 Apr 2006 10:33:00 +0000 Subject: [PATCH] Merge from Kjetil. Patches applied: * korbekk@start.no--2005-lap-tla/nms--kjetil--1.0--base-0 tag of sgunderson@bigfoot.com--2006/nms--mainline--1.0--patch-69 * korbekk@start.no--2005-lap-tla/nms--kjetil--1.0--patch-1 removed hardcoded switch id and time from the new showswitch.pl --- web/ext/showswitch.pl | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/web/ext/showswitch.pl b/web/ext/showswitch.pl index 8cfa390..c015005 100755 --- a/web/ext/showswitch.pl +++ b/web/ext/showswitch.pl @@ -10,7 +10,7 @@ use mygraph; require 'glue.pl'; my $cgi = CGI->new; -my $switch = 9; #$cgi->param('id'); +my $switch = $cgi->param('id'); my $width = $cgi->param('width'); my $height = $cgi->param('height'); my @pids = (); @@ -46,8 +46,8 @@ my (@totx, @toty1, @toty2) = (); my (@x, @y1, @y2) = (); my $last_port = -1; my $portname = ""; -my $min_x = 1111637856.70337; #time; -my $max_x = 1111551456; #time - 86400; +my $min_x = time; +my $max_x = time - 86400; my ($min_y, $max_y, $prev_time, $prev_in, $prev_out); my ($if,$of,$ifv,$ofv); my $idx; @@ -218,7 +218,8 @@ mygraph::mygraph_make_graph($graph, $min_x, $max_x, $min_y, $max_y, 5); mygraph::mygraph_plot_series($graph, $x_c, $y1_c, $#totx, 255, 0, 0); mygraph::mygraph_plot_series($graph, $x_c, $y2_c, $#totx, 0, 0, 255); mygraph::mygraph_to_file($graph, "img/$filename"); -#mygraph::mygraph_cleanup ($graph); + +mygraph::mygraph_cleanup ($graph); # my $elapsedthis = Time::HiRes::tv_interval($startthis); # printf "$elapsedthis seconds
\n"; -- 2.39.5