summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
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 f5743c0..bba2a6b 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;
@@ -3953,6 +3955,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},
{
@@ -3971,6 +3974,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>";