From 7b732158687569bef815cfb6894971a7047461a4 Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Sun, 16 Nov 2014 15:18:10 +0100 Subject: [PATCH] Livestatus\StatusQuery: add terribly setMode method --- .../Backend/Livestatus/Query/StatusQuery.php | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/modules/monitoring/library/Monitoring/Backend/Livestatus/Query/StatusQuery.php b/modules/monitoring/library/Monitoring/Backend/Livestatus/Query/StatusQuery.php index 6c7609d37..d7a78fcab 100644 --- a/modules/monitoring/library/Monitoring/Backend/Livestatus/Query/StatusQuery.php +++ b/modules/monitoring/library/Monitoring/Backend/Livestatus/Query/StatusQuery.php @@ -8,6 +8,29 @@ use Icinga\Protocol\Livestatus\Query; class StatusQuery extends Query { + /** + * This mode represents whether we are in HostStatus or ServiceStatus + * + * Implemented for `distinct as workaround + * + * @TODO Subject to change, see #7344 + * + * @var string + */ + protected $mode; + + /** + * Sets the mode of the current query + * + * @TODO Subject to change, see #7344 + * + * @param string $mode + */ + public function setMode($mode) + { + $this->mode = $mode; + } + protected $available_columns = array( 'host_name', 'host_display_name',