monitoring: Improve tooltips for hosts command links

refs #8110
This commit is contained in:
Eric Lippmann 2015-02-03 12:34:22 +01:00
parent 61fde8b359
commit 31728fd024
2 changed files with 46 additions and 20 deletions

View File

@ -121,7 +121,7 @@ class Monitoring_HostsController extends Controller
$this->view->objectsInDowntime = $objectsInDowntime;
$this->view->inDowntimeLink = Url::fromPath('monitoring/list/downtimes')
->setQueryString(Filter::matchAny($downtimeFilterExpressions)->toQueryString());
$this->view->havingCommentsLink = Url::fromRequest()
$this->view->commentsLink = Url::fromRequest()
->setPath('monitoring/list/comments');
$this->view->hostStatesPieChart = $this->createPieChart(
$hostStates,

View File

@ -76,17 +76,43 @@
) ?>
</h3>
<div>
<a href="<?= $downtimeUnhandledLink ?>"
title="<?= $this->translate('Schedule downtimes for unhandled problem hosts') ?>">
<a href="<?= $downtimeUnhandledLink ?>" title="<?= sprintf(
$this->translatePlural(
'Schedule downtime for %u unhandled host problem',
'Schedule downtimes for %u unhandled host problems',
$unhandledCount
),
$unhandledCount
) ?>">
<?= $this->icon('plug') ?>
<?= $this->translate('Schedule downtimes for unhandled problem hosts') ?>
<?= sprintf(
$this->translatePlural(
'Schedule downtime for unhandled host problem',
'Schedule downtimes for unhandled host problems',
$unhandledCount
),
$unhandledCount
) ?>
</a>
</div>
<div>
<a href="<?= $acknowledgeUnhandledLink ?>"
title="<?= $this->translate('Acknowledge unhandled problem hosts') ?>">
<a href="<?= $acknowledgeUnhandledLink ?>" title="<?= sprintf(
$this->translatePlural(
'Acknowledge %u unhandled host problem',
'Acknowledge %u unhandled host problems',
$unhandledCount
),
$unhandledCount
) ?>">
<?= $this->icon('ok') ?>
<?= $this->translate('Acknowledge unhandled problem hosts') ?>
<?= sprintf(
$this->translatePlural(
'Acknowledge unhandled host problem',
'Acknowledge unhandled host problems',
$unhandledCount
),
$unhandledCount
) ?>
</a>
</div>
<?php endif ?>
@ -123,8 +149,8 @@
<?= $this->icon('plug') ?>
<?= sprintf(
$this->translatePlural(
'%u host is in downtime',
'%u hosts are in downtime',
'List %u host currently in downtime',
'List %u hosts currently downtime',
$inDowntimeCount
),
$inDowntimeCount
@ -133,26 +159,26 @@
</h2>
<?php endif ?>
<?php $havingCommentsCount = count($objects->getComments()) ?>
<?php if ($havingCommentsCount): ?>
<?php $commentCount = count($objects->getComments()) ?>
<?php if ($commentCount): ?>
<h2>
<a href="<?= $havingCommentsLink ?>"
<a href="<?= $commentsLink ?>"
title="<?= sprintf(
$this->translatePlural(
'List %u host having comments',
'List %u hosts having comments',
$havingCommentsLink
'List %u host comment',
'List %u host comments',
$commentCount
),
$havingCommentsLink
$commentCount
) ?>">
<?= $this->icon('comment') ?>
<?= sprintf(
$this->translatePlural(
'%u comment',
'%u comments',
$havingCommentsCount
'List %u host comment',
'List %u host comments',
$commentCount
),
$havingCommentsCount
$commentCount
) ?>
</a>
</h2>