parent
400f351ea5
commit
b186ce2cac
|
@ -54,6 +54,10 @@ class Monitoring_DowntimeController extends Controller
|
|||
'service_display_name'
|
||||
))->where('downtime_internal_id', $downtimeId)->getQuery()->fetchRow();
|
||||
|
||||
if (false === $this->downtime) {
|
||||
throw new Zend_Controller_Action_Exception($this->translate('Downtime not found'));
|
||||
}
|
||||
|
||||
if (isset($this->downtime->service_description)) {
|
||||
$this->isService = true;
|
||||
} else {
|
||||
|
@ -76,9 +80,6 @@ class Monitoring_DowntimeController extends Controller
|
|||
|
||||
public function showAction()
|
||||
{
|
||||
if (false === $this->downtime) {
|
||||
return;
|
||||
}
|
||||
$this->view->downtime = $this->downtime;
|
||||
$this->view->isService = $this->isService;
|
||||
$this->view->stateName = isset($this->downtime->service_description) ?
|
||||
|
|
|
@ -58,6 +58,12 @@ class Monitoring_DowntimesController extends Controller
|
|||
'host_display_name',
|
||||
'service_display_name'
|
||||
))->addFilter($this->filter)->getQuery()->fetchAll();
|
||||
if (false === $this->downtimes) {
|
||||
throw new Zend_Controller_Action_Exception(
|
||||
$this->translate('Downtime not found')
|
||||
);
|
||||
}
|
||||
|
||||
$this->getTabs()
|
||||
->add(
|
||||
'downtimes',
|
||||
|
|
|
@ -1,13 +1,7 @@
|
|||
<div class="controls">
|
||||
<?php if (! isset($downtime)): ?>
|
||||
<?= $this->translate('No scheduled downtime matching the filter.') ?>
|
||||
</div>
|
||||
<?php return; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (! $this->compact): ?>
|
||||
<?= $this->tabs; ?>
|
||||
<?php endif ?>
|
||||
<div class="controls">
|
||||
<?php if (! $this->compact): ?>
|
||||
<?= $this->tabs; ?>
|
||||
<?php endif ?>
|
||||
|
||||
<table class="action">
|
||||
<tr class="state <?= $stateName; ?><?= $downtime->is_in_effect ? ' handled' : ''; ?>">
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
<div class="controls">
|
||||
<?php if (! isset($downtimes)): ?>
|
||||
<?= $this->translate('No scheduled downtimes matching the filter.') ?>
|
||||
</div>
|
||||
<?php return; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (! $this->compact): ?>
|
||||
<?= $this->tabs; ?>
|
||||
|
|
Loading…
Reference in New Issue