[icinga-checkins] icinga.org: icingaweb2/master: Add significant title if there are no services configured

git at icinga.org git at icinga.org
Mon Nov 17 16:27:42 CET 2014


Module: icingaweb2
Branch: master
Commit: e95e5f35d8c6e0258e569391e033278f84d31f45
URL:    https://git.icinga.org/?p=icingaweb2.git;a=commit;h=e95e5f35d8c6e0258e569391e033278f84d31f45

Author: Alexander Fuhr <alexander.fuhr at netways.de>
Date:   Mon Nov 17 16:27:22 2014 +0100

Add significant title if there are no services configured

refs #7687
fixes #7687

---

 .../views/scripts/show/components/hostservicesummary.phtml        |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/modules/monitoring/application/views/scripts/show/components/hostservicesummary.phtml b/modules/monitoring/application/views/scripts/show/components/hostservicesummary.phtml
index 0390bcf..26a0da0 100644
--- a/modules/monitoring/application/views/scripts/show/components/hostservicesummary.phtml
+++ b/modules/monitoring/application/views/scripts/show/components/hostservicesummary.phtml
@@ -6,7 +6,12 @@ $currentUrl = Url::fromRequest()->without('limit')->getRelativeUrl();
 
 ?>
 <h3 class="tinystatesummary" <?= $this->compact ? ' data-base-target="col1"' : '' ?>>
+<?php if ($object->stats->services_total > 0): ?>
 <?= $this->qlink(sprintf($this->translate('%s configured services:'), $object->stats->services_total), $selfUrl) ?>
+<?php else: ?>
+<?= $this->translate('No services configured on this host'); ?>
+<?php endif; ?>
+
 <?php if ($object->stats->services_ok > 0): ?>
  <span class="state ok<?= $currentUrl === $selfUrl->with('service_state', 0)->getRelativeUrl() ? ' active' : '' ?>"><?= $this->qlink(
     $object->stats->services_ok,



More information about the icinga-checkins mailing list