From 93209bd0f5c32575b4a731ecdbd79e5ede0476a1 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Wed, 16 Sep 2009 11:47:42 +0200 Subject: [PATCH] =?utf8?q?contrib/collection3:=20Use=20=E2=80=9C{plugin=5F?= =?utf8?q?inst}/{type=5Finst}=E2=80=9D=20for=20=E2=80=9C{instance}?= =?utf8?q?=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit … if both are present. Otherwise, use just the one that is available. --- contrib/collection3/lib/Collectd/Graph/Type.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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; } -- 2.30.2