diff --git a/modules/monitoring/application/forms/Command/CommandForm.php b/modules/monitoring/application/forms/Command/CommandForm.php index 807e1e6ca..fd67e140d 100644 --- a/modules/monitoring/application/forms/Command/CommandForm.php +++ b/modules/monitoring/application/forms/Command/CommandForm.php @@ -44,6 +44,16 @@ abstract class CommandForm extends Form return $this->backend; } + /** + * Get the command help description + * + * @return string|null + */ + public function getHelp() + { + return null; + } + /** * Get the transport used to send commands * diff --git a/modules/monitoring/application/forms/Command/Instance/DisableNotificationsExpireCommandForm.php b/modules/monitoring/application/forms/Command/Instance/DisableNotificationsExpireCommandForm.php index 5620d4908..0e64a4b03 100644 --- a/modules/monitoring/application/forms/Command/Instance/DisableNotificationsExpireCommandForm.php +++ b/modules/monitoring/application/forms/Command/Instance/DisableNotificationsExpireCommandForm.php @@ -24,22 +24,24 @@ class DisableNotificationsExpireCommandForm extends CommandForm $this->setSubmitLabel(mt('monitoring', 'Disable Notifications')); } + /** + * (non-PHPDoc) + * @see \Icinga\Module\Monitoring\Forms\Command\CommandForm::getHelp() For the method documentation. + */ + public function getHelp() + { + return mt( + 'monitoring', + 'This command is used to disable host and service notifications for a specific time.' + ); + } + /** * (non-PHPDoc) * @see \Icinga\Web\Form::createElements() For the method documentation. */ public function createElements(array $formData = array()) { - $this->addElement( - 'note', - 'command-info', - array( - 'value' => mt( - 'monitoring', - 'This command is used to disable host and service notifications for a specific time.' - ) - ) - ); $expireTime = new DateTime(); $expireTime->add(new DateInterval('PT1H')); $this->addElement( diff --git a/modules/monitoring/application/forms/Command/Object/AcknowledgeProblemCommandForm.php b/modules/monitoring/application/forms/Command/Object/AcknowledgeProblemCommandForm.php index 9123fddc1..3456e1bfb 100644 --- a/modules/monitoring/application/forms/Command/Object/AcknowledgeProblemCommandForm.php +++ b/modules/monitoring/application/forms/Command/Object/AcknowledgeProblemCommandForm.php @@ -25,6 +25,20 @@ class AcknowledgeProblemCommandForm extends ObjectsCommandForm ); } + /** + * (non-PHPDoc) + * @see \Icinga\Module\Monitoring\Forms\Command\CommandForm::getHelp() For the method documentation. + */ + public function getHelp() + { + return mt( + 'monitoring', + 'This command is used to acknowledge host or service problems. When a problem is acknowledged,' + . ' future notifications about problems are temporarily disabled until the host or service' + . ' recovers.' + ); + } + /** * (non-PHPDoc) * @see \Icinga\Web\Form::createElements() For the method documentation. @@ -32,18 +46,6 @@ class AcknowledgeProblemCommandForm extends ObjectsCommandForm public function createElements(array $formData = array()) { $this->addElements(array( - array( - 'note', - 'command-info', - array( - 'value' => mt( - 'monitoring', - 'This command is used to acknowledge host or service problems. When a problem is acknowledged,' - . ' future notifications about problems are temporarily disabled until the host or service' - . ' recovers.' - ) - ) - ), array( 'textarea', 'comment', diff --git a/modules/monitoring/application/forms/Command/Object/AddCommentCommandForm.php b/modules/monitoring/application/forms/Command/Object/AddCommentCommandForm.php index 5d9a71d51..f5adf6c71 100644 --- a/modules/monitoring/application/forms/Command/Object/AddCommentCommandForm.php +++ b/modules/monitoring/application/forms/Command/Object/AddCommentCommandForm.php @@ -23,6 +23,18 @@ class AddCommentCommandForm extends ObjectsCommandForm ); } + /** + * (non-PHPDoc) + * @see \Icinga\Module\Monitoring\Forms\Command\CommandForm::getHelp() For the method documentation. + */ + public function getHelp() + { + return mt( + 'monitoring', + 'This command is used to add host or service comments.' + ); + } + /** * (non-PHPDoc) * @see \Icinga\Web\Form::createElements() For the method documentation. @@ -30,16 +42,6 @@ class AddCommentCommandForm extends ObjectsCommandForm public function createElements(array $formData = array()) { $this->addElements(array( - array( - 'note', - 'command-info', - array( - 'value' => mt( - 'monitoring', - 'This command is used to add host or service comments.' - ) - ) - ), array( 'textarea', 'comment', diff --git a/modules/monitoring/application/forms/Command/Object/ScheduleServiceCheckCommandForm.php b/modules/monitoring/application/forms/Command/Object/ScheduleServiceCheckCommandForm.php index faba7a769..9e04a2254 100644 --- a/modules/monitoring/application/forms/Command/Object/ScheduleServiceCheckCommandForm.php +++ b/modules/monitoring/application/forms/Command/Object/ScheduleServiceCheckCommandForm.php @@ -26,6 +26,19 @@ class ScheduleServiceCheckCommandForm extends ObjectsCommandForm ); } + /** + * (non-PHPDoc) + * @see \Icinga\Module\Monitoring\Forms\Command\CommandForm::getHelp() For the method documentation. + */ + public function getHelp() + { + return mt( + 'monitoring', + 'This command is used to schedule the next check of hosts or services. Icinga will re-queue the' + . ' hosts or services to be checked at the time you specify.' + ); + } + /** * (non-PHPDoc) * @see \Icinga\Web\Form::createElements() For the method documentation. diff --git a/modules/monitoring/application/forms/Command/Object/ScheduleServiceDowntimeCommandForm.php b/modules/monitoring/application/forms/Command/Object/ScheduleServiceDowntimeCommandForm.php index 18bbd0593..9fd86a82b 100644 --- a/modules/monitoring/application/forms/Command/Object/ScheduleServiceDowntimeCommandForm.php +++ b/modules/monitoring/application/forms/Command/Object/ScheduleServiceDowntimeCommandForm.php @@ -36,6 +36,22 @@ class ScheduleServiceDowntimeCommandForm extends ObjectsCommandForm ); } + /** + * (non-PHPDoc) + * @see \Icinga\Module\Monitoring\Forms\Command\CommandForm::getHelp() For the method documentation. + */ + public function getHelp() + { + return mt( + 'monitoring', + 'This command is used to schedule host and service downtimes. During the specified downtime,' + . ' Icinga will not send notifications out about the hosts and services. When the scheduled' + . ' downtime expires, Icinga will send out notifications for the hosts and services as it' + . ' normally would. Scheduled downtimes are preserved across program shutdowns and' + . ' restarts.' + ); + } + /** * (non-PHPDoc) * @see \Icinga\Web\Form::createElements() For the method documentation. @@ -46,20 +62,6 @@ class ScheduleServiceDowntimeCommandForm extends ObjectsCommandForm $end = clone $start; $end->add(new DateInterval('PT1H')); $this->addElements(array( - array( - 'note', - 'command-info', - array( - 'value' => mt( - 'monitoring', - 'This command is used to schedule host and service downtimes. During the specified downtime,' - . ' Icinga will not send notifications out about the hosts and services. When the scheduled' - . ' downtime expires, Icinga will send out notifications for the hosts and services as it' - . ' normally would. Scheduled downtimes are preserved across program shutdowns and' - . ' restarts.' - ) - ) - ), array( 'textarea', 'comment', diff --git a/modules/monitoring/application/views/scripts/partials/command-form.phtml b/modules/monitoring/application/views/scripts/partials/command-form.phtml index 4740f3348..b6990cf25 100644 --- a/modules/monitoring/application/views/scripts/partials/command-form.phtml +++ b/modules/monitoring/application/views/scripts/partials/command-form.phtml @@ -1,9 +1,9 @@