parent
67b1309834
commit
23841b635e
|
@ -83,11 +83,13 @@ class HostsController extends Controller
|
|||
public function showAction()
|
||||
{
|
||||
$this->setAutorefreshInterval(15);
|
||||
$checkNowForm = new CheckNowCommandForm();
|
||||
$checkNowForm
|
||||
->setObjects($this->hostList)
|
||||
->handleRequest();
|
||||
$this->view->checkNowForm = $checkNowForm;
|
||||
if ($this->Auth()->hasPermission('monitoring/command/schedule-check')) {
|
||||
$checkNowForm = new CheckNowCommandForm();
|
||||
$checkNowForm
|
||||
->setObjects($this->hostList)
|
||||
->handleRequest();
|
||||
$this->view->checkNowForm = $checkNowForm;
|
||||
}
|
||||
|
||||
$acknowledgedObjects = $this->hostList->getAcknowledgedObjects();
|
||||
if (! empty($acknowledgedObjects)) {
|
||||
|
|
|
@ -174,10 +174,12 @@
|
|||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th> <?= $this->translate('Schedule Check') ?> </th>
|
||||
<td> <?= $checkNowForm ?> </td>
|
||||
</tr>
|
||||
<?php if (isset($checkNowForm)): // Form is unset if the current user lacks the respective permission ?>
|
||||
<tr>
|
||||
<th> <?= $this->translate('Schedule Check') ?> </th>
|
||||
<td> <?= $checkNowForm ?> </td>
|
||||
</tr>
|
||||
<?php endif ?>
|
||||
|
||||
<tr>
|
||||
<th></th>
|
||||
|
|
Loading…
Reference in New Issue