From b61a732eaa0089a73391bd623f79f0f738351fc0 Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Thu, 6 Mar 2014 10:35:11 +0000 Subject: [PATCH] Clean up service list view script, obsolete compact variant --- .../controllers/ListController.php | 1 - .../views/scripts/list/services.phtml | 158 +++++++++--------- 2 files changed, 75 insertions(+), 84 deletions(-) diff --git a/modules/monitoring/application/controllers/ListController.php b/modules/monitoring/application/controllers/ListController.php index 52a5b37b7..6ee675253 100644 --- a/modules/monitoring/application/controllers/ListController.php +++ b/modules/monitoring/application/controllers/ListController.php @@ -169,7 +169,6 @@ class Monitoring_ListController extends MonitoringController ))->activate('services'); $this->view->title = 'Service Status'; $this->setAutorefreshInterval(10); - $this->compactView = 'services-compact'; $query = $this->fetchServices(); $this->applyRestrictions($query); $this->view->services = $query->paginate(); diff --git a/modules/monitoring/application/views/scripts/list/services.phtml b/modules/monitoring/application/views/scripts/list/services.phtml index 008151b7d..0faa32c48 100644 --- a/modules/monitoring/application/views/scripts/list/services.phtml +++ b/modules/monitoring/application/views/scripts/list/services.phtml @@ -1,6 +1,7 @@ getHelper('MonitoringState'); -?> + +if (!$this->compact): ?>
tabs ?>
@@ -14,7 +15,8 @@ $helper = $this->getHelper('MonitoringState');
- + +
util()->getServiceStateName($service->service_state)); ?> - - - - - - - - - +

escape(substr(strip_tags($service->service_output), 0, 10000)); ?>

+ + +
- monitoringState($service, 'service')); ?>
- -
- Since timeSince($service->service_last_state_change); ?> - service_state): ?> -
- service_state_type === '1') ? 'Hard' : 'Soft'; ?> - service_attempt; ?> - -
- -
perfdata($service->service_perfdata, true) ?> - + + service_handled && $service->service_state > 0): ?> + img('img/icons/unhandled.png', array( + 'title' => 'Unhandled', + 'align' => 'right' + )) ?> + + + service_acknowledged && !$service->service_in_downtime): ?> + img('img/icons/acknowledgement.png', array( + 'title' => 'Acknowledged', + 'align' => 'right' + )) ?> + + + service_is_flapping): ?> + img('img/icons/flapping.png', array( + 'title' => 'Flapping', + 'align' => 'right' + )) ?> + + + service_notifications_enabled): ?> + img('img/icons/notification_disabled.png', array( + 'title' => 'Notifications Disabled', + 'align' => 'right' + )) ?> + + + service_in_downtime): ?> + img('img/icons/in_downtime.png', array( + 'title' => 'In Downtime', + 'align' => 'right' + )) ?> + + + service_active_checks_enabled): ?> + service_passive_checks_enabled): ?> + img('img/icons/active_passive_checks_disabled.png', array( + 'title' => 'Active And Passive Checks Disabled', + 'align' => 'right' + )) ?> + + img('img/icons/active_checks_disabled.png', array( + 'title' => 'Active Checks Disabled', + 'align' => 'right' + )) ?> + + + + service_icon_image): ?> + img($this->resolveMacros($service->service_icon_image, $service), array('align' => 'left')) ?> + service_display_name ?> on host_name; ?> host_state != 0): ?> - (monitoringState($service, 'host')); ?>) - +(monitoringState($service, 'host')); ?>) +
-

escape(substr(strip_tags($service->service_output), 0, 10000)); ?>

-
+compact): ?>
+