mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-31 01:34:09 +02:00
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()
|
public function init()
|
||||||
{
|
{
|
||||||
$this->filter = Filter::fromQueryString(str_replace(
|
$this->filter = Filter::fromQueryString(str_replace(
|
||||||
'downtime_id',
|
'downtime_id',
|
||||||
'downtime_internal_id',
|
'downtime_internal_id',
|
||||||
(string)$this->params
|
(string)$this->params
|
||||||
));
|
));
|
||||||
$this->downtimes = $this->backend->select()->from('downtime', array(
|
$this->downtimes = $this->backend->select()->from('downtime', array(
|
||||||
'id' => 'downtime_internal_id',
|
'id' => 'downtime_internal_id',
|
||||||
@ -66,22 +66,21 @@ class Monitoring_DowntimesController extends Controller
|
|||||||
|
|
||||||
if (false === $this->downtimes) {
|
if (false === $this->downtimes) {
|
||||||
throw new Zend_Controller_Action_Exception(
|
throw new Zend_Controller_Action_Exception(
|
||||||
$this->translate('Downtime not found')
|
$this->translate('Downtime not found')
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->getTabs()
|
$this->getTabs()->add(
|
||||||
->add(
|
'downtimes',
|
||||||
'downtimes',
|
array(
|
||||||
array(
|
'title' => $this->translate(
|
||||||
'title' => $this->translate(
|
'Display detailed information about multiple downtimes.'
|
||||||
'Display detailed information about multiple downtimes.'
|
),
|
||||||
),
|
'icon' => 'plug',
|
||||||
'icon' => 'plug',
|
'label' => $this->translate('Downtimes'),
|
||||||
'label' => $this->translate('Downtimes'),
|
'url' =>'monitoring/downtimes/show'
|
||||||
'url' =>'monitoring/downtimes/show'
|
)
|
||||||
)
|
)->activate('downtimes');
|
||||||
)->activate('downtimes')->extend(new DashboardAction());
|
|
||||||
|
|
||||||
foreach ($this->downtimes as $downtime) {
|
foreach ($this->downtimes as $downtime) {
|
||||||
if (isset($downtime->service_description)) {
|
if (isset($downtime->service_description)) {
|
||||||
|
@ -12,6 +12,11 @@ use Icinga\Web\Notification;
|
|||||||
*/
|
*/
|
||||||
class DeleteDowntimesCommandForm extends CommandForm
|
class DeleteDowntimesCommandForm extends CommandForm
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* The downtimes to delete on success
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
protected $downtimes;
|
protected $downtimes;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -31,12 +36,12 @@ class DeleteDowntimesCommandForm extends CommandForm
|
|||||||
{
|
{
|
||||||
$this->addElements(array(
|
$this->addElements(array(
|
||||||
array(
|
array(
|
||||||
'hidden',
|
'hidden',
|
||||||
'redirect',
|
'redirect',
|
||||||
array(
|
array(
|
||||||
'decorators' => array('ViewHelper')
|
'decorators' => array('ViewHelper')
|
||||||
)
|
|
||||||
)
|
)
|
||||||
|
)
|
||||||
));
|
));
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user