diff --git a/modules/monitoring/application/controllers/CommandController.php b/modules/monitoring/application/controllers/CommandController.php index 4c3a489af..3b92c963b 100644 --- a/modules/monitoring/application/controllers/CommandController.php +++ b/modules/monitoring/application/controllers/CommandController.php @@ -984,6 +984,7 @@ class Monitoring_CommandController extends ActionController if ($form->IsSubmittedAndValid() === true) { $this->target->sendCommand($form->createCommand(), $this->view->objects); + Notification::success('Acknowledgement removal request has been requested'); } } diff --git a/modules/monitoring/application/views/scripts/show/components/acknowledgement.phtml b/modules/monitoring/application/views/scripts/show/components/acknowledgement.phtml new file mode 100644 index 000000000..c1d60a58a --- /dev/null +++ b/modules/monitoring/application/views/scripts/show/components/acknowledgement.phtml @@ -0,0 +1,40 @@ +state, array(0, 99))) { + return; +} + +$cf = $this->getHelper('CommandForm'); + +$data = array('host' => $object->host_name); +if ($object->service_description) { + $data['service'] = $object->service_description; +} + +?> + +host_acknowledged + || $object instanceof Service && $object->service_acknowledged): ?> + Issue acknowledged + labelSubmitForm( + 'Remove Acknowledgement', + 'Remove problem acknowledgement', + 'link-like', + 'removeacknowledgement', + $data + ) ?> + + Not acknowledged + + icon('acknowledgement_petrol.png') ?> Acknowledge now + + + diff --git a/modules/monitoring/application/views/scripts/show/components/status.phtml b/modules/monitoring/application/views/scripts/show/components/status.phtml index 73da5cb1e..e69de29bb 100644 --- a/modules/monitoring/application/views/scripts/show/components/status.phtml +++ b/modules/monitoring/application/views/scripts/show/components/status.phtml @@ -1,51 +0,0 @@ -type === 2 ? 'service' : 'host'; - - /** @var Zend_View_Helper_CommandForm $cf */ - $cf = $this->getHelper('CommandForm'); - - if ($type === 'host') { - $objectStateName = strtolower($this->util()->getHostStateName($this->object->host_state)); - $objectState = (int) $object->host_state; - } else { - $objectStateName = strtolower($this->util()->getServiceStateName($this->object->service_state)); - $objectState = (int) $object->service_state; - } -?> -
-
- -
- - 0): ?> - object->host_acknowledged || $this->object->service_acknowledged): ?> - labelSubmitForm( - 'Remove Ack', - 'Remove problem acknowledgement', - 'btn-cta btn-half-left', - 'removeacknowledgement', - array( - 'host' => $this->object->host_name, - 'service' => $this->object->service_description - ) - ) ?> - - - Acknowledge - - - - -
- -
-
diff --git a/modules/monitoring/application/views/scripts/show/host.phtml b/modules/monitoring/application/views/scripts/show/host.phtml index 145f7be8a..f2cbb4be0 100644 --- a/modules/monitoring/application/views/scripts/show/host.phtml +++ b/modules/monitoring/application/views/scripts/show/host.phtml @@ -4,10 +4,10 @@
render('show/components/output.phtml') ?> -render('show/components/status.phtml') ?> +render('show/components/acknowledgement.phtml') ?> render('show/components/comments.phtml') ?> render('show/components/notifications.phtml') ?> render('show/components/downtime.phtml') ?> diff --git a/modules/monitoring/application/views/scripts/show/service.phtml b/modules/monitoring/application/views/scripts/show/service.phtml index 95ce6a0d6..9f21e98e0 100644 --- a/modules/monitoring/application/views/scripts/show/service.phtml +++ b/modules/monitoring/application/views/scripts/show/service.phtml @@ -3,11 +3,11 @@

This service's current state

-render('show/components/status.phtml') ?> render('show/components/output.phtml') ?>
+render('show/components/acknowledgement.phtml') ?> render('show/components/comments.phtml') ?> render('show/components/notifications.phtml') ?> render('show/components/downtime.phtml') ?>