Module: check_mk
Branch: master
Commit: e67ca24b2fa3baed0a3bcc8063a2da9d0e5a1cb7
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=e67ca24b2fa3ba…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Tue Jul 12 11:22:22 2016 +0200
New helper function user_script_title
---
web/htdocs/wato.py | 3 +--
web/htdocs/watolib.py | 2 ++
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 2d91672..02d53f8 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -8283,8 +8283,7 @@ def notification_script_choices_with_parameters():
def notification_script_title(name):
- return dict(notification_script_choices()).get(name, name)
-
+ return user_script_title("notifications", name)
diff --git a/web/htdocs/watolib.py b/web/htdocs/watolib.py
index 4217ab8..810a0fb 100644
--- a/web/htdocs/watolib.py
+++ b/web/htdocs/watolib.py
@@ -4554,6 +4554,8 @@ def user_script_choices(what):
return choices
+def user_script_title(what, name):
+ return dict(user_script_choices(what)).get(name, name)
#.
# .--MIXED STUFF---------------------------------------------------------.