mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-31 01:34:09 +02:00
Replace Zend Note Element through Icingas Note Element
fixes #7318 fixes #7309 fixes #7307
This commit is contained in:
parent
b2f12e1caa
commit
285d10ef22
@ -9,6 +9,7 @@ use DateInterval;
|
|||||||
use Icinga\Module\Monitoring\Command\Instance\DisableNotificationsExpireCommand;
|
use Icinga\Module\Monitoring\Command\Instance\DisableNotificationsExpireCommand;
|
||||||
use Icinga\Module\Monitoring\Form\Command\CommandForm;
|
use Icinga\Module\Monitoring\Form\Command\CommandForm;
|
||||||
use Icinga\Web\Form\Element\DateTimePicker;
|
use Icinga\Web\Form\Element\DateTimePicker;
|
||||||
|
use Icinga\Web\Form\Element\Note;
|
||||||
use Icinga\Web\Notification;
|
use Icinga\Web\Notification;
|
||||||
use Icinga\Web\Request;
|
use Icinga\Web\Request;
|
||||||
|
|
||||||
@ -33,12 +34,13 @@ class DisableNotificationsExpireCommandForm extends CommandForm
|
|||||||
public function createElements(array $formData = array())
|
public function createElements(array $formData = array())
|
||||||
{
|
{
|
||||||
$this->addElement(
|
$this->addElement(
|
||||||
'note',
|
new Note(
|
||||||
'command-info',
|
'command-info',
|
||||||
array(
|
array(
|
||||||
'value' => mt(
|
'value' => mt(
|
||||||
'monitoring',
|
'monitoring',
|
||||||
'This command is used to disable host and service notifications for a specific time.'
|
'This command is used to disable host and service notifications for a specific time.'
|
||||||
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
@ -8,6 +8,7 @@ use DateTime;
|
|||||||
use DateInterval;
|
use DateInterval;
|
||||||
use Icinga\Module\Monitoring\Command\Object\AcknowledgeProblemCommand;
|
use Icinga\Module\Monitoring\Command\Object\AcknowledgeProblemCommand;
|
||||||
use Icinga\Web\Form\Element\DateTimePicker;
|
use Icinga\Web\Form\Element\DateTimePicker;
|
||||||
|
use Icinga\Web\Form\Element\Note;
|
||||||
use Icinga\Web\Notification;
|
use Icinga\Web\Notification;
|
||||||
use Icinga\Web\Request;
|
use Icinga\Web\Request;
|
||||||
|
|
||||||
@ -34,8 +35,7 @@ class AcknowledgeProblemCommandForm extends ObjectsCommandForm
|
|||||||
public function createElements(array $formData = array())
|
public function createElements(array $formData = array())
|
||||||
{
|
{
|
||||||
$this->addElements(array(
|
$this->addElements(array(
|
||||||
array(
|
new Note(
|
||||||
'note',
|
|
||||||
'command-info',
|
'command-info',
|
||||||
array(
|
array(
|
||||||
'value' => mt(
|
'value' => mt(
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
namespace Icinga\Module\Monitoring\Form\Command\Object;
|
namespace Icinga\Module\Monitoring\Form\Command\Object;
|
||||||
|
|
||||||
use Icinga\Module\Monitoring\Command\Object\AddCommentCommand;
|
use Icinga\Module\Monitoring\Command\Object\AddCommentCommand;
|
||||||
|
use Icinga\Web\Form\Element\Note;
|
||||||
use Icinga\Web\Notification;
|
use Icinga\Web\Notification;
|
||||||
use Icinga\Web\Request;
|
use Icinga\Web\Request;
|
||||||
|
|
||||||
@ -31,8 +32,7 @@ class AddCommentCommandForm extends ObjectsCommandForm
|
|||||||
public function createElements(array $formData = array())
|
public function createElements(array $formData = array())
|
||||||
{
|
{
|
||||||
$this->addElements(array(
|
$this->addElements(array(
|
||||||
array(
|
new Note(
|
||||||
'note',
|
|
||||||
'command-info',
|
'command-info',
|
||||||
array(
|
array(
|
||||||
'value' => mt(
|
'value' => mt(
|
||||||
|
@ -6,6 +6,7 @@ namespace Icinga\Module\Monitoring\Form\Command\Object;
|
|||||||
|
|
||||||
use Icinga\Module\Monitoring\Command\Object\ScheduleHostCheckCommand;
|
use Icinga\Module\Monitoring\Command\Object\ScheduleHostCheckCommand;
|
||||||
use Icinga\Module\Monitoring\Command\Object\ScheduleServiceCheckCommand;
|
use Icinga\Module\Monitoring\Command\Object\ScheduleServiceCheckCommand;
|
||||||
|
use Icinga\Web\Form\Element\Note;
|
||||||
use Icinga\Web\Notification;
|
use Icinga\Web\Notification;
|
||||||
use Icinga\Web\Request;
|
use Icinga\Web\Request;
|
||||||
|
|
||||||
@ -30,8 +31,7 @@ class CheckNowCommandForm extends ObjectsCommandForm
|
|||||||
public function addSubmitButton()
|
public function addSubmitButton()
|
||||||
{
|
{
|
||||||
$this->addElements(array(
|
$this->addElements(array(
|
||||||
array(
|
new Note(
|
||||||
'note', // Bogus
|
|
||||||
'icon', // Bogus
|
'icon', // Bogus
|
||||||
array(
|
array(
|
||||||
'decorators' => array(array(
|
'decorators' => array(array(
|
||||||
|
@ -8,6 +8,7 @@ use DateTime;
|
|||||||
use DateInterval;
|
use DateInterval;
|
||||||
use Icinga\Module\Monitoring\Command\Object\ScheduleServiceCheckCommand;
|
use Icinga\Module\Monitoring\Command\Object\ScheduleServiceCheckCommand;
|
||||||
use Icinga\Web\Form\Element\DateTimePicker;
|
use Icinga\Web\Form\Element\DateTimePicker;
|
||||||
|
use Icinga\Web\Form\Element\Note;
|
||||||
use Icinga\Web\Notification;
|
use Icinga\Web\Notification;
|
||||||
use Icinga\Web\Request;
|
use Icinga\Web\Request;
|
||||||
|
|
||||||
@ -36,8 +37,7 @@ class ScheduleServiceCheckCommandForm extends ObjectsCommandForm
|
|||||||
$checkTime = new DateTime();
|
$checkTime = new DateTime();
|
||||||
$checkTime->add(new DateInterval('PT1H'));
|
$checkTime->add(new DateInterval('PT1H'));
|
||||||
$this->addElements(array(
|
$this->addElements(array(
|
||||||
array(
|
new Note(
|
||||||
'note',
|
|
||||||
'command-info',
|
'command-info',
|
||||||
array(
|
array(
|
||||||
'value' => mt(
|
'value' => mt(
|
||||||
|
@ -8,6 +8,7 @@ use DateTime;
|
|||||||
use DateInterval;
|
use DateInterval;
|
||||||
use Icinga\Module\Monitoring\Command\Object\ScheduleServiceDowntimeCommand;
|
use Icinga\Module\Monitoring\Command\Object\ScheduleServiceDowntimeCommand;
|
||||||
use Icinga\Web\Form\Element\DateTimePicker;
|
use Icinga\Web\Form\Element\DateTimePicker;
|
||||||
|
use Icinga\Web\Form\Element\Note;
|
||||||
use Icinga\Web\Form\Element\Number;
|
use Icinga\Web\Form\Element\Number;
|
||||||
use Icinga\Web\Notification;
|
use Icinga\Web\Notification;
|
||||||
use Icinga\Web\Request;
|
use Icinga\Web\Request;
|
||||||
@ -48,8 +49,7 @@ class ScheduleServiceDowntimeCommandForm extends ObjectsCommandForm
|
|||||||
$end = clone $start;
|
$end = clone $start;
|
||||||
$end->add(new DateInterval('PT1H'));
|
$end->add(new DateInterval('PT1H'));
|
||||||
$this->addElements(array(
|
$this->addElements(array(
|
||||||
array(
|
new Note(
|
||||||
'note',
|
|
||||||
'command-info',
|
'command-info',
|
||||||
array(
|
array(
|
||||||
'value' => mt(
|
'value' => mt(
|
||||||
|
@ -51,7 +51,7 @@ class RemoteInstanceForm extends Form
|
|||||||
'Enter the username to use for connecting to the remote machine or leave blank for default'
|
'Enter the username to use for connecting to the remote machine or leave blank for default'
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
);
|
);clear
|
||||||
$this->addElement(
|
$this->addElement(
|
||||||
'text',
|
'text',
|
||||||
'path',
|
'path',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user