www-apps/icingaweb2-module-graphite: add upstream patch, they are SLOW
authorMatthew Thode <prometheanfire@gentoo.org>
Mon, 17 Oct 2016 01:25:53 +0000 (20:25 -0500)
committerMatthew Thode <prometheanfire@gentoo.org>
Mon, 17 Oct 2016 01:25:53 +0000 (20:25 -0500)
Package-Manager: portage-2.3.0

www-apps/icingaweb2-module-graphite/files/patch-unquote-service.patch [new file with mode: 0644]
www-apps/icingaweb2-module-graphite/icingaweb2-module-graphite-9999.ebuild

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 (file)
index 0000000..3dde1f4
--- /dev/null
@@ -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,
+                 ))
+         );
+     }
index 2e6dc77cf93832ab55f6d82dc43e7b94c653e016..eae7fca4143532d529c8af06acc1074af07eb4be 100644 (file)
@@ -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}"/*