[icinga-checkins] icinga.org: icingaweb2/master: Fix Web 2' s remove-downtime API actions not selecting the downtime name

git at icinga.org git at icinga.org
Fri Oct 7 14:44:42 CEST 2016


Module: icingaweb2
Branch: master
Commit: 213804401cd494a124ada7dc30893e9062072a8d
URL:    https://git.icinga.org/?p=icingaweb2.git;a=commit;h=213804401cd494a124ada7dc30893e9062072a8d

Author: Eric Lippmann <eric.lippmann at netways.de>
Date:   Fri Oct  7 14:44:08 2016 +0200

Fix Web 2's remove-downtime API actions not selecting the downtime name

refs #11398

---

 .../monitoring/application/controllers/ActionsController.php    |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/modules/monitoring/application/controllers/ActionsController.php b/modules/monitoring/application/controllers/ActionsController.php
index 06bbc8e..1ec5fe1 100644
--- a/modules/monitoring/application/controllers/ActionsController.php
+++ b/modules/monitoring/application/controllers/ActionsController.php
@@ -61,7 +61,7 @@ class Monitoring_ActionsController extends Controller
         $filter = $this->getFilterOrExitIfEmpty();
         $downtimes = $this->backend
             ->select()
-            ->from('downtime', array('host_name', 'id' => 'downtime_internal_id'))
+            ->from('downtime', array('host_name', 'id' => 'downtime_internal_id', 'name' => 'downtime_name'))
             ->where('object_type', 'host')
             ->applyFilter($this->getRestriction('monitoring/filter/objects'))
             ->applyFilter($filter);
@@ -110,7 +110,10 @@ class Monitoring_ActionsController extends Controller
         $filter = $this->getFilterOrExitIfEmpty();
         $downtimes = $this->backend
             ->select()
-            ->from('downtime', array('host_name', 'service_description', 'id' => 'downtime_internal_id'))
+            ->from(
+                'downtime',
+                array('host_name', 'service_description', 'id' => 'downtime_internal_id', 'name' => 'downtime_name')
+            )
             ->where('object_type', 'service')
             ->applyFilter($this->getRestriction('monitoring/filter/objects'))
             ->applyFilter($filter);



More information about the icinga-checkins mailing list