Module: check_mk
Branch: master
Commit: 5bb6d8d3ae72adcb5ecbe4486ba4c14b10f945aa
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=5bb6d8d3ae72ad…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Mon Apr 6 18:51:27 2015 +0200
#2189 FIX Allow changing graph number from 1 to "all" when editing PNP graph in
report
The problem was that when you edited a report element of type PNP graph and wanted
to change from one specific graph to the list of all graphs of that service you
wouldn't be able to save your change. Creating new elements worked, nevertheless.
---
.werks/2189 | 12 ++++++++++++
ChangeLog | 1 +
web/htdocs/forms.py | 3 ++-
3 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/.werks/2189 b/.werks/2189
new file mode 100644
index 0000000..7584909
--- /dev/null
+++ b/.werks/2189
@@ -0,0 +1,12 @@
+Title: Allow changing graph number from 1 to "all" when editing PNP graph in
report
+Level: 1
+Component: reporting
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i1
+Date: 1428338979
+
+The problem was that when you edited a report element of type PNP graph and wanted
+to change from one specific graph to the list of all graphs of that service you
+wouldn't be able to save your change. Creating new elements worked, nevertheless.
diff --git a/ChangeLog b/ChangeLog
index c1c697b..cfbbf3e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -442,6 +442,7 @@
Reporting & Availability:
* 1990 FIX: Fix two exceptions in PDF exports of host group views
+ * 2189 FIX: Allow changing graph number from 1 to "all" when editing PNP
graph in report...
Event Console:
* 1845 Keep record of original source IP address of a syslog message or SNMP trap...
diff --git a/web/htdocs/forms.py b/web/htdocs/forms.py
index 28119c6..62f8312 100644
--- a/web/htdocs/forms.py
+++ b/web/htdocs/forms.py
@@ -70,8 +70,8 @@ def edit_dictionaries(dictionaries, value, focus=None, hover_help=True,
messages = []
new_value = {}
for keyname, section_title, entries in sections:
- new_value[keyname] = value.get(keyname, {}).copy()
if type(entries) == list:
+ new_value[keyname] = value.get(keyname, {}).copy()
for name, vs in entries:
if len(sections) == 1:
vp = varprefix
@@ -86,6 +86,7 @@ def edit_dictionaries(dictionaries, value, focus=None, hover_help=True,
html.add_user_error(e.varname, e.message)
else:
+ new_value[keyname] = {}
try:
edited_value = entries.from_html_vars(keyname)
entries.validate_value(edited_value, keyname)