diff --git a/modules/monitoring/application/views/helpers/CommandForm.php b/modules/monitoring/application/views/helpers/CommandForm.php
index 1fb5daa69..2faf63cfb 100644
--- a/modules/monitoring/application/views/helpers/CommandForm.php
+++ b/modules/monitoring/application/views/helpers/CommandForm.php
@@ -56,9 +56,6 @@ class Zend_View_Helper_CommandForm extends Zend_View_Helper_Abstract
{
$form = new Form();
$form->setIgnoreChangeDiscarding(true);
- $form->setAttrib('data-icinga-component', 'app/ajaxPostSubmitForm');
- $form->setAttrib('class', 'inline-form');
-
$form->setRequest(Zend_Controller_Front::getInstance()->getRequest());
// Filter work only from get parts. Put important
@@ -184,15 +181,14 @@ class Zend_View_Helper_CommandForm extends Zend_View_Helper_Abstract
$form->addElement($submit_identifier);
$form->getElement('btn_submit')->setDecorators(array('ViewHelper'));
- $out = ''
- . '
';
+ if ($label) {
+ $out = '';
+ }
if ($changed === true) {
- $out .= ''
- . ' (modified)'
- . '';
+ $out .= $this->getView()->icon('config_changed.png') . ' (modified)';
}
$formCode = (string) $form;
@@ -203,8 +199,7 @@ class Zend_View_Helper_CommandForm extends Zend_View_Helper_Abstract
$formCode = str_replace('', $jsLessSubmit, $formCode);
- $out .= $formCode
- . '
';
+ $out .= $formCode;
return $out;
}
@@ -229,4 +224,4 @@ class Zend_View_Helper_CommandForm extends Zend_View_Helper_Abstract
}
}
-// @codingStandardsIgnoreStop
\ No newline at end of file
+// @codingStandardsIgnoreStop
diff --git a/modules/monitoring/application/views/scripts/show/components/flags.phtml b/modules/monitoring/application/views/scripts/show/components/flags.phtml
index 7e742d155..c5eb47a4a 100644
--- a/modules/monitoring/application/views/scripts/show/components/flags.phtml
+++ b/modules/monitoring/application/views/scripts/show/components/flags.phtml
@@ -1,148 +1,77 @@
object;
- /** @var Zend_View_Helper_CommandForm $cf */
- $cf = $this->getHelper('CommandForm');
+$o = $this->object;
+$cf = $this->getHelper('CommandForm');
- $data = array(
- 'host' => $o->host_name,
- 'service' => $o->service_description
- );
+$data = array(
+ 'host' => $o->host_name,
+ 'service' => $o->service_description
+);
- $modified_attributes = false;
-
- if ($o->service_description && $o->service_modified_service_attributes) {
- $modified_attributes = true;
- } elseif ($o->host_modified_host_attributes) {
- $modified_attributes = true;
- }
-
- $test_db_modified = (
- ($o->passive_checks_enabled_changed === '0')
- && ($o->active_checks_enabled_changed === '0')
- && ($o->obsessing_changed === '0')
- && ($o->notifications_enabled_changed === '0')
- && ($o->event_handler_enabled_changed === '0')
- && ($o->flap_detection_enabled_changed === '0')
- ) ? false : true;
-
- if ($modified_attributes && !$test_db_modified) {
- $modified_attributes = false;
- }
?>
-
-
-
-
-
-
-
-
-
- |
- =
- $cf->toggleSubmitForm(
- 'Passive Checks enabled',
- $o->passive_checks_enabled,
- 'startacceptingpassivechecks',
- 'stopacceptingpassivechecks',
- (($o->passive_checks_enabled_changed === '1') ? true : false),
- $data
- );
- ?>
- |
-
-
-
- |
- =
- $cf->toggleSubmitForm(
- 'Active Checks enabled',
- $o->active_checks_enabled,
- 'enableactivechecks',
- 'disableactivechecks',
- (($o->active_checks_enabled_changed === '1') ? true : false),
- $data
- );
- ?>
- |
-
-
-
- |
- =
- $cf->toggleSubmitForm(
- 'Obsessing enabled',
- $o->obsessing,
- 'startobsessing',
- 'stopobsessing',
- (($o->obsessing_changed === '1') ? true : false),
- $data
- );
- ?>
- |
-
-
- |
- =
- $cf->toggleSubmitForm(
- 'Notifications enabled',
- $o->notifications_enabled,
- 'enablenotifications',
- 'disablenotifications',
- (($o->notifications_enabled_changed === '1') ? true : false),
- $data
- );
- ?>
- |
-
-
- |
- =
- $cf->toggleSubmitForm(
- 'Eventhandler enabled',
- $o->event_handler_enabled,
- 'enableeventhandler',
- 'disableeventhandler',
- (($o->event_handler_enabled_changed === '1') ? true : false),
- $data
- );
- ?>
- |
-
-
- |
- =
- $cf->toggleSubmitForm(
- 'Flap Detection enabled',
- $o->flap_detection_enabled,
- 'enableflapdetection',
- 'disableflapdetection',
- (($o->flap_detection_enabled_changed === '1') ? true : false),
- $data
- );
- ?>
- |
-
-
-
-
-
-
- =
- $cf->labelSubmitForm(
- 'Reset modified attributes',
- 'Reset configuration to initial values after a system restart',
- 'btn-cta',
- 'resetattributes',
- $data
- );
- ?>
-
-
-
-
+
+ | Passive Checks |
+ = $cf->toggleSubmitForm(
+ '',
+ $o->passive_checks_enabled,
+ 'startacceptingpassivechecks',
+ 'stopacceptingpassivechecks',
+ $o->passive_checks_enabled_changed === '1',
+ $data
+ ) ?> |
+
+
+ | Active Checks |
+ = $cf->toggleSubmitForm(
+ '',
+ $o->active_checks_enabled,
+ 'enableactivechecks',
+ 'disableactivechecks',
+ $o->active_checks_enabled_changed === '1',
+ $data
+ ) ?> |
+
+
+ | Notifications |
+ = $cf->toggleSubmitForm(
+ '',
+ $o->notifications_enabled,
+ 'enablenotifications',
+ 'disablenotifications',
+ $o->notifications_enabled_changed === '1',
+ $data
+ ) ?> |
+
+
+ | Event Handler |
+ = $cf->toggleSubmitForm(
+ '',
+ $o->event_handler_enabled,
+ 'enableeventhandler',
+ 'disableeventhandler',
+ $o->event_handler_enabled_changed === '1',
+ $data
+ ) ?> |
+
+
+ | Flap Detection |
+ = $cf->toggleSubmitForm(
+ '',
+ $o->flap_detection_enabled,
+ 'enableflapdetection',
+ 'disableflapdetection',
+ $o->flap_detection_enabled_changed === '1',
+ $data
+ ) ?> |
+
+
+ | Obsessing |
+ = $cf->toggleSubmitForm(
+ '',
+ $o->obsessing,
+ 'startobsessing',
+ 'stopobsessing',
+ $o->obsessing_changed === '1',
+ $data
+ ) ?> |
+
diff --git a/modules/monitoring/application/views/scripts/show/host.phtml b/modules/monitoring/application/views/scripts/show/host.phtml
index d12c37394..118e64c33 100644
--- a/modules/monitoring/application/views/scripts/show/host.phtml
+++ b/modules/monitoring/application/views/scripts/show/host.phtml
@@ -18,7 +18,6 @@
= $this->render('show/components/contacts.phtml') ?>
= $this->render('show/components/checkstatistics.phtml') ?>
= $this->render('show/components/customvars.phtml') ?>
-
-= $this->render('show/components/properties.phtml') ?>
= $this->render('show/components/flags.phtml') ?>
+