diff --git a/modules/monitoring/application/controllers/HostsController.php b/modules/monitoring/application/controllers/HostsController.php index 8298f456b..48b068705 100644 --- a/modules/monitoring/application/controllers/HostsController.php +++ b/modules/monitoring/application/controllers/HostsController.php @@ -43,6 +43,13 @@ class Monitoring_HostsController extends Controller public function showAction() { + $this->getTabs()->add( + 'show', + array( + 'title' => t('Hosts'), + 'url' => Url::fromRequest() + ) + )->activate('show'); $this->setAutorefreshInterval(15); $checkNowForm = new CheckNowCommandForm(); $checkNowForm diff --git a/modules/monitoring/application/controllers/ServicesController.php b/modules/monitoring/application/controllers/ServicesController.php index 633ff521b..c421ed881 100644 --- a/modules/monitoring/application/controllers/ServicesController.php +++ b/modules/monitoring/application/controllers/ServicesController.php @@ -43,6 +43,13 @@ class Monitoring_ServicesController extends Controller public function showAction() { + $this->getTabs()->add( + 'show', + array( + 'title' => t('Services'), + 'url' => Url::fromRequest() + ) + )->activate('show'); $this->setAutorefreshInterval(15); $checkNowForm = new CheckNowCommandForm(); $checkNowForm diff --git a/modules/monitoring/application/views/scripts/hosts/show.phtml b/modules/monitoring/application/views/scripts/hosts/show.phtml index 14d160c1e..e43198780 100644 --- a/modules/monitoring/application/views/scripts/hosts/show.phtml +++ b/modules/monitoring/application/views/scripts/hosts/show.phtml @@ -5,26 +5,23 @@ = $this->translate('No hosts matching the filter') ?> -
| = sprintf($this->translate('%u Hosts'), array_sum(array_values($hostStates))) ?> | -|
|---|---|
| - = $this->hostStatesPieChart ?> - | -
-
+ = sprintf($this->translate('Hosts (%u)'), array_sum(array_values($hostStates))) ?>
+
+
+ = $this->hostStatesPieChart ?>
+
+
+ $count) {
+ echo sprintf('%s: %u
- foreach (array_filter($hostStates) as $text => $count) {
- echo sprintf('%s: %u', strtoupper($text), $count); + } ?> + ', strtoupper($text), $count); - } - - ?> - |
-
| = sprintf($this->translate('%u Services'), array_sum(array_values($serviceStates))) ?> | -= sprintf($this->translate('%u Hosts'), array_sum(array_values($hostStates))) ?> | -||
|---|---|---|---|
| - = $this->serviceStatesPieChart ?> - | -
- $count) {
- echo sprintf('%s: %u ', strtoupper($text), $count); - } +
+
- ?>
-
+ = sprintf($this->translate('Services (%u)'), array_sum(array_values($serviceStates))) ?>
+
+
+ = $this->serviceStatesPieChart ?>
+
+
+ $count) {
+ echo sprintf(' %s: %u
+ ', strtoupper($text), $count); + } ?> + |
- - = $this->hostStatesPieChart ?> - | -
- $count) {
- echo sprintf('%s: %u ', strtoupper($text), $count); - } - - ?> - |
-