summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorTobi Oetiker <tobi@oetiker.ch>2008-06-05 08:43:21 +0200
committerTobi Oetiker <tobi@oetiker.ch>2008-06-05 08:43:21 +0200
commit5c8d6da392323b37fd85a398b2a493034635c65e (patch)
tree2e6482b575424d4863b45cfd988d555189346051 /lib
parenta26e2b5d5d5634e4653c7081dd3dd5a94fdcbb8f (diff)
downloadsmokeping-5c8d6da392323b37fd85a398b2a493034635c65e.tar.gz
smokeping-5c8d6da392323b37fd85a398b2a493034635c65e.tar.xz
let the webif sleep between runs (cut the comets tail)
replace {CLASS} too
Diffstat (limited to 'lib')
-rw-r--r--lib/Smokeping.pm22
1 files changed, 13 insertions, 9 deletions
diff --git a/lib/Smokeping.pm b/lib/Smokeping.pm
index 6690953..98ad8d1 100644
--- a/lib/Smokeping.pm
+++ b/lib/Smokeping.pm
@@ -650,11 +650,6 @@ sub target_menu($$$$;$){
if (not $host or $host =~ m|^/|){
$menuextra = undef;
}
- if ($menuextra){
- $menuextra =~ s/{HOST}/#$host/g;
- } else {
- $menuextra = '';
- }
my $class = 'menuitem';
if ($key eq $current ){
if ( @$open ) {
@@ -663,6 +658,13 @@ sub target_menu($$$$;$){
$class = 'menuactive';
}
};
+ if ($menuextra){
+ $menuextra =~ s/{HOST}/$host/g;
+ $menuextra =~ s/{CLASS}/$class/g;
+ $menuextra = '&nbsp;'.$menuextra;
+ } else {
+ $menuextra = '';
+ }
if ($filter){
if (($menu and $menu =~ /$filter/i) or ($title and $title =~ /$filter/i)){
@@ -2223,8 +2225,9 @@ The slave names must match the slaves you have setup in the slaves section.
DOC
menuextra => {
_doc => <<DOC },
-A bit of html to append after the menu entry. You can embedd the name of the current host into it using C<{HOST}>.
-This entry does get inherited. Use this for example to add a link to your mtr service.
+HTML String to be added to the end of each menu entry. The C<{HOST}> entry will be replaced by the
+host property of the relevant section. The C<{CLASS}> entry will be replaced by the same
+class as the other tags in the manu line.
DOC
probe => {
_sub => sub {
@@ -3519,8 +3522,9 @@ DOC
List of slave servers. It gets inherited by all targets.
DOC
menuextra => { _doc => <<DOC },
-HTML String to be added to the end of each menu entry. The C<{HOST}> entry will be replaces by the
-host of the relevant section if there is one.
+HTML String to be added to the end of each menu entry. The C<{HOST}> entry will be replaced by the
+host property of the relevant section. The C<{CLASS}> entry will be replaced by the same
+class as the other tags in the manu line.
DOC
}