Conform to coding guidelines
This commit is contained in:
parent
c6c78989a5
commit
83efc3a4a3
|
@ -82,7 +82,7 @@ class Monitoring_DowntimeController extends Controller
|
|||
'label' => $this->translate('Downtime'),
|
||||
'url' =>'monitoring/downtimes/show'
|
||||
)
|
||||
)->activate('downtime')->extend(new DashboardAction());
|
||||
)->activate('downtime')->extend(new DashboardAction());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -92,7 +92,7 @@ class Monitoring_DowntimeController extends Controller
|
|||
{
|
||||
$this->view->downtime = $this->downtime;
|
||||
$this->view->isService = $this->isService;
|
||||
$this->view->stateName = isset($this->downtime->service_description) ?
|
||||
$this->view->stateName = isset($this->downtime->service_description) ?
|
||||
Service::getStateText($this->downtime->service_state) :
|
||||
Host::getStateText($this->downtime->host_state);
|
||||
$this->view->listAllLink = Url::fromPath('monitoring/list/downtimes');
|
||||
|
|
|
@ -18,11 +18,12 @@
|
|||
<td>
|
||||
<?= $this->icon('service', $this->translate('Service')); ?>
|
||||
<?= $this->link()->service(
|
||||
$this->comment->service_description,
|
||||
$this->comment->service_display_name,
|
||||
$this->comment->host_name,
|
||||
$this->comment->host_display_name
|
||||
); ?>
|
||||
$this->comment->service_description,
|
||||
$this->comment->service_display_name,
|
||||
$this->comment->host_name,
|
||||
$this->comment->host_display_name
|
||||
);
|
||||
?>
|
||||
</td>
|
||||
<?php else: ?>
|
||||
<th> <?= $this->translate('Host') ?> </th>
|
||||
|
@ -31,7 +32,8 @@
|
|||
<?= $this->link()->host(
|
||||
$this->comment->host_name,
|
||||
$this->comment->host_display_name
|
||||
); ?>
|
||||
);
|
||||
?>
|
||||
</td>
|
||||
<?php endif ?>
|
||||
</tr>
|
||||
|
@ -55,10 +57,11 @@
|
|||
<th><?= $this->translate('Expires') ?></th>
|
||||
<td>
|
||||
<?= $this->comment->expiration ? sprintf(
|
||||
$this->translate('This comment expires on %s at %s.'),
|
||||
date('d.m.y', $this->comment->expiration),
|
||||
date('H:i', $this->comment->expiration)
|
||||
) : $this->translate('This comment does not expire.'); ?>
|
||||
$this->translate('This comment expires on %s at %s.'),
|
||||
date('d.m.y', $this->comment->expiration),
|
||||
date('H:i', $this->comment->expiration)
|
||||
) : $this->translate('This comment does not expire.');
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
|
|
@ -62,7 +62,7 @@ abstract class MonitoredObjectController extends Controller
|
|||
->handleRequest();
|
||||
$this->view->checkNowForm = $checkNowForm;
|
||||
}
|
||||
if ( ! in_array((int) $this->object->state, array(0, 99))) {
|
||||
if (! in_array((int) $this->object->state, array(0, 99))) {
|
||||
if ((bool) $this->object->acknowledged) {
|
||||
if ($auth->hasPermission('monitoring/command/remove-acknowledgement')) {
|
||||
$removeAckForm = new RemoveAcknowledgementCommandForm();
|
||||
|
|
Loading…
Reference in New Issue