summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorTobias Oetiker <tobi@oetiker.ch>2012-04-02 09:20:35 +0200
committerTobias Oetiker <tobi@oetiker.ch>2012-04-02 09:20:35 +0200
commit11838ebc2ae0661130544c383643046803d8d45b (patch)
tree9d2e57a975d2391a8da6d669f91caea3888344b7 /lib
parent8837a8d3a033a124644d6085555d70afa1372a30 (diff)
parent6fae074f1a8a305b0a8361626902110e7351a65b (diff)
downloadsmokeping-11838ebc2ae0661130544c383643046803d8d45b.tar.gz
smokeping-11838ebc2ae0661130544c383643046803d8d45b.tar.xz
Merge branch 'master' of github.com:oetiker/SmokePing
Diffstat (limited to 'lib')
-rw-r--r--lib/Smokeping.pm4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Smokeping.pm b/lib/Smokeping.pm
index ec05528..6bb07bc 100644
--- a/lib/Smokeping.pm
+++ b/lib/Smokeping.pm
@@ -1677,6 +1677,7 @@ sub display_webpage($$){
my $display_tree = $tree->{__tree_link} ? $tree->{__tree_link} : $tree;
+ my $authuser = $ENV{REMOTE_USER} || 'Guest';
my $page = fill_template
($cfg->{Presentation}{template},
{
@@ -1700,6 +1701,7 @@ sub display_webpage($$){
step => $step,
rrdlogo => '<A HREF="http://oss.oetiker.ch/rrdtool/"><img border="0" src="'.$cfg->{General}{imgurl}.'/rrdtool.png"></a>',
smokelogo => '<A HREF="http://oss.oetiker.ch/smokeping/counter.cgi/'.$VERSION.'"><img border="0" src="'.$cfg->{General}{imgurl}.'/smokeping.png"></a>',
+ authuser => $authuser,
}
);
my $expi = $cfg->{Database}{step} > 120 ? $cfg->{Database}{step} : 120;
@@ -3955,6 +3957,7 @@ sub gen_page ($$$) {
my $step = $probes->{$tree->{probe}}->step();
my $readversion = "?";
$VERSION =~ /(\d+)\.(\d{3})(\d{3})/ and $readversion = sprintf("%d.%d.%d",$1,$2,$3);
+ my $authuser = $ENV{REMOTE_USER} || 'Guest';
$page = fill_template
($cfg->{Presentation}{template},
{
@@ -3973,6 +3976,7 @@ sub gen_page ($$$) {
step => $step,
rrdlogo => '<A HREF="http://oss.oetiker.ch/rrdtool/"><img border="0" src="'.$cfg->{General}{imgurl}.'/rrdtool.png"></a>',
smokelogo => '<A HREF="http://oss.oetiker.ch/smokeping/counter.cgi/'.$VERSION.'"><img border="0" src="'.$cfg->{General}{imgurl}.'/smokeping.png"></a>',
+ authuser => $authuser,
});
print PAGEFILE $page || "<HTML><BODY>ERROR: Reading page template ".$cfg->{Presentation}{template}."</BODY></HTML>";