diff --git a/modules/monitoring/application/controllers/ShowController.php b/modules/monitoring/application/controllers/ShowController.php index aab3ccb0e..1a800aa5b 100644 --- a/modules/monitoring/application/controllers/ShowController.php +++ b/modules/monitoring/application/controllers/ShowController.php @@ -79,17 +79,30 @@ class Monitoring_ShowController extends ModuleActionController if ($grapher = Hook::get('grapher')) { if ($grapher->hasGraph( - $this->view->host->host_name, + $this->view->service->host_name, $this->view->service->service_description ) ) { $this->view->preview_image = $grapher->getPreviewImage( - $this->view->host->host_name, + $this->view->service->host_name, $this->view->service->service_description ); } } + $this->view->servicegroups = $this->backend->select() + ->from( + 'servicegroup', + array( + 'servicegroup_name', + 'servicegroup_alias' + ) + ) + ->where('host_name', $this->view->host->host_name) + ->where('service_description', $this->view->service->service_description) + + ->fetchPairs(); + $this->view->contacts = $this->backend->select() ->from( 'contact', @@ -350,15 +363,17 @@ class Monitoring_ShowController extends ModuleActionController 'urlParams' => $hostParams, ) ); - $tabs->add( - 'services', - array( - 'title' => 'Services', - 'icon' => 'img/classic/service.png', - 'url' => 'monitoring/show/services', - 'urlParams' => $params, - ) - ); + if (!isset($this->view->service)) { + $tabs->add( + 'services', + array( + 'title' => 'Services', + 'icon' => 'img/classic/service.png', + 'url' => 'monitoring/show/services', + 'urlParams' => $params, + ) + ); + } if (isset($params['service'])) { $tabs->add( 'service', diff --git a/modules/monitoring/application/views/helpers/Perfdata.php b/modules/monitoring/application/views/helpers/Perfdata.php index f7ae4672f..eee779911 100644 --- a/modules/monitoring/application/views/helpers/Perfdata.php +++ b/modules/monitoring/application/views/helpers/Perfdata.php @@ -6,6 +6,7 @@ class Zend_View_Helper_Perfdata extends Zend_View_Helper_Abstract { public function perfdata($perfdata, $compact = false, $float = 'right') { + if (empty($perfdata)) { return ''; } @@ -75,9 +76,15 @@ class Zend_View_Helper_Perfdata extends Zend_View_Helper_Abstract . ''; } } + if ($result == '') { + $result = $perfdata; + } if (! $compact && $result !== '') { $result = '
- service->host_icon_image): ?>
+
+ host->host_icon_image) : ?>
-
@@ -55,6 +57,25 @@ if (!$this->compact) {
|
+ host->host_action_url): ?> + + Host actions + + + host->host_notes_url): ?> + + Host notes + + + | +
@@ -76,19 +97,25 @@ if (!$this->compact) { |
+ service->service_action_url): ?> - Actions + Service actions + + service->service_notes_url): ?> - Notes + Service notes - + |