Module: check_mk
Branch: master
Commit: db80fb204bcaed7f9abf00ed0978c141af494164
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=db80fb204bcaed…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Sep 6 16:55:01 2012 +0200
User managament: Added fields for editing host/service notification commands
---
ChangeLog | 1 +
web/htdocs/wato.py | 11 +++++++++++
2 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 724a7c4..a074bc6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -69,6 +69,7 @@
* new: search for rules in "Host & Service Configuration"
* parent scan: new option "ping probes", that allows skipping
unreachable gateways.
+ * User managament: Added fields for editing host/service notification commands
* FIX: Removed double collect_hosts() call in activate changes hook
* FIX: Fixed double hook execution when using localized multisite
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 0eb9438..ff95d1d 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -7701,6 +7701,8 @@ def mode_edit_user(phase):
for what, opts in [ ( "host", "durfs"), ("service",
"wucrfs") ]:
new_user[what + "_notification_options"] = "".join(
[ opt for opt in opts if html.get_checkbox(what + "_" + opt) ])
+ # FIXME: Validate notification commands. Do they really exist?
+ new_user[what + "_notification_commands"] = html.var(what +
"_notification_commands")
# Custom attributes
for name, vs in user_attributes:
@@ -7875,6 +7877,15 @@ def mode_edit_user(phase):
"will be notified to this contact. Note: these settings will only be
saved "
"and used if the user is member of a contact group."))
+ # Notification commands
+ # FIXME: Add dropdown. But where to get a list of notification commands?
+ forms.section(_("Notification Command for Hosts"))
+ html.text_input("host_notification_commands",
user.get("host_notification_commands", "check-mk-notify"))
+ html.help(_("Use this Nagios command for sending host notifications."))
+ forms.section(_("Notification Command for Services"))
+ html.text_input("service_notification_commands",
user.get("service_notification_commands", "check-mk-notify"))
+ html.help(_("Use this Nagios command for sending service notifications."))
+
forms.header(_("Personal Settings"), isopen = False)
select_language(user.get('language', ''))
for name, vs in user_attributes: