From 8afdc3db1a0ce3d260502a2aee952eb89942b17c Mon Sep 17 00:00:00 2001 From: Eric Lippmann <eric.lippmann@netways.de> Date: Wed, 17 Sep 2014 09:48:30 +0200 Subject: [PATCH] monitoring: Replace show partials calls to getHost() and getService() with getName() --- .../views/scripts/show/components/acknowledgement.phtml | 4 ++-- .../views/scripts/show/components/checkstatistics.phtml | 4 ++-- .../application/views/scripts/show/components/comments.phtml | 4 ++-- .../application/views/scripts/show/components/downtime.phtml | 4 ++-- .../application/views/scripts/show/components/header.phtml | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/modules/monitoring/application/views/scripts/show/components/acknowledgement.phtml b/modules/monitoring/application/views/scripts/show/components/acknowledgement.phtml index 669a37241..2ca0ca401 100644 --- a/modules/monitoring/application/views/scripts/show/components/acknowledgement.phtml +++ b/modules/monitoring/application/views/scripts/show/components/acknowledgement.phtml @@ -10,12 +10,12 @@ if (in_array((int) $object->state, array(0, 99))) { if ($object->getType() === $object::TYPE_HOST) { $ackLink = $this->href( 'monitoring/host/acknowledge-problem', - array('host' => $object->getHost()) + array('host' => $object->getName()) ); } else { $ackLink = $this->href( 'monitoring/service/acknowledge-problem', - array('host' => $object->getHost(), 'service' => $object->getService()) + array('host' => $object->getHost()->getName(), 'service' => $object->getName()) ); } diff --git a/modules/monitoring/application/views/scripts/show/components/checkstatistics.phtml b/modules/monitoring/application/views/scripts/show/components/checkstatistics.phtml index 93020f1f2..b9ad284eb 100644 --- a/modules/monitoring/application/views/scripts/show/components/checkstatistics.phtml +++ b/modules/monitoring/application/views/scripts/show/components/checkstatistics.phtml @@ -5,12 +5,12 @@ if ($object->getType() === $object::TYPE_HOST) { $reschedule = $this->href( 'monitoring/host/reschedule-check', - array('host' => $object->getHost()) + array('host' => $object->getName()) ); } else { $reschedule = $this->href( 'monitoring/service/reschedule-check', - array('host' => $object->getHost(), 'service' => $object->getService()) + array('host' => $object->getHost()->getName(), 'service' => $object->getName()) ); } diff --git a/modules/monitoring/application/views/scripts/show/components/comments.phtml b/modules/monitoring/application/views/scripts/show/components/comments.phtml index cf65b8e04..372a17f15 100644 --- a/modules/monitoring/application/views/scripts/show/components/comments.phtml +++ b/modules/monitoring/application/views/scripts/show/components/comments.phtml @@ -8,12 +8,12 @@ if ($object->getType() === $object::TYPE_HOST) { $addCommentLink = $this->href( 'monitoring/host/add-comment', - array('host' => $object->getHost()) + array('host' => $object->getName()) ); } else { $addCommentLink = $this->href( 'monitoring/service/add-comment', - array('host' => $object->getHost(), 'service' => $object->getService()) + array('host' => $object->getHost()->getName(), 'service' => $object->getName()) ); } diff --git a/modules/monitoring/application/views/scripts/show/components/downtime.phtml b/modules/monitoring/application/views/scripts/show/components/downtime.phtml index 9198c2120..243373966 100644 --- a/modules/monitoring/application/views/scripts/show/components/downtime.phtml +++ b/modules/monitoring/application/views/scripts/show/components/downtime.phtml @@ -8,12 +8,12 @@ if ($object->getType() === $object::TYPE_HOST) { $scheduleDowntimeLink = $this->href( 'monitoring/host/schedule-downtime', - array('host' => $object->getHost()) + array('host' => $object->getName()) ); } else { $scheduleDowntimeLink = $this->href( 'monitoring/service/schedule-downtime', - array('host' => $object->getHost(), 'service' => $object->getService()) + array('host' => $object->getHost()->getName(), 'service' => $object->getName()) ); } ?> diff --git a/modules/monitoring/application/views/scripts/show/components/header.phtml b/modules/monitoring/application/views/scripts/show/components/header.phtml index 49daaae09..a2c835e4a 100644 --- a/modules/monitoring/application/views/scripts/show/components/header.phtml +++ b/modules/monitoring/application/views/scripts/show/components/header.phtml @@ -1,4 +1,4 @@ -<?php $showService = $object->service_description && $tabs->getActiveName() !== 'host' ?> +<?php $showService = $object->getType() === $object::TYPE_SERVICE ?> <?php if (!$this->compact): ?> <?= $tabs ?> <?php endif ?>