From: Sebastian Harl Date: Sat, 23 Jan 2010 22:54:07 +0000 (+0100) Subject: patches: Added bts566199_collection_hide_types.dpatch. X-Git-Tag: collectd-4.9.1-1~9 X-Git-Url: https://git.tokkee.org/?p=pkg-collectd.git;a=commitdiff_plain;h=9afc3fbcb0ff21c65a263b1c4f03cd88b8d97b95 patches: Added bts566199_collection_hide_types.dpatch. This patch adds the ability to hide specified types in collection.cgi. Thanks to Pavel Piatruk for the patch! Closes: #566199 --- diff --git a/debian/changelog b/debian/changelog index 02e4e3d..201cdc8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -45,8 +45,12 @@ collectd (4.9.1-1) unstable; urgency=low vmem, vserver, wireless. - Simplified Java archdir mapping: removed entries "pointing" to themselves and let those default to DEB_BUILD_ARCH. + * debian/patches: + - Added bts566199_collection_hide_types.dpatch -- added ability to hide + specified types in collection.cgi; thanks to Pavel Piatruk for the patch + (Closes: #566199). - -- Sebastian Harl Sat, 23 Jan 2010 23:42:50 +0100 + -- Sebastian Harl Sat, 23 Jan 2010 23:52:06 +0100 collectd (4.8.2-1) unstable; urgency=medium diff --git a/debian/patches/00list b/debian/patches/00list index c3fbc66..9f9026b 100644 --- a/debian/patches/00list +++ b/debian/patches/00list @@ -3,4 +3,5 @@ collection_conf_path.dpatch bts561577_collectd2html_recursive_fix.dpatch bts557599_powerdns_fix.dpatch bts559801_plugin_find_fix.dpatch +bts566199_collection_hide_types.dpatch diff --git a/debian/patches/bts559801_plugin_find_fix.dpatch b/debian/patches/bts559801_plugin_find_fix.dpatch old mode 100644 new mode 100755 diff --git a/debian/patches/bts566199_collection_hide_types.dpatch b/debian/patches/bts566199_collection_hide_types.dpatch new file mode 100755 index 0000000..5c54d9b --- /dev/null +++ b/debian/patches/bts566199_collection_hide_types.dpatch @@ -0,0 +1,36 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## bts566199_collection_hide_types.dpatch by Pavel Piatruk +## +## +## DP: contrib/collection.cgi: Added ability to hide specified types. + +diff a/contrib/collection.cgi b/contrib/collection.cgi +--- a/contrib/collection.cgi ++++ b/contrib/collection.cgi +@@ -13,6 +13,7 @@ use Data::Dumper (); + + our $Config = "/etc/collection.conf"; + our @DataDirs = (); ++our @DontShowTypes = (); + our $LibDir; + + our $ValidTimespan = +@@ -78,6 +79,10 @@ sub read_config + $value =~ s#/*$##; + $LibDir = $value; + } ++ elsif ($key eq 'dontshowtype') ++ { ++ push (@DontShowTypes, $value); ++ } + else + { + print STDERR "Unknown key: $key\n"; +@@ -239,6 +244,7 @@ sub _find_types + my $name = "$_"; + $name =~ s/\.rrd$//i; + my ($type, $instance) = split (m/-/, $name, 2); ++ if (grep { $_ eq $type } @DontShowTypes) { next; } + $types{$type} = [] if (!$types{$type}); + push (@{$types{$type}}, $instance) if (defined ($instance)); + }