Fix delete comment command in host multi-view

refs #8565
This commit is contained in:
Matthias Jentsch 2015-03-06 13:27:48 +01:00
parent a077472226
commit f91ce0cfa1
2 changed files with 15 additions and 3 deletions

View File

@ -173,6 +173,18 @@ class Monitoring_HostsController extends Controller
$this->handleCommandForm($form);
}
/**
* Delete a comment
*/
public function deleteCommentAction()
{
$this->assertPermission('monitoring/command/comment/delete');
$form = new DeleteCommentCommandForm();
$form->setTitle($this->translate('Delete Host Comments'));
$this->handleCommandForm($form);
}
/**
* Acknowledge host problems
*/

View File

@ -14,8 +14,8 @@ use Icinga\Module\Monitoring\Forms\Command\Object\DeleteCommentCommandForm;
$listAllLink
); ?>
</h1>
<?= $this->render('partials/host/objects-header.phtml'); ?>
</div>
<div class="content">
@ -23,7 +23,7 @@ use Icinga\Module\Monitoring\Forms\Command\Object\DeleteCommentCommandForm;
<?= $this->icon('reschedule') ?>
<?= $this->translate('Commands') ?>
</h3>
<?= sprintf(t('Issue commands on all %d selected services:'), count($objects)) ?>
<?= sprintf(t('Issue commands on all %d selected hosts:'), count($objects)) ?>
<?php if (($hostCount = count($objects)) === 0): ?>
<?= $this->translate('No hosts matching the filter'); ?>
@ -192,7 +192,7 @@ use Icinga\Module\Monitoring\Forms\Command\Object\DeleteCommentCommandForm;
);
$delCommentForm->setAction(
$this->url(
'monitoring/service/delete-comment',
'monitoring/host/delete-comment',
array('host' => $service->getName())
)
);