Module: check_mk
Branch: master
Commit: abc6d25f17533d91e0f72278d93e97b7d65c9243
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=abc6d25f17533d…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Mon Oct 14 16:34:52 2013 +0200
FIX: Fix output format python for several numeric columns
If you had the column "Service Notification Number", e.g., then
run had run into an exception
---
ChangeLog | 1 +
web/plugins/views/painters.py | 8 ++++----
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 989b60c..11074eb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -9,6 +9,7 @@
are omitted, since they do not really matter and make the
results less useful when using CMC.
* FIX: Fixed encoding problem in webservice column output
+ * FIX: Fix output format python for several numeric columns
Checks & Agents:
* diskstat: removed (ever incorrect) latency computation for Linux
diff --git a/web/plugins/views/painters.py b/web/plugins/views/painters.py
index 142532d..67c20e2 100644
--- a/web/plugins/views/painters.py
+++ b/web/plugins/views/painters.py
@@ -531,7 +531,7 @@ multisite_painters['svc_notification_number'] = {
"title" : _("Service notification number"),
"short" : _("N#"),
"columns" : [ "service_current_notification_number" ],
- "paint" : lambda row: ("",
row["service_current_notification_number"]),
+ "paint" : lambda row: ("",
str(row["service_current_notification_number"])),
}
@@ -959,7 +959,7 @@ multisite_painters['host_notification_number'] = {
"title" : _("Host notification number"),
"short" : _("N#"),
"columns" : [ "host_current_notification_number" ],
- "paint" : lambda row: ("",
saveint(row["host_current_notification_number"])),
+ "paint" : lambda row: ("",
str(row["host_current_notification_number"])),
}
multisite_painters["host_flapping"] = {
@@ -1446,7 +1446,7 @@ multisite_painters["comment_id"] = {
"title" : _("Comment id"),
"short" : _("ID"),
"columns" : ["comment_id"],
- "paint" : lambda row: (None, row["comment_id"]),
+ "paint" : lambda row: (None, str(row["comment_id"])),
}
multisite_painters["comment_author"] = {
"title" : _("Comment author"),
@@ -1643,7 +1643,7 @@ multisite_painters["log_attempt"] = {
"title" : _("Log: number of check attempt"),
"short" : _("Att."),
"columns" : ["log_attempt"],
- "paint" : lambda row: ("", row["log_attempt"]),
+ "paint" : lambda row: ("", str(row["log_attempt"])),
}
multisite_painters["log_state_type"] = {
"title" : _("Log: type of state (hard/soft/stopped/started)"),