summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Thode <prometheanfire@gentoo.org>2016-10-16 20:25:53 -0500
committerMatthew Thode <prometheanfire@gentoo.org>2016-10-16 20:25:53 -0500
commite6fcfc42675d1aadb5b1098b5fcf0995ec0f8ba0 (patch)
tree9f0654d60f00d26640763dd1465e2a24df856647 /www-apps
parentwe actually need pam now (diff)
downloadgentoo-e6fcfc42675d1aadb5b1098b5fcf0995ec0f8ba0.tar.gz
gentoo-e6fcfc42675d1aadb5b1098b5fcf0995ec0f8ba0.tar.bz2
gentoo-e6fcfc42675d1aadb5b1098b5fcf0995ec0f8ba0.zip
www-apps/icingaweb2-module-graphite: add upstream patch, they are SLOW
Package-Manager: portage-2.3.0
Diffstat (limited to 'www-apps')
-rw-r--r--www-apps/icingaweb2-module-graphite/files/patch-unquote-service.patch54
-rw-r--r--www-apps/icingaweb2-module-graphite/icingaweb2-module-graphite-9999.ebuild2
2 files changed, 56 insertions, 0 deletions
diff --git a/www-apps/icingaweb2-module-graphite/files/patch-unquote-service.patch b/www-apps/icingaweb2-module-graphite/files/patch-unquote-service.patch
new file mode 100644
index 000000000000..3dde1f45a964
--- /dev/null
+++ b/www-apps/icingaweb2-module-graphite/files/patch-unquote-service.patch
@@ -0,0 +1,54 @@
+From 3e5921b96b17ea4d0a5f32a39940a9b762e5c3a4 Mon Sep 17 00:00:00 2001
+From: Matthew Thode <mthode@mthode.org>
+Date: Tue, 12 Apr 2016 03:14:16 +0000
+Subject: [PATCH] remove quotes around $service variable
+
+This fixes https://dev.icinga.org/issues/11572
+
+This still leaves $hostname being quoted, I don't know if that needs to go as well.
+---
+ application/controllers/ShowController.php | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/application/controllers/ShowController.php b/application/controllers/ShowController.php
+index f029b81..0457ce9 100644
+--- a/application/controllers/ShowController.php
++++ b/application/controllers/ShowController.php
+@@ -168,7 +168,7 @@ public function hostAction()
+ if (! array_key_exists('icingaHost', $patterns)) continue;
+
+ foreach ($set->loadTemplates() as $key => $template) {
+- if (strpos($template->getFilterString(), '$service') !== false) continue;
++ if (strpos($template->getFilterString(), $service) !== false) continue;
+
+ $imgParams = array(
+ 'template' => $key,
+@@ -228,7 +228,7 @@ public function serviceAction()
+ if (! array_key_exists('icingaHost', $patterns)) continue;
+
+ foreach ($set->loadTemplates() as $key => $template) {
+- if (strpos($template->getFilterString(), '$service') === false) continue;
++ if (strpos($template->getFilterString(), $service) === false) continue;
+
+ $imgParams = array(
+ 'template' => $key,
+@@ -289,7 +289,7 @@ public function XXXserviceAction()
+
+ foreach ($set->loadTemplates() as $key => $template) {
+
+- if (strpos($template->getFilterString(), '$service') === false) continue;
++ if (strpos($template->getFilterString(), $service) === false) continue;
+
+ $this->view->templates[$key] = $template;
+
+diff -Naur a/library/Graphite/ProvidedHook/Monitoring/ServiceActions.php b/library/Graphite/ProvidedHook/Monitoring/ServiceActions.php
+--- a/library/Graphite/ProvidedHook/Monitoring/ServiceActions.php 2016-10-16 19:10:49.794640399 -0500
++++ b/library/Graphite/ProvidedHook/Monitoring/ServiceActions.php 2016-10-16 19:11:17.136401235 -0500
+@@ -16,6 +16,7 @@
+ array(
+ 'host' => $service->host_name,
+ 'service' => $service->service_description,
++ 'check_command' => $service->service_check_command,
+ ))
+ );
+ }
diff --git a/www-apps/icingaweb2-module-graphite/icingaweb2-module-graphite-9999.ebuild b/www-apps/icingaweb2-module-graphite/icingaweb2-module-graphite-9999.ebuild
index 2e6dc77cf938..eae7fca41435 100644
--- a/www-apps/icingaweb2-module-graphite/icingaweb2-module-graphite-9999.ebuild
+++ b/www-apps/icingaweb2-module-graphite/icingaweb2-module-graphite-9999.ebuild
@@ -23,6 +23,8 @@ DEPEND=">=net-analyzer/icinga2-2.1.1
>=www-apps/icingaweb2-2.0.0"
RDEPEND="${DEPEND}"
+PATCHES=( "${FILESDIR}/patch-unquote-service.patch" )
+
src_install() {
insinto "/usr/share/icingaweb2/modules/graphite/"
doins -r "${S}"/*