Module: check_mk
Branch: master
Commit: 0a69e78acb663d702a99ac5f522cf0aed42538a7
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=0a69e78acb663d…
Author: Sven Rueß <sr(a)mathias-kettner.de>
Date: Wed Jun 7 18:31:35 2017 +0200
Fixed rule base notification from werk 4796
Change-Id: I03b44cc77cce51fc5c548361a219b65a56cf7512
---
web/htdocs/wato.py | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 3ea48d4..5c9e84b 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -8322,8 +8322,7 @@ def mode_notifications(phase):
# Check setting of global notifications. Are they enabled? If not, display
# a warning here. Note: this is a main.mk setting, so we cannot access this
# directly.
- current_settings = load_configuration_settings()
- if not current_settings.get("enable_rulebased_notifications"):
+ if not load_configuration_settings().get("enable_rulebased_notifications",
True):
url =
'wato.py?mode=edit_configvar&varname=enable_rulebased_notifications'
html.show_warning(
_("<b>Warning</b><br><br>Rule based notifications
are disabled in your global settings. "
@@ -10272,7 +10271,7 @@ def mode_users(phase):
html.icon_button(delete_url, _("Delete"), "delete")
notifications_url = folder_preserving_link([("mode",
"user_notifications"), ("user", id)])
- if
load_configuration_settings().get("enable_rulebased_notifications"):
+ if load_configuration_settings().get("enable_rulebased_notifications",
True):
html.icon_button(notifications_url, _("Custom notification table of this
user"), "notifications")
# ID
@@ -10353,7 +10352,7 @@ def mode_users(phase):
html.i(_("none"))
# notifications
- if not
load_configuration_settings().get("enable_rulebased_notifications"):
+ if not
load_configuration_settings().get("enable_rulebased_notifications", True):
table.cell(_("Notifications"))
if not cgs:
html.i(_("not a contact"))
@@ -10418,7 +10417,7 @@ def bulk_delete_users_after_confirm(users):
def mode_edit_user(phase):
# Check if rule based notifications are enabled (via WATO)
- rulebased_notifications =
load_configuration_settings().get("enable_rulebased_notifications")
+ rulebased_notifications =
load_configuration_settings().get("enable_rulebased_notifications", True)
users = userdb.load_users(lock = phase == 'action')
user_id = html.get_unicode_input("edit") # missing -> new user
@@ -14179,7 +14178,7 @@ def page_user_profile(change_pw=False):
# WATO module due to WATO permission issues. So we cannot show this button
# right now.
if not change_pw:
- rulebased_notifications =
load_configuration_settings().get("enable_rulebased_notifications")
+ rulebased_notifications =
load_configuration_settings().get("enable_rulebased_notifications", True)
if rulebased_notifications and
config.user.may('general.edit_notifications'):
html.begin_context_buttons()
url = "wato.py?mode=user_notifications_p"