From d61b7618d9c04ff90fdf8d3b584ad5976faedad9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 14 Apr 2024 15:16:36 +0200 Subject: Adding upstream version 1.3.2. Signed-off-by: Daniel Baumann --- application/controllers/ServicesController.php | 45 ++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 application/controllers/ServicesController.php (limited to 'application/controllers/ServicesController.php') diff --git a/application/controllers/ServicesController.php b/application/controllers/ServicesController.php new file mode 100644 index 0000000..0914aa2 --- /dev/null +++ b/application/controllers/ServicesController.php @@ -0,0 +1,45 @@ +createTabs()->activate('cube/services'); + + $this->renderCube(); + } + + protected function getCube(): IcingaDbCube + { + return new IcingaDbServiceStatusCube(); + } + + public function completeAction(): void + { + $suggestions = new ObjectSuggestions(); + $suggestions->setModel(Service::class); + $suggestions->forRequest($this->getServerRequest()); + $this->getDocument()->add($suggestions); + } + + public function searchEditorAction(): void + { + $editor = $this->createSearchEditor( + Service::on($this->getDb()), + $this->preserveParams + ); + + $this->getDocument()->add($editor); + $this->setTitle($this->translate('Adjust Filter')); + } +} -- cgit v1.2.3