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 ?>
<div class="history-message-output">
<?php if ($this->isOverview): ?>
<?= $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 if ($isService): ?>&#58;
<?= $this->qlink(
<?php if ($isService) {
echo '<span class="service-on">';
echo sprintf(
$this->translate('%s on %s', 'service on host'),
$this->qlink(
$event->service_display_name,
'monitoring/service/show',
[
@ -215,8 +206,33 @@ $rowAction = Url::fromPath('monitoring/event/show');
$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 ?>
<?= $this->nl2br($this->createTicketLinks($this->markdown($msg, ['class' => 'overview-plugin-output']))) ?>
</div>