summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGES2
-rw-r--r--Makefile4
-rwxr-xr-xbin/smokeping.dist2
-rwxr-xr-xbin/tSmoke.dist2
-rwxr-xr-xhtdocs/smokeping.cgi.dist2
-rw-r--r--lib/Smokeping.pm2
-rwxr-xr-xqooxdoo/source/smokeping.cgi53
7 files changed, 39 insertions, 28 deletions
diff --git a/CHANGES b/CHANGES
index 7ff9095..2889668 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,5 @@
+2008/2/17 -- released version 2.3.1
+
* Master should not generate alerts for nomasterpoll targets --tobi
* Fixed div structure in hierarchy and filter form --tobi
diff --git a/Makefile b/Makefile
index 7e7b53f..2331e0b 100644
--- a/Makefile
+++ b/Makefile
@@ -1,12 +1,12 @@
SHELL = /bin/sh
-VERSION := 2.3.0
+VERSION := 2.3.1
SVNREPO = svn://svn.oetiker.ch/smokeping
############ A is for features
############ B is for bugfixes
############ V.AAABBB
############ 2.000001
############ 2.000002
-NUMVERSION = 2.003000
+NUMVERSION = 2.003001
IGNORE = ~|CVS|var/|smokeping-$(VERSION)/smokeping-$(VERSION)|cvsignore|rej|orig|DEAD|pod2htm[di]\.tmp|\.svn|tar\.gz|DEADJOE|svn-commit\.tmp
GROFF = groff
PERL = perl-5.8.8
diff --git a/bin/smokeping.dist b/bin/smokeping.dist
index 81ff3aa..1a4576f 100755
--- a/bin/smokeping.dist
+++ b/bin/smokeping.dist
@@ -4,7 +4,7 @@
use lib qw(/usr/pack/rrdtool-1.2.23-mo/lib/perl);
use lib qw(lib);
-use Smokeping 2.003000;
+use Smokeping 2.003001;
Smokeping::main("etc/config.dist");
diff --git a/bin/tSmoke.dist b/bin/tSmoke.dist
index be94a77..568b3b3 100755
--- a/bin/tSmoke.dist
+++ b/bin/tSmoke.dist
@@ -53,7 +53,7 @@ use strict;
use lib qw(lib);
use lib "/usr/local/rrdtool-1.0.39/lib/perl";
-use Smokeping 2.003000;
+use Smokeping 2.003001;
use Net::SMTP;
use Getopt::Long;
use Pod::Usage;
diff --git a/htdocs/smokeping.cgi.dist b/htdocs/smokeping.cgi.dist
index 3d321ec..39541a4 100755
--- a/htdocs/smokeping.cgi.dist
+++ b/htdocs/smokeping.cgi.dist
@@ -5,7 +5,7 @@ use lib qw(/usr/pack/rrdtool-1.0.33-to/lib/perl);
use lib qw(/home/oetiker/data/projects/AADJ-smokeping/dist/lib);
use CGI::Carp qw(fatalsToBrowser);
-use Smokeping 2.003000;
+use Smokeping 2.003001;
Smokeping::cgi("/home/oetiker/data/projects/AADJ-smokeping/dist/etc/config");
diff --git a/lib/Smokeping.pm b/lib/Smokeping.pm
index c88e942..f582263 100644
--- a/lib/Smokeping.pm
+++ b/lib/Smokeping.pm
@@ -38,7 +38,7 @@ use Smokeping::RRDtools;
# globale persistent variables for speedy
use vars qw($cfg $probes $VERSION $havegetaddrinfo $cgimode);
-$VERSION="2.003000";
+$VERSION="2.003001";
# we want opts everywhere
my %opt;
diff --git a/qooxdoo/source/smokeping.cgi b/qooxdoo/source/smokeping.cgi
index 6af461d..86abd8c 100755
--- a/qooxdoo/source/smokeping.cgi
+++ b/qooxdoo/source/smokeping.cgi
@@ -3,6 +3,7 @@ use strict;
use lib qw( perl );
use CGI;
+use CGI::Util qw(expires);
use CGI::Session;
use Qooxdoo::JSONRPC;
use lib qw(/home/oetiker/scratch/rrd-13dev/lib/perl);
@@ -24,15 +25,21 @@ my $session = new CGI::Session;
# You can customise this harness here to handle cases before treating
# the request as being JSON-RPC
if ($cgi->param('g')){
- my $graph = $cgi->param('g');
- my $width = $cgi->param('w');
- my $height = $cgi->param('h');
- my $start = $cgi->param('s');
- my $end = $cgi->param('e');
- my $top = $cgi->param('t');
- my $bottom = $cgi->param('b');
- warn "groesse: $width $height\n";
- RRDs::graph("/tmp/$$.tmpgraph",
+ if (defined $ENV{HTTP_IF_MODIFIED_SINCE}){
+ # if the browser needs reassurance, give it!
+ print "Status: 304 Not Modified\n";
+ print "Last-Modified: $ENV{HTTP_IF_MODIFIED_SINCE}\n\n";
+ exit 0;
+ };
+ my $graph = $cgi->param('g');
+ my $width = $cgi->param('w');
+ my $height = $cgi->param('h');
+ my $start = $cgi->param('s');
+ my $end = $cgi->param('e');
+ my $top = $cgi->param('t');
+ my $bottom = $cgi->param('b');
+ warn "groesse: $width $height\n";
+ RRDs::graph("/tmp/$$.tmpgraph",
'--title' => "Demo ".$graph,
'--vertical-label' => "Bytes/s",
'--start' => $start,
@@ -54,19 +61,21 @@ if ($cgi->param('g')){
'LINE1:in#2020ff:Input',
'CDEF:flip=LTIME,172800,%,86400,LT,in,UNKN,IF',
'AREA:flip#00000088');
- my $ERROR = RRDs::error();
- die $ERROR if $ERROR;
- if (open (my $fh,"</tmp/$$.tmpgraph")){
- local $/=undef;
- my $image = <$fh>;
- unlink "/tmp/$$.tmpgraph";
- close $fh;
- print "Content-Type: image/png\n";
- print "Expires: Thu, 15 Apr 2010 20:00:00 GMT\n";
- print "Length: ".length($image)."\n";
- print "\n";
- print $image;
- };
+ my $ERROR = RRDs::error();
+ die $ERROR if $ERROR;
+ if (open (my $fh,"</tmp/$$.tmpgraph")){
+ local $/=undef;
+ my $image = <$fh>;
+ unlink "/tmp/$$.tmpgraph";
+ close $fh;
+ print "Content-Type: image/png\n";
+ print "Expires: ".expires(3600,'http')."\n";
+ print "Last-Modified: ".expires(-3600,'http')."\n";
+ print "Cache-Control: Public\n";
+ print "Length: ".length($image)."\n";
+ print "\n";
+ print $image;
+ };
} else {
Qooxdoo::JSONRPC::handle_request ($cgi, $session);
}