Adjust command links so that they'll use `host_name' instead of `host'

refs #8613
This commit is contained in:
Johannes Meyer 2015-04-09 10:27:41 +02:00
parent 09ab601942
commit b9aee47d1f
8 changed files with 16 additions and 16 deletions

View File

@ -81,9 +81,9 @@
$delCommentForm = clone $delCommentForm;
$delCommentForm->populate(array('comment_id' => $comment->id, 'redirect' => $this->url));
if ($comment->objecttype === 'host') {
$delCommentForm->setAction($this->url('monitoring/host/delete-comment', array('host' => $comment->host)));
$delCommentForm->setAction($this->url('monitoring/host/delete-comment', array('host_name' => $comment->host)));
} else {
$delCommentForm->setAction($this->url('monitoring/service/delete-comment', array('host' => $comment->host, 'service' => $comment->service)));
$delCommentForm->setAction($this->url('monitoring/service/delete-comment', array('host_name' => $comment->host, 'service' => $comment->service)));
}
echo $delCommentForm;
?>

View File

@ -120,9 +120,9 @@ use Icinga\Module\Monitoring\Object\Service;
$delDowntimeForm = clone $delDowntimeForm;
$delDowntimeForm->populate(array('downtime_id' => $downtime->id, 'redirect' => $this->url));
if (! isset($downtime->service)) {
$delDowntimeForm->setAction($this->url('monitoring/host/delete-downtime', array('host' => $downtime->host)));
$delDowntimeForm->setAction($this->url('monitoring/host/delete-downtime', array('host_name' => $downtime->host)));
} else {
$delDowntimeForm->setAction($this->url('monitoring/service/delete-downtime', array('host' => $downtime->host, 'service' => $downtime->service)));
$delDowntimeForm->setAction($this->url('monitoring/service/delete-downtime', array('host_name' => $downtime->host, 'service' => $downtime->service)));
}
echo $delDowntimeForm;
?>

View File

@ -26,12 +26,12 @@ if ($object->acknowledged): ?>
if ($object->getType() === $object::TYPE_HOST) {
$ackLink = $this->href(
'monitoring/host/acknowledge-problem',
array('host' => $object->getName())
array('host_name' => $object->getName())
);
} else {
$ackLink = $this->href(
'monitoring/service/acknowledge-problem',
array('host' => $object->getHost()->getName(), 'service' => $object->getName())
array('host_name' => $object->getHost()->getName(), 'service' => $object->getName())
);
}
?>

View File

@ -31,7 +31,7 @@ if ($object->getType() === $object::TYPE_HOST) {
echo $this->qlink(
$this->translate('Reschedule'),
'monitoring/service/reschedule-check',
array('host' => $object->getHost()->getName(), 'service' => $object->getName()),
array('host_name' => $object->getHost()->getName(), 'service' => $object->getName()),
array(
'icon' => 'reschedule',
'data-base-target' => '_self',
@ -44,7 +44,7 @@ if ($object->getType() === $object::TYPE_HOST) {
echo $this->qlink(
$this->translate('Reschedule'),
'monitoring/host/reschedule-check',
array('host' => $object->getName()),
array('host_name' => $object->getName()),
array(
'icon' => 'reschedule',
'data-base-target' => '_self',

View File

@ -15,7 +15,7 @@ $command = array_shift($parts);
echo $this->qlink(
$this->translate('Process check result'),
'monitoring/host/process-check-result',
array('host' => $object->getName()),
array('host_name' => $object->getName()),
array(
'icon' => 'reply',
'data-base-target' => '_self',
@ -26,7 +26,7 @@ $command = array_shift($parts);
echo $this->qlink(
$this->translate('Process check result'),
'monitoring/service/process-check-result',
array('host' => $object->getHost()->getName(), 'service' => $object->getName()),
array('host_name' => $object->getHost()->getName(), 'service' => $object->getName()),
array(
'icon' => 'reply',
'data-base-target' => '_self',

View File

@ -7,7 +7,7 @@
echo $this->qlink(
$this->translate('Add comment'),
'monitoring/host/add-comment',
array('host' => $object->getName()),
array('host_name' => $object->getName()),
array(
'icon' => 'comment',
'data-base-target' => '_self',
@ -18,7 +18,7 @@
echo $this->qlink(
$this->translate('Add comment'),
'monitoring/service/add-comment',
array('host' => $object->getHost()->getName(), 'service' => $object->getName()),
array('host_name' => $object->getHost()->getName(), 'service' => $object->getName()),
array(
'icon' => 'comment',
'data-base-target' => '_self',

View File

@ -7,7 +7,7 @@
echo $this->qlink(
$this->translate('Schedule downtime'),
'monitoring/host/schedule-downtime',
array('host' => $object->getName()),
array('host_name' => $object->getName()),
array(
'icon' => 'plug',
'data-base-target' => '_self',
@ -20,7 +20,7 @@
echo $this->qlink(
$this->translate('Schedule downtime'),
'monitoring/service/schedule-downtime',
array('host' => $object->getHost()->getName(), 'service' => $object->getName()),
array('host_name' => $object->getHost()->getName(), 'service' => $object->getName()),
array(
'icon' => 'plug',
'data-base-target' => '_self',

View File

@ -5,12 +5,12 @@
if ($object->getType() === $object::TYPE_HOST) {
$ackLink = $this->href(
'monitoring/host/send-custom-notification',
array('host' => $object->getName())
array('host_name' => $object->getName())
);
} else {
$ackLink = $this->href(
'monitoring/service/send-custom-notification',
array('host' => $object->getHost()->getName(), 'service' => $object->getName())
array('host_name' => $object->getHost()->getName(), 'service' => $object->getName())
);
}
?>