Improve host-service distinction for events

This commit is contained in:
Eric Lippmann 2019-07-26 17:24:09 +02:00
parent f7ed5de8c8
commit dc3147c652
1 changed files with 39 additions and 23 deletions

View File

@ -188,20 +188,11 @@ $rowAction = Url::fromPath('monitoring/event/show');
<?php endif ?> <?php endif ?>
<div class="history-message-output"> <div class="history-message-output">
<?php if ($this->isOverview): ?> <?php if ($this->isOverview): ?>
<?= $this->qlink( <?php if ($isService) {
$event->host_display_name, echo '<span class="service-on">';
'monitoring/host/show', echo sprintf(
[ $this->translate('%s on %s', 'service on host'),
'host' => $event->host_name, $this->qlink(
],
[
'title' => sprintf(
$this->translate('Show detailed information for host %s'),
$event->host_display_name
)
]
) ?><?php if ($isService): ?>&#58;
<?= $this->qlink(
$event->service_display_name, $event->service_display_name,
'monitoring/service/show', 'monitoring/service/show',
[ [
@ -215,8 +206,33 @@ $rowAction = Url::fromPath('monitoring/event/show');
$event->host_display_name $event->host_display_name
) )
] ]
) ?> ),
<?php endif ?> $this->qlink(
$event->host_display_name,
'monitoring/host/show',
['host' => $event->host_name],
[
'title' => sprintf(
$this->translate('Show detailed information for host %s'),
$event->host_display_name
)
]
)
);
echo '</span>';
} else {
echo $this->qlink(
$event->host_display_name,
'monitoring/host/show',
['host' => $event->host_name],
[
'title' => sprintf(
$this->translate('Show detailed information for host %s'),
$event->host_display_name
)
]
);
} ?>
<?php endif ?> <?php endif ?>
<?= $this->nl2br($this->createTicketLinks($this->markdown($msg, ['class' => 'overview-plugin-output']))) ?> <?= $this->nl2br($this->createTicketLinks($this->markdown($msg, ['class' => 'overview-plugin-output']))) ?>
</div> </div>