mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-27 07:44:04 +02:00
parent
5cb9c67443
commit
4d98b64a1b
@ -49,8 +49,7 @@ class AcknowledgeForm extends CommandForm
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Interface method to build the form
|
* Create the form's elements
|
||||||
* @see CommandForm::create
|
|
||||||
*/
|
*/
|
||||||
protected function create()
|
protected function create()
|
||||||
{
|
{
|
||||||
|
@ -29,17 +29,19 @@
|
|||||||
namespace Monitoring\Form\Command;
|
namespace Monitoring\Form\Command;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Form to handle DelayNotification command
|
* Form for the delay notification command
|
||||||
*/
|
*/
|
||||||
class DelayNotificationForm extends CommandForm
|
class DelayNotificationForm extends CommandForm
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Biggest value for minutes
|
* Maximum delay amount in minutes
|
||||||
*/
|
*/
|
||||||
const MAX_VALUE = 1440;
|
const MAX_DELAY = 1440; // 1 day
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Interface method to build the form
|
* Create the form's elements
|
||||||
* @see CommandForm::create
|
*
|
||||||
|
* @see CommandForm::create()
|
||||||
*/
|
*/
|
||||||
protected function create()
|
protected function create()
|
||||||
{
|
{
|
||||||
@ -47,7 +49,7 @@ class DelayNotificationForm extends CommandForm
|
|||||||
'text',
|
'text',
|
||||||
'minutes',
|
'minutes',
|
||||||
array(
|
array(
|
||||||
'label' => t('Notification delay'),
|
'label' => t('Notification Delay (minutes from now)'),
|
||||||
'style' => 'width: 80px;',
|
'style' => 'width: 80px;',
|
||||||
'value' => 0,
|
'value' => 0,
|
||||||
'required' => true,
|
'required' => true,
|
||||||
@ -57,16 +59,22 @@ class DelayNotificationForm extends CommandForm
|
|||||||
true,
|
true,
|
||||||
array(
|
array(
|
||||||
'min' => 1,
|
'min' => 1,
|
||||||
'max' => self::MAX_VALUE
|
'max' => self::MAX_DELAY
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->addNote('Delay next notification in minutes from now');
|
$this->addNote(
|
||||||
|
t(
|
||||||
|
'Delay the next problem notification. The notification delay will be '
|
||||||
|
. 'disregarded if the host/service changes state before the next notification is '
|
||||||
|
. 'scheduled to be sent out.'
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
$this->setSubmitLabel(t('Delay notification'));
|
$this->setSubmitLabel(t('Delay Notification'));
|
||||||
|
|
||||||
parent::create();
|
parent::create();
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,7 @@ namespace Monitoring\Form\Command;
|
|||||||
use Icinga\Exception\ProgrammingError;
|
use Icinga\Exception\ProgrammingError;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Form for command SubmitPassiveCheckResult
|
* Form for submitting passive check results
|
||||||
*/
|
*/
|
||||||
class SubmitPassiveCheckResultForm extends CommandForm
|
class SubmitPassiveCheckResultForm extends CommandForm
|
||||||
{
|
{
|
||||||
@ -116,8 +116,9 @@ class SubmitPassiveCheckResultForm extends CommandForm
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Interface method to build the form
|
* Create the form's elements
|
||||||
* @see CommandForm::create
|
*
|
||||||
|
* @see CommandForm::create()
|
||||||
*/
|
*/
|
||||||
protected function create()
|
protected function create()
|
||||||
{
|
{
|
||||||
|
@ -29,18 +29,19 @@
|
|||||||
namespace Monitoring\Form\Command;
|
namespace Monitoring\Form\Command;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class handle specific command flags
|
* Base class for command forms which allow to propagate the command to child objects too
|
||||||
*/
|
*/
|
||||||
abstract class WithChildrenCommandForm extends CommandForm
|
abstract class WithChildrenCommandForm extends CommandForm
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Flag if we handle child objects as well
|
* Whether to include all objects beyond as well
|
||||||
* @var bool
|
* @var bool
|
||||||
*/
|
*/
|
||||||
private $withChildren = false;
|
private $withChildren = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Setter for withChildren
|
* Setter for withChildren
|
||||||
|
*
|
||||||
* @param bool $flag
|
* @param bool $flag
|
||||||
*/
|
*/
|
||||||
public function setWithChildren($flag = true)
|
public function setWithChildren($flag = true)
|
||||||
@ -50,6 +51,7 @@ abstract class WithChildrenCommandForm extends CommandForm
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Getter for withChildren
|
* Getter for withChildren
|
||||||
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function getWithChildren()
|
public function getWithChildren()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user