Module: check_mk
Branch: master
Commit: 43824429a1b0c580031a9dcb8b158aeca288dd23
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=43824429a1b0c5…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed Feb 15 08:26:59 2012 +0100
WATO: Do not use None$ as item when creating new rules
---
.bugs/633 | 12 ++++++++++++
ChangeLog | 1 +
web/htdocs/wato.py | 4 ++--
3 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/.bugs/633 b/.bugs/633
new file mode 100644
index 0000000..08183e0
--- /dev/null
+++ b/.bugs/633
@@ -0,0 +1,12 @@
+Title: Creating service rule creates explicit item None
+Component: wato
+Class: bug
+State: done
+Date: 2012-02-15 08:20:05
+Targetversion: 1.2.0
+
+When creating a service rule, then always "None$" is being
+used as item. There should not be an explicit item ist.
+
+2012-02-15 08:26:23: changed state open -> done
+Fixed.
diff --git a/ChangeLog b/ChangeLog
index a88883a..77dbcb6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -14,6 +14,7 @@
* FIX: do not use isdisjoint() (was in rule editor on Lenny)
* FIX: allow UTF-8 encoded permission translations
* FIX: Fixed several problems in OMD apache shared mode
+ * FIX: Do not use None$ as item when creating new rules
Checks & Agents:
* hpux_if: fix missing default parameter errors
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 1382669..d574fc3 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -8250,7 +8250,7 @@ def mode_edit_ruleset(phase):
if html.check_transaction():
if html.var("_new_rule"):
hostname = None
- item = None
+ item = NO_ITEM
new_rule = create_rule(rulespec, hostname, item)
if hostname:
rules[0:0] = [new_rule]
@@ -8471,7 +8471,7 @@ def mode_edit_ruleset(phase):
title += _(" and %s '%s'") %
(rulespec["itemname"], item)
html.button("_new_host_rule", title)
html.write(" " + _("or") + " ")
- html.button("_new_rule", _("General rule in folder: "))
+ html.button("_new_rule", _("Create rule in folder: "))
html.select("folder", folder_selection(g_root_folder))
html.write("</p>\n")
html.hidden_fields()