[icinga-checkins] icinga.org: icingaweb2/feature/ allow-changing-default-of-command-options-11952: Command forms: make the defaults of some checkboxes non-configurable again

git at icinga.org git at icinga.org
Wed Dec 7 11:46:05 CET 2016


Module: icingaweb2
Branch: feature/allow-changing-default-of-command-options-11952
Commit: 3416121f92dd0c8f0967b2f83d244e3d324a1b98
URL:    https://git.icinga.org/?p=icingaweb2.git;a=commit;h=3416121f92dd0c8f0967b2f83d244e3d324a1b98

Author: Alexander A. Klimov <alexander.klimov at icinga.com>
Date:   Wed Dec  7 11:44:06 2016 +0100

Command forms: make the defaults of some checkboxes non-configurable again

refs #11952

---

 .../forms/Command/Object/ScheduleHostDowntimeCommandForm.php     |    6 +-----
 .../forms/Command/Object/ScheduleServiceCheckCommandForm.php     |    4 ----
 2 files changed, 1 insertion(+), 9 deletions(-)

diff --git a/modules/monitoring/application/forms/Command/Object/ScheduleHostDowntimeCommandForm.php b/modules/monitoring/application/forms/Command/Object/ScheduleHostDowntimeCommandForm.php
index 9e65365..53c9516 100644
--- a/modules/monitoring/application/forms/Command/Object/ScheduleHostDowntimeCommandForm.php
+++ b/modules/monitoring/application/forms/Command/Object/ScheduleHostDowntimeCommandForm.php
@@ -4,7 +4,6 @@
 namespace Icinga\Module\Monitoring\Forms\Command\Object;
 
 use DateTime;
-use Icinga\Application\Config;
 use Icinga\Module\Monitoring\Command\Object\PropagateHostDowntimeCommand;
 use Icinga\Module\Monitoring\Command\Object\ScheduleHostDowntimeCommand;
 use Icinga\Module\Monitoring\Command\Object\ScheduleServiceDowntimeCommand;
@@ -21,8 +20,6 @@ class ScheduleHostDowntimeCommandForm extends ScheduleServiceDowntimeCommandForm
      */
     public function createElements(array $formData = array())
     {
-        $config = Config::module('monitoring');
-
         parent::createElements($formData);
 
         $this->addElement(
@@ -32,8 +29,7 @@ class ScheduleHostDowntimeCommandForm extends ScheduleServiceDowntimeCommandForm
                 'description'   => $this->translate(
                     'Schedule downtime for all services on the hosts and the hosts themselves.'
                 ),
-                'label'         => $this->translate('All Services'),
-                'value'         => (bool) $config->get('settings', 'hostdowntime_all_services', false)
+                'label'         => $this->translate('All Services')
             )
         );
 
diff --git a/modules/monitoring/application/forms/Command/Object/ScheduleServiceCheckCommandForm.php b/modules/monitoring/application/forms/Command/Object/ScheduleServiceCheckCommandForm.php
index 998f1e4..d8bb428 100644
--- a/modules/monitoring/application/forms/Command/Object/ScheduleServiceCheckCommandForm.php
+++ b/modules/monitoring/application/forms/Command/Object/ScheduleServiceCheckCommandForm.php
@@ -5,7 +5,6 @@ namespace Icinga\Module\Monitoring\Forms\Command\Object;
 
 use DateTime;
 use DateInterval;
-use Icinga\Application\Config;
 use Icinga\Module\Monitoring\Command\Object\ScheduleServiceCheckCommand;
 use Icinga\Web\Notification;
 use Icinga\Web\Request;
@@ -41,8 +40,6 @@ class ScheduleServiceCheckCommandForm extends ObjectsCommandForm
      */
     public function createElements(array $formData = array())
     {
-        $config = Config::module('monitoring');
-
         $checkTime = new DateTime();
         $checkTime->add(new DateInterval('PT1H'));
         $this->addElements(array(
@@ -63,7 +60,6 @@ class ScheduleServiceCheckCommandForm extends ObjectsCommandForm
                 'force_check',
                 array(
                     'label'         => $this->translate('Force Check'),
-                    'value'         => (bool) $config->get('settings', 'servicecheck_force', false),
                     'description'   => $this->translate(
                         'If you select this option, Icinga will force a check regardless of both what time the'
                         . ' scheduled check occurs and whether or not checks are enabled.'



More information about the icinga-checkins mailing list