From 8ca6cc32b2c789a3149861159ad258f2cb9491e3 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 28 Apr 2024 14:39:39 +0200 Subject: Adding upstream version 2.11.4. Signed-off-by: Daniel Baumann --- .../Ido/Query/UnhandledserviceproblemsQuery.php | 48 ++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 modules/monitoring/library/Monitoring/Backend/Ido/Query/UnhandledserviceproblemsQuery.php (limited to 'modules/monitoring/library/Monitoring/Backend/Ido/Query/UnhandledserviceproblemsQuery.php') diff --git a/modules/monitoring/library/Monitoring/Backend/Ido/Query/UnhandledserviceproblemsQuery.php b/modules/monitoring/library/Monitoring/Backend/Ido/Query/UnhandledserviceproblemsQuery.php new file mode 100644 index 0000000..a218caf --- /dev/null +++ b/modules/monitoring/library/Monitoring/Backend/Ido/Query/UnhandledserviceproblemsQuery.php @@ -0,0 +1,48 @@ + array( + 'services_critical_unhandled' => 'COUNT(*)', + ) + ); + + /** + * The service status sub select + * + * @var ServicestatusQuery + */ + protected $subSelect; + + public function addFilter(Filter $filter) + { + $this->subSelect->applyFilter(clone $filter); + return $this; + } + + protected function joinBaseTables() + { + $this->subSelect = $this->createSubQuery( + 'Servicestatus', + array('service_description') + ); + $this->subSelect->where('service_handled', 0); + $this->subSelect->where('service_state', 2); + $this->select->from( + array('problems' => $this->subSelect->setIsSubQuery(true)), + array() + ); + $this->joinedVirtualTables['problems'] = true; + } +} -- cgit v1.2.3