Module: check_mk
Branch: master
Commit: 4429ab509cb9d55a466ba0aad7e5be173ade44f2
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=4429ab509cb9d5…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Mon Jun 18 16:16:49 2012 +0200
Do not paint host icons if data is incomplete
---
web/plugins/views/painters.py | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/web/plugins/views/painters.py b/web/plugins/views/painters.py
index b4eb304..c789e38 100644
--- a/web/plugins/views/painters.py
+++ b/web/plugins/views/painters.py
@@ -116,11 +116,15 @@ multisite_icons = []
load_web_plugins('icons', globals())
+# Paint column with various icons. The icons use
+# a plugin based mechanism so it is possible to
+# register own icon "handlers".
+# what: either "host" or "service"
+# row: the data row of the host or service
def paint_icons(what, row):
- """
- what: "host" or "service"
- row: The livestatus row of the current object
- """
+ if not row["host_name"]:
+ return "", ""# Host probably does not exist
+
custom_vars = dict(zip(row["host_custom_variable_names"],
row["host_custom_variable_values"]))