monitoring: Replace show partials calls to getHost() and getService() with getName()

This commit is contained in:
Eric Lippmann 2014-09-17 09:48:30 +02:00
parent 5cdcf36243
commit 8afdc3db1a
5 changed files with 9 additions and 9 deletions

View File

@ -10,12 +10,12 @@ if (in_array((int) $object->state, array(0, 99))) {
if ($object->getType() === $object::TYPE_HOST) { if ($object->getType() === $object::TYPE_HOST) {
$ackLink = $this->href( $ackLink = $this->href(
'monitoring/host/acknowledge-problem', 'monitoring/host/acknowledge-problem',
array('host' => $object->getHost()) array('host' => $object->getName())
); );
} else { } else {
$ackLink = $this->href( $ackLink = $this->href(
'monitoring/service/acknowledge-problem', 'monitoring/service/acknowledge-problem',
array('host' => $object->getHost(), 'service' => $object->getService()) array('host' => $object->getHost()->getName(), 'service' => $object->getName())
); );
} }

View File

@ -5,12 +5,12 @@
if ($object->getType() === $object::TYPE_HOST) { if ($object->getType() === $object::TYPE_HOST) {
$reschedule = $this->href( $reschedule = $this->href(
'monitoring/host/reschedule-check', 'monitoring/host/reschedule-check',
array('host' => $object->getHost()) array('host' => $object->getName())
); );
} else { } else {
$reschedule = $this->href( $reschedule = $this->href(
'monitoring/service/reschedule-check', 'monitoring/service/reschedule-check',
array('host' => $object->getHost(), 'service' => $object->getService()) array('host' => $object->getHost()->getName(), 'service' => $object->getName())
); );
} }

View File

@ -8,12 +8,12 @@
if ($object->getType() === $object::TYPE_HOST) { if ($object->getType() === $object::TYPE_HOST) {
$addCommentLink = $this->href( $addCommentLink = $this->href(
'monitoring/host/add-comment', 'monitoring/host/add-comment',
array('host' => $object->getHost()) array('host' => $object->getName())
); );
} else { } else {
$addCommentLink = $this->href( $addCommentLink = $this->href(
'monitoring/service/add-comment', 'monitoring/service/add-comment',
array('host' => $object->getHost(), 'service' => $object->getService()) array('host' => $object->getHost()->getName(), 'service' => $object->getName())
); );
} }

View File

@ -8,12 +8,12 @@
if ($object->getType() === $object::TYPE_HOST) { if ($object->getType() === $object::TYPE_HOST) {
$scheduleDowntimeLink = $this->href( $scheduleDowntimeLink = $this->href(
'monitoring/host/schedule-downtime', 'monitoring/host/schedule-downtime',
array('host' => $object->getHost()) array('host' => $object->getName())
); );
} else { } else {
$scheduleDowntimeLink = $this->href( $scheduleDowntimeLink = $this->href(
'monitoring/service/schedule-downtime', 'monitoring/service/schedule-downtime',
array('host' => $object->getHost(), 'service' => $object->getService()) array('host' => $object->getHost()->getName(), 'service' => $object->getName())
); );
} }
?> ?>

View File

@ -1,4 +1,4 @@
<?php $showService = $object->service_description && $tabs->getActiveName() !== 'host' ?> <?php $showService = $object->getType() === $object::TYPE_SERVICE ?>
<?php if (!$this->compact): ?> <?php if (!$this->compact): ?>
<?= $tabs ?> <?= $tabs ?>
<?php endif ?> <?php endif ?>