From a725de8719fa9b99dae3c06eb4278312cc0fe69f Mon Sep 17 00:00:00 2001 From: "Alexander A. Klimov" Date: Mon, 4 Sep 2017 13:41:00 +0200 Subject: [PATCH] /list/{hosts,services}: make more compact refs #27 --- application/views/scripts/list/hosts.phtml | 24 +++++----- application/views/scripts/list/services.phtml | 48 ++++++++++--------- 2 files changed, 38 insertions(+), 34 deletions(-) diff --git a/application/views/scripts/list/hosts.phtml b/application/views/scripts/list/hosts.phtml index e70b7da..a9aed43 100644 --- a/application/views/scripts/list/hosts.phtml +++ b/application/views/scripts/list/hosts.phtml @@ -24,20 +24,22 @@ if ($filterEditor->getFilter()->isEmpty()) { echo '

' . $this->escape($this->translate('Please specify a filter')) . '

'; } elseif ($hosts->hasResult()) { foreach ($hosts->peekAhead($compact) as $host) { - echo '

' - . $this->qlink( - $host->host_name === $host->host_display_name - ? $host->host_display_name - : $host->host_display_name . ' (' . $this->escape($host->host_name) . ')', - Url::fromPath('monitoring/host/show', ['host' => $host->host_name]), - null, - ['data-base-target' => '_next'] - ) - . '

'; + if (! $compact) { + echo '

' + . $this->qlink( + $host->host_name === $host->host_display_name + ? $host->host_display_name + : $host->host_display_name . ' (' . $this->escape($host->host_name) . ')', + Url::fromPath('monitoring/host/show', ['host' => $host->host_name]), + null, + ['data-base-target' => '_next'] + ) + . '

'; + } echo EmbedGraphs::host($host->host_name); } - if ($hosts->hasMore()) { + if (! $compact && $hosts->hasMore()) { echo '