From 3e7738470003491d59c16dd647224aa7df0d71ec Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Wed, 4 Nov 2015 17:48:12 +0100 Subject: [PATCH] monitoring/CSS: Add state-table where appropriate refs #5543 --- .../views/scripts/list/downtimes.phtml | 2 +- .../views/scripts/list/hosts.phtml | 2 +- .../views/scripts/list/notifications.phtml | 2 +- .../views/scripts/list/services.phtml | 2 +- .../scripts/partials/event-history.phtml | 2 +- .../scripts/partials/object/host-header.phtml | 2 +- .../partials/object/service-header.phtml | 2 +- .../scripts/show/components/checksource.phtml | 24 +++++++++---------- 8 files changed, 18 insertions(+), 20 deletions(-) diff --git a/modules/monitoring/application/views/scripts/list/downtimes.phtml b/modules/monitoring/application/views/scripts/list/downtimes.phtml index f6e3301ee..56be44ffd 100644 --- a/modules/monitoring/application/views/scripts/list/downtimes.phtml +++ b/modules/monitoring/application/views/scripts/list/downtimes.phtml @@ -16,7 +16,7 @@ if (! $this->compact): ?>
" data-icinga-multiselect-data="downtime_id"> diff --git a/modules/monitoring/application/views/scripts/list/hosts.phtml b/modules/monitoring/application/views/scripts/list/hosts.phtml index d93af83eb..53b543625 100644 --- a/modules/monitoring/application/views/scripts/list/hosts.phtml +++ b/modules/monitoring/application/views/scripts/list/hosts.phtml @@ -22,7 +22,7 @@ if (! $this->compact): ?>
" data-icinga-multiselect-data="host"> diff --git a/modules/monitoring/application/views/scripts/list/notifications.phtml b/modules/monitoring/application/views/scripts/list/notifications.phtml index 48e130aee..a70eb6932 100644 --- a/modules/monitoring/application/views/scripts/list/notifications.phtml +++ b/modules/monitoring/application/views/scripts/list/notifications.phtml @@ -18,7 +18,7 @@ if (! $this->compact): ?>

translate('No notifications found matching the filter.') ?>

-
+
peekAhead($this->compact) as $notification): if (isset($notification->service_description)) { diff --git a/modules/monitoring/application/views/scripts/list/services.phtml b/modules/monitoring/application/views/scripts/list/services.phtml index 848a91196..6d89ceda2 100644 --- a/modules/monitoring/application/views/scripts/list/services.phtml +++ b/modules/monitoring/application/views/scripts/list/services.phtml @@ -23,7 +23,7 @@ if (! $this->compact): ?>
diff --git a/modules/monitoring/application/views/scripts/partials/event-history.phtml b/modules/monitoring/application/views/scripts/partials/event-history.phtml index d8f0b720c..e7ae0e034 100644 --- a/modules/monitoring/application/views/scripts/partials/event-history.phtml +++ b/modules/monitoring/application/views/scripts/partials/event-history.phtml @@ -31,7 +31,7 @@ $history->limit($limit * $page);

translate('No historical events found matching the filter.') ?>

-
class=""> +
class=""> peekAhead() as $event): $icon = ''; diff --git a/modules/monitoring/application/views/scripts/partials/object/host-header.phtml b/modules/monitoring/application/views/scripts/partials/object/host-header.phtml index c24ddae49..517b590a6 100644 --- a/modules/monitoring/application/views/scripts/partials/object/host-header.phtml +++ b/modules/monitoring/application/views/scripts/partials/object/host-header.phtml @@ -2,7 +2,7 @@ use Icinga\Module\Monitoring\Object\Host; /** @var Host $object */ ?> -
+
host_state, true) ?>
diff --git a/modules/monitoring/application/views/scripts/partials/object/service-header.phtml b/modules/monitoring/application/views/scripts/partials/object/service-header.phtml index 37f56dc64..7bd99b469 100644 --- a/modules/monitoring/application/views/scripts/partials/object/service-header.phtml +++ b/modules/monitoring/application/views/scripts/partials/object/service-header.phtml @@ -3,7 +3,7 @@ use Icinga\Module\Monitoring\Object\Host; use Icinga\Module\Monitoring\Object\Service; /** @var \Icinga\Module\Monitoring\Object\MonitoredObject $object */ ?> - +
host_state, true) ?>
diff --git a/modules/monitoring/application/views/scripts/show/components/checksource.phtml b/modules/monitoring/application/views/scripts/show/components/checksource.phtml index 011288542..5e65e9d33 100644 --- a/modules/monitoring/application/views/scripts/show/components/checksource.phtml +++ b/modules/monitoring/application/views/scripts/show/components/checksource.phtml @@ -4,19 +4,17 @@ translate('Check Source') ?>
-

- is_reachable !== null) { - if ((bool) $object->is_reachable) { - echo $this->icon('circle', $this->translate('Is reachable'), array('class' => 'fg-color-ok')); - } else { - echo $this->icon('circle', $this->translate('Not reachable'), array('class' => 'fg-color-critical')); - } - } ?> - escape($object->check_source) ?> - is_reachable !== null): ?> - is_reachable ? $this->translate('is reachable') : $this->translate('is not reachable') ?> - -

+ is_reachable !== null) { + if ((bool) $object->is_reachable) { + echo $this->icon('circle', $this->translate('Is reachable'), array('class' => 'fg-color-ok')); + } else { + echo $this->icon('circle', $this->translate('Not reachable'), array('class' => 'fg-color-critical')); + } + } ?> + escape($object->check_source) ?> + is_reachable !== null): ?> + is_reachable ? $this->translate('is reachable') : $this->translate('is not reachable') ?> +