From fd1067f6ac2733818f00909c161b6e084e97ebf9 Mon Sep 17 00:00:00 2001 From: Tobias Oetiker Date: Wed, 27 Feb 2013 16:10:48 +0100 Subject: provide more configurable replacements for remocular integration --- lib/Smokeping.pm | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/lib/Smokeping.pm b/lib/Smokeping.pm index f9d162c..02ece8e 100644 --- a/lib/Smokeping.pm +++ b/lib/Smokeping.pm @@ -726,6 +726,8 @@ sub target_menu($$$$;$){ if ($menuextra){ $menuextra =~ s/{HOST}/#$host/g; $menuextra =~ s/{CLASS}/$menuclass/g; + $menuextra =~ s/{HASH}/#/g; + $menuextra =~ s/{HOSTNAME}/$host/g; $menuextra = ' '.$menuextra; } else { $menuextra = ''; @@ -2304,10 +2306,14 @@ DOC The slave names must match the slaves you have setup in the slaves section. DOC menuextra => { - _doc => < 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 => <<'DOC' }, +HTML String to be added to the end of each menu entry. The following tags will be replaced: + + {HOST} -> #$hostname + {HOSTNAME} -> $hostname + {CLASS} -> same class as the other tags in the menu line + {HASH} -> # + DOC probe => { _sub => sub { -- cgit v1.2.3-24-g4f1b