Module: check_mk
Branch: master
Commit: a9da19fc80bd2d0e9534f464326e968df92be083
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=a9da19fc80bd2d…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Wed Feb 20 12:14:37 2013 +0100
WATO: service/host/contact groups now require
group unique alias key
---
ChangeLog | 2 ++
web/htdocs/wato.py | 5 +++++
2 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 5aa6763..48c1c58 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -50,6 +50,8 @@
WATO:
* FIX: flexible notification valuespec is now localizable
+ * FIX: Alias values of host/service/contact groups need to be set and unique
+ within the group
1.2.2b3:
Checks & Agents:
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index e679022..a599191 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -5785,6 +5785,11 @@ def mode_edit_group(phase, what):
if phase == "action":
if html.check_transaction():
alias = html.var_utf8("alias").strip()
+ if not alias:
+ raise MKUserError("alias", _("Please specify an alias
name."))
+ for key, value in groups.items():
+ if alias == value and name != key:
+ raise MKUserError("alias", _("This alias is already
used in the group %s ." % key))
if new:
name = html.var("name").strip()
if len(name) == 0: