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