diff --git a/modules/monitoring/application/views/scripts/list/components/hostssummary.phtml b/modules/monitoring/application/views/scripts/list/components/hostssummary.phtml index 64bd63165..fc7d30867 100644 --- a/modules/monitoring/application/views/scripts/list/components/hostssummary.phtml +++ b/modules/monitoring/application/views/scripts/list/components/hostssummary.phtml @@ -4,79 +4,133 @@ use Icinga\Web\Url; $selfUrl = 'monitoring/list/hosts'; $currentUrl = Url::fromRequest()->getRelativeUrl(); -?>
compact ? ' data-base-target="col1"' : '' ?>> - qlink(sprintf($this->translate('%s hosts:'), $this->stats->hosts_total), $selfUrl); ?> +?>
compact ? ' data-base-target="col1"' : ''; ?>> + translate('%s hosts:'), $this->stats->hosts_total); ?> - stats->hosts_up): ?> - + stats->hosts_up): ?> + qlink( $this->stats->hosts_up, $selfUrl, array('host_state' => 0), - array('title' => $this->translate('Hosts with state UP')) - ) ?> + array('title' => sprintf( + $this->translatePlural( + 'List %u host that is currently in state UP', + 'List %u hosts which are currently in state UP', + $this->stats->hosts_up + ), + $this->stats->hosts_up + )) + ); ?> - stats->hosts_down_unhandled): ?> - + stats->hosts_down_unhandled): ?> + qlink( $this->stats->hosts_down_unhandled, $selfUrl, - array('host_state' => 1, 'host_unhandled' => 1), - array('title' => $this->translate('Unhandled hosts with state DOWN')) - ) ?> + array( + 'host_state' => 1, + 'host_unhandled' => 1 + ), + array('title' => sprintf( + $this->translatePlural( + 'List %u host that is currently in state DOWN', + 'List %u hosts which are currently in state DOWN', + $this->stats->hosts_down_unhandled + ), + $this->stats->hosts_down_unhandled + )) + ); ?> - stats->hosts_down_handled > 0): ?> - - qlink( - $this->stats->hosts_down_handled, - $selfUrl, - array('host_state' => 1, 'host_unhandled' => 0), - array('title' => $this->translate('Handled hosts with state DOWN')) - ) ?> - - + stats->hosts_down_handled): ?> + + qlink( + $this->stats->hosts_down_handled, + $selfUrl, + array( + 'host_state' => 1, + 'host_unhandled' => 0 + ), + array('title' => sprintf( + $this->translatePlural( + 'List %u host that is currently in state DOWN (Acknowledged)', + 'List %u hosts which are currently in state DOWN (Acknowledged)', + $this->stats->hosts_down_handled + ), + $this->stats->hosts_down_handled + )) + ); ?> + + stats->hosts_down): ?> stats->hosts_unreachable_unhandled): ?> - + qlink( $this->stats->hosts_unreachable_unhandled, $selfUrl, - array('host_state' => 2, 'host_unhandled' => 1), - array('title' => $this->translate('Unhandled hosts with state UNREACHABLE')) - ) ?> + array( + 'host_state' => 2, + 'host_unhandled' => 1 + ), + array('title' => sprintf( + $this->translatePlural( + 'List %u host that is currently in state UNREACHABLE', + 'List %u hosts which are currently in state UNREACHABLE', + $this->stats->hosts_unreachable_unhandled + ), + $this->stats->hosts_unreachable_unhandled + )) + ); ?> - stats->hosts_unreachable_handled > 0): ?> - - qlink( - $this->stats->hosts_unreachable_handled, - $selfUrl, - array('host_state' => 2, 'host_unhandled' => 0), - array('title' => $this->translate('Handled hosts with state UNREACHABLE')) - ) ?> - - + stats->hosts_unreachable_handled > 0): ?> + + qlink( + $this->stats->hosts_unreachable_handled, + $selfUrl, + array( + 'host_state' => 2, + 'host_unhandled' => 0 + ), + array('title' => sprintf( + $this->translatePlural( + 'List %u host that is currently in state UNREACHABLE (Acknowledged)', + 'List %u hosts which are currently in state UNREACHABLE (Acknowledged)', + $this->stats->hosts_unreachable_handled + ), + $this->stats->hosts_unreachable_handled + )) + ); ?> + + stats->hosts_unreachable): ?> stats->hosts_pending): ?> - + qlink( $this->stats->hosts_pending, $selfUrl, array('host_state' => 99), - array('title' => $this->translate('Hosts with state PENDING')) - ) ?> + array('title' => sprintf( + $this->translatePlural( + 'List %u host that is currently in state PENDING', + 'List %u hosts which are currently in state PENDING', + $this->stats->hosts_pending + ), + $this->stats->hosts_pending + )) + ); ?> -
+
\ No newline at end of file