From 5c8d6da392323b37fd85a398b2a493034635c65e Mon Sep 17 00:00:00 2001 From: Tobi Oetiker Date: Thu, 5 Jun 2008 06:43:21 +0000 Subject: let the webif sleep between runs (cut the comets tail) replace {CLASS} too --- lib/Smokeping.pm | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'lib/Smokeping.pm') diff --git a/lib/Smokeping.pm b/lib/Smokeping.pm index 6690953..98ad8d1 100644 --- a/lib/Smokeping.pm +++ b/lib/Smokeping.pm @@ -649,11 +649,6 @@ sub target_menu($$$$;$){ # no menuextra for multihost if (not $host or $host =~ m|^/|){ $menuextra = undef; - } - if ($menuextra){ - $menuextra =~ s/{HOST}/#$host/g; - } else { - $menuextra = ''; } my $class = 'menuitem'; if ($key eq $current ){ @@ -663,6 +658,13 @@ sub target_menu($$$$;$){ $class = 'menuactive'; } }; + if ($menuextra){ + $menuextra =~ s/{HOST}/$host/g; + $menuextra =~ s/{CLASS}/$class/g; + $menuextra = ' '.$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 => <. -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 => < 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 } -- cgit v1.2.3-24-g4f1b