Module: check_mk
Branch: master
Commit: 3cfc791db6860ee0192eb79adb766074d311df1c
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=3cfc791db6860e…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Apr 6 11:34:28 2016 +0200
3364 FIX Fixed exception when creating a view of a single log entry
When one creates a view of a single log entry, this resulted in an
exception like "TypeError: 'NoneType' object is not iterable". This
has been fixed now. However it is currently not possible to create
such a view since the logfile info (data source) is not supporting
referencing of single log entries.
---
.werks/3364 | 14 ++++++++++++++
ChangeLog | 1 +
web/htdocs/visuals.py | 6 +++++-
3 files changed, 20 insertions(+), 1 deletion(-)
diff --git a/.werks/3364 b/.werks/3364
new file mode 100644
index 0000000..6ab78f3
--- /dev/null
+++ b/.werks/3364
@@ -0,0 +1,14 @@
+Title: Fixed exception when creating a view of a single log entry
+Level: 1
+Component: multisite
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.9i1
+Date: 1459935119
+
+When one creates a view of a single log entry, this resulted in an
+exception like "TypeError: 'NoneType' object is not iterable". This
+has been fixed now. However it is currently not possible to create
+such a view since the logfile info (data source) is not supporting
+referencing of single log entries.
diff --git a/ChangeLog b/ChangeLog
index fe50c76..77563e8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -168,6 +168,7 @@
* 3360 FIX: Fixed different exceptions in predictive monitoring GUI
* 3320 FIX: Fix bogus interfering snapins Tree of folders and Folders...
* 3321 FIX: Globes in dashboards now correctly reflect selected WATO folder...
+ * 3364 FIX: Fixed exception when creating a view of a single log entry...
WATO:
* 3244 WATO BI Module: swap order of aggregation function and child node
selection...
diff --git a/web/htdocs/visuals.py b/web/htdocs/visuals.py
index c7c1cf0..2bafd63 100644
--- a/web/htdocs/visuals.py
+++ b/web/htdocs/visuals.py
@@ -1265,7 +1265,11 @@ def visual_title(what, visual):
# the variables "event_id" and "history_line" to be set in order
# to exactly specify one history entry.
def info_params(info_key):
- return dict(infos[info_key]['single_spec']).keys()
+ single_spec = infos[info_key]['single_spec']
+ if single_spec == None:
+ return []
+ else:
+ return dict(single_spec).keys()
def get_single_info_keys(visual):
keys = []