From b16cf68c86e04763e1b3802288fb18be09f1fc12 Mon Sep 17 00:00:00 2001 From: marianrh <19990392+marianrh@users.noreply.github.com> Date: Sat, 3 May 2025 09:26:44 +0200 Subject: [PATCH] Support setting a default comment for acknowledgements --- .../forms/Command/Object/AcknowledgeProblemCommandForm.php | 3 ++- modules/monitoring/doc/03-Configuration.md | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/monitoring/application/forms/Command/Object/AcknowledgeProblemCommandForm.php b/modules/monitoring/application/forms/Command/Object/AcknowledgeProblemCommandForm.php index c7caf5d0d..d3592bbb0 100644 --- a/modules/monitoring/application/forms/Command/Object/AcknowledgeProblemCommandForm.php +++ b/modules/monitoring/application/forms/Command/Object/AcknowledgeProblemCommandForm.php @@ -57,7 +57,8 @@ class AcknowledgeProblemCommandForm extends ObjectsCommandForm . ' the host or service that is having problems. Make sure you enter a brief description of' . ' what you are doing.' ), - 'attribs' => array('class' => 'autofocus') + 'attribs' => array('class' => 'autofocus'), + 'value' => $config->get('settings', 'acknowledge_comment_text') ) ), array( diff --git a/modules/monitoring/doc/03-Configuration.md b/modules/monitoring/doc/03-Configuration.md index 9adacc1b6..ec438922d 100644 --- a/modules/monitoring/doc/03-Configuration.md +++ b/modules/monitoring/doc/03-Configuration.md @@ -21,6 +21,7 @@ by this module. Option | Description ----------------------------------|----------------------------------------------- +acknowledge_comment_text | **Optional.** Set default text for "Comment" in Acknowledgement dialog by default. acknowledge_expire | **Optional.** Check "Use Expire Time" in Acknowledgement dialog by default. Defaults to **0 (false)**. acknowledge_expire_time | **Optional.** Set default value for "Expire Time" in Acknowledgement dialog, its calculated as now + this setting. Format is a [PHP Dateinterval](http://www.php.net/manual/en/dateinterval.construct.php). Defaults to **1 hour (PT1H)**. acknowledge_notify | **Optional.** Check "Send Notification" in Acknowledgement dialog by default. Defaults to **1 (true)**.