From b880345a8a897b3fe600ef94a0fee5bb5f2f8558 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 28 Apr 2024 14:46:04 +0200 Subject: Adding upstream version 1.1.0. Signed-off-by: Daniel Baumann --- application/controllers/GraphController.php | 41 +++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 application/controllers/GraphController.php (limited to 'application/controllers/GraphController.php') diff --git a/application/controllers/GraphController.php b/application/controllers/GraphController.php new file mode 100644 index 0000000..312b802 --- /dev/null +++ b/application/controllers/GraphController.php @@ -0,0 +1,41 @@ +getRequest()->getUrl(); + $queryString = $url->getQueryString(); + + $this->view->url = sprintf( + '%s/graph?%s', + $this->getBaseUrl(), + $queryString + ); + + $host = $this->getParam('host'); + $service = $this->getParam('srv'); + + $serviceTitle = ''; + if ($service && $service !== '_HOST_') { + $serviceTitle = sprintf(' | %s: %s', $this->translate('Service'), $service); + } + $this->view->title = $title = sprintf('%s: %s%s', + $this->translate('Host'), + $host, + $serviceTitle + ); + + $this->getTabs()->add('graph', array( + 'label' => $title, + 'url' => $url, + ))->activate('graph'); + + $this->setViewScript('index/iframe'); + } +} -- cgit v1.2.3