--- 14all-1.1.cgi	Thu Jul 26 09:33:49 2001
+++ 14all-1.1.1minute_interval.cgi	Thu Jul 26 09:34:59 2001
@@ -10,7 +10,7 @@
 
 # if RRDs (rrdtool perl module) is not in the module search path (@INC)
 # uncomment the following line and change the path appropriatly:
-use lib qw(/usr/local/mrtg290/lib/mrtg2);
+use lib qw(/opt/adm/mrtg/lib/mrtg2 /usr/local/rrdtool/lib/perl);
 
 # RCS History - removed as it's available on the web
 
@@ -43,12 +43,12 @@
 
 ### where the mrtg.cfg file is
 # anywhere in the filespace
-#$cfgfile = '/home/mrtg/mrtg.cfg';
+#$cfgfile = '/home/mrtg/etc/mrtg.cfg';
 # relative to the script
 #$cfgfile = 'mrtg.cfg';
 # use this so 14all.cgi gets the cfgfile name from the script name 
 # (14all.cgi -> 14all.cfg)
-$cfgfile = '';
+$cfgfile = '/opt/adm/mrtg/etc/mrtg.cfg';
 
 # if you want to store your config files in a different place than your cgis:
 $cfgfiledir = '';
@@ -87,11 +87,12 @@
 );
 
 my %graphparams = (
-	'daily'   => ['-2000m', 'now',  300],
+	'hourly'   => ['-60m', 'now',  60],
+	'daily'   => ['-1250m', 'now',  60],
 	'weekly'  => ['-12000m','now', 1800],
 	'monthly' => ['-800h', 'now',  7200],
 	'yearly'  => ['-400d', 'now', 86400],
-	'daily.s' => ['-1250m', 'now',  300],
+	'daily.s' => ['-1250m', 'now',  60],
 );
 
 # look for the config file
@@ -128,13 +129,13 @@
   <TR>
     <TD WIDTH=63><A ALT="MRTG"
     HREF="http://ee-staff.ethz.ch/~oetiker/webtools/mrtg/mrtg.html"><IMG
-    BORDER=0 SRC="$config{icondir}mrtg-l.gif"></A></TD>
+    BORDER=0 SRC="$config{icondir}mrtg-l.png"></A></TD>
     <TD WIDTH=25><A ALT=""
     HREF="http://ee-staff.ethz.ch/~oetiker/webtools/mrtg/mrtg.html"><IMG
-    BORDER=0 SRC="$config{icondir}mrtg-m.gif"></A></TD>
+    BORDER=0 SRC="$config{icondir}mrtg-m.png"></A></TD>
     <TD WIDTH=388><A ALT=""
     HREF="http://ee-staff.ethz.ch/~oetiker/webtools/mrtg/mrtg.html"><IMG
-    BORDER=0 SRC="$config{icondir}mrtg-r.gif"></A></TD>
+    BORDER=0 SRC="$config{icondir}mrtg-r.png"></A></TD>
   </TR>
 </TABLE>
 <TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0>
@@ -151,6 +152,9 @@
   <A HREF="http://www.uni-ulm.de/~rbawidam/">Rainer&nbsp;Bawidamann</A>&nbsp;
   <A HREF="mailto:rb1\@informatik.uni-ulm.de">&lt;rb1\@informatik.uni-ulm.de&gt;</A></FONT>
   </TD>
+  <TR VALIGN=top>
+ <TD ALIGN=RIGHT><FONT FACE="Arial,Helvetica" SIZE=2><A HREF="http://www-rocq.inria.fr/~sayer/vthd/tech/mrtg/index.html">Patch&eacute; pour VTHD</A></FONT></TD>
+ <TD ALIGN=CENTER><FONT FACE="Arial,Helvetica" SIZE=2>by / Admin: Nicolas Sayer <A HREF="mailto:Nicolas.Sayer\@inria.fr">&lt;Nicolas.Sayer\@inria.fr&gt;</A></FONT></TD>
 </TR>
 </TABLE>
 EOT
@@ -167,9 +171,7 @@
 	my $dir = $q->param('dir');
 	my @httphead;
 	push @httphead, (-expires => '+' . int($config{interval}) . 'm');
-	if (yesorno($config{refresh})) {
 		push @httphead, (-refresh => $config{refresh});
-	}
 	push @headeropts, (-bgcolor => ($config{'14all*background'} || '#ffffff'));
 	my @htmlhead = (-title => "MRTG/RRD - Group $dir", @headeropts);
 	#if ($targets{addhead}{_}) {
@@ -261,6 +263,7 @@
 	my $pngfile = "${pngdir}${log}-${png}.png";
 	
 	# build the rrd command line: set the starttime and the graphics format (PNG)
+#	my @args = ($pngfile, '-s', $start, '-a', 'PNG');
 	my @args = ($pngfile, '-s', $start, '-e', $end, '-a', 'PNG');
 	# if it's not a small picture set the legends
 	my ($l1,$l2,$l3,$l4,$li,$lo) = ('','','','','','');
@@ -355,6 +358,7 @@
 		push @args, '-o';
 	}
 	push @args,'--alt-y-grid','--lazy','-c','MGRID#ee0000','-c','GRID#000000';
+#	push @args,'--alt-y-grid','-c','MGRID#ee0000','-c','GRID#000000';
 	# now build the graph calculation commands
 	# ds0/ds1 hold the normal data sources to graph/gprint
 	my ($ds0, $ds1) = ('in', 'out');
@@ -386,7 +390,8 @@
 	my ($mx0, $mx1) = ($ds0, $ds1);
 	# px0/px1 hold the maximum pecentage data source for gprint
 	my ($px0, $px1) = ($ps0, $ps1);
-	if (!defined $q->param('small')) {
+	#if (!defined $q->param('small')) {
+	if (1) {
 		# the defs for the maximum values: for the legend ('MAX') and probabely
 		# for the 'withpeak' graphs
 		push @args, "DEF:min=$rrd:ds0:MAX", "DEF:mout=$rrd:ds1:MAX";
@@ -534,20 +539,26 @@
 	$url .= "&png";
 	# the header lines and tags for the graphics
 	my $pngdir = getdirwriteable($config{imagedir}, $targets{directory}{$log});
+	if ($sup !~ /h/) {
+		print $q->h2("'Hourly' graph (1 Minute Average)"),"\n",
+			$q->img({src => "$url=hourly", alt => "hourly-graph",
+				getpngsize("$pngdir$log-hourly.png")}
+			), "\n";
+	}
 	if ($sup !~ /d/) {
-		print $q->h2("'Daily' graph (5 Minute Average)"),"\n",
+		print $q->h2("'Daily' graph (1 Minute Average)"),"\n",
 			$q->img({src => "$url=daily", alt => "daily-graph",
 				getpngsize("$pngdir$log-daily.png")}
 			), "\n";
 	}
 	if ($sup !~ /w/) {
-		print $q->h2("'Weekly' graph (30 Minute Average)"),"\n",
+		print $q->h2("'Weekly' graph (10 Minute Average)"),"\n",
 			$q->img({src => "$url=weekly", alt => "weekly-graph",
 				getpngsize("$pngdir$log-weekly.png")}
 			), "\n";
 	}
 	if ($sup !~ /m/) {
-		print $q->h2("'Monthly' graph (2 Hour Average)"),"\n",
+		print $q->h2("'Monthly' graph (1 Hour Average)"),"\n",
 			$q->img({src => "$url=monthly", alt => "monthly-graph",
 				getpngsize("$pngdir$log-monthly.png")}
 			), "\n";
