From: Florian Forster Date: Wed, 16 Sep 2009 09:47:42 +0000 (+0200) Subject: contrib/collection3: Use “{plugin_inst}/{type_inst}” for “{instance}” X-Git-Tag: collectd-4.7.4~18 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=93209bd0f5c32575b4a731ecdbd79e5ede0476a1;p=collectd.git contrib/collection3: Use “{plugin_inst}/{type_inst}” for “{instance}” … if both are present. Otherwise, use just the one that is available. --- diff --git a/contrib/collection3/lib/Collectd/Graph/Type.pm b/contrib/collection3/lib/Collectd/Graph/Type.pm index 01c2417c..81add728 100644 --- a/contrib/collection3/lib/Collectd/Graph/Type.pm +++ b/contrib/collection3/lib/Collectd/Graph/Type.pm @@ -250,7 +250,11 @@ sub getTitle my $type_instance = $ident->{'type_instance'}; my $instance; - if (defined $type_instance) + if ((defined $type_instance) && (defined $plugin_instance)) + { + $instance = "$plugin_instance/$type_instance"; + } + elsif (defined $type_instance) { $instance = $type_instance; }