Conform to coding guidelines
This commit is contained in:
parent
1586275521
commit
3187975553
|
@ -36,9 +36,9 @@ class Monitoring_DowntimesController extends Controller
|
|||
public function init()
|
||||
{
|
||||
$this->filter = Filter::fromQueryString(str_replace(
|
||||
'downtime_id',
|
||||
'downtime_internal_id',
|
||||
(string)$this->params
|
||||
'downtime_id',
|
||||
'downtime_internal_id',
|
||||
(string)$this->params
|
||||
));
|
||||
$this->downtimes = $this->backend->select()->from('downtime', array(
|
||||
'id' => 'downtime_internal_id',
|
||||
|
@ -66,22 +66,21 @@ class Monitoring_DowntimesController extends Controller
|
|||
|
||||
if (false === $this->downtimes) {
|
||||
throw new Zend_Controller_Action_Exception(
|
||||
$this->translate('Downtime not found')
|
||||
$this->translate('Downtime not found')
|
||||
);
|
||||
}
|
||||
|
||||
$this->getTabs()
|
||||
->add(
|
||||
'downtimes',
|
||||
array(
|
||||
'title' => $this->translate(
|
||||
'Display detailed information about multiple downtimes.'
|
||||
),
|
||||
'icon' => 'plug',
|
||||
'label' => $this->translate('Downtimes'),
|
||||
'url' =>'monitoring/downtimes/show'
|
||||
)
|
||||
)->activate('downtimes')->extend(new DashboardAction());
|
||||
$this->getTabs()->add(
|
||||
'downtimes',
|
||||
array(
|
||||
'title' => $this->translate(
|
||||
'Display detailed information about multiple downtimes.'
|
||||
),
|
||||
'icon' => 'plug',
|
||||
'label' => $this->translate('Downtimes'),
|
||||
'url' =>'monitoring/downtimes/show'
|
||||
)
|
||||
)->activate('downtimes');
|
||||
|
||||
foreach ($this->downtimes as $downtime) {
|
||||
if (isset($downtime->service_description)) {
|
||||
|
|
|
@ -84,7 +84,7 @@ class DeleteDowntimeCommandForm extends CommandForm
|
|||
$delDowntime = new DeleteDowntimeCommand();
|
||||
$delDowntime->setDowntimeId($id);
|
||||
$delDowntime->setDowntimeType(
|
||||
isset($firstDowntime->service_description) ?
|
||||
isset($firstDowntime->service_description) ?
|
||||
DeleteDowntimeCommand::DOWNTIME_TYPE_SERVICE :
|
||||
DeleteDowntimeCommand::DOWNTIME_TYPE_HOST
|
||||
);
|
||||
|
|
|
@ -12,6 +12,11 @@ use Icinga\Web\Notification;
|
|||
*/
|
||||
class DeleteDowntimesCommandForm extends CommandForm
|
||||
{
|
||||
/**
|
||||
* The downtimes to delete on success
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $downtimes;
|
||||
|
||||
/**
|
||||
|
@ -31,12 +36,12 @@ class DeleteDowntimesCommandForm extends CommandForm
|
|||
{
|
||||
$this->addElements(array(
|
||||
array(
|
||||
'hidden',
|
||||
'redirect',
|
||||
array(
|
||||
'decorators' => array('ViewHelper')
|
||||
)
|
||||
'hidden',
|
||||
'redirect',
|
||||
array(
|
||||
'decorators' => array('ViewHelper')
|
||||
)
|
||||
)
|
||||
));
|
||||
return $this;
|
||||
}
|
||||
|
@ -60,7 +65,7 @@ class DeleteDowntimesCommandForm extends CommandForm
|
|||
$delDowntime = new DeleteDowntimeCommand();
|
||||
$delDowntime->setDowntimeId($downtime->id);
|
||||
$delDowntime->setDowntimeType(
|
||||
isset($downtime->service_description) ?
|
||||
isset($downtime->service_description) ?
|
||||
DeleteDowntimeCommand::DOWNTIME_TYPE_SERVICE :
|
||||
DeleteDowntimeCommand::DOWNTIME_TYPE_HOST
|
||||
);
|
||||
|
@ -76,9 +81,9 @@ class DeleteDowntimesCommandForm extends CommandForm
|
|||
|
||||
/**
|
||||
* Set the downtimes to be deleted upon success
|
||||
*
|
||||
*
|
||||
* @param type $downtimes
|
||||
*
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setDowntimes($downtimes)
|
||||
|
|
Loading…
Reference in New Issue