Module: check_mk
Branch: master
Commit: 3e18ab186eab38e7b434dadcb6215238c723ea4c
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=3e18ab186eab38…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Mon Jan 23 09:50:53 2012 +0100
Removed host and service state abbr painter
---
web/plugins/views/mobile.py | 10 +++++-----
web/plugins/views/painters.py | 24 ++----------------------
2 files changed, 7 insertions(+), 27 deletions(-)
diff --git a/web/plugins/views/mobile.py b/web/plugins/views/mobile.py
index 347e36e..17075f5 100644
--- a/web/plugins/views/mobile.py
+++ b/web/plugins/views/mobile.py
@@ -366,7 +366,7 @@ multisite_builtin_views.update({
'mustsearch': True,
'num_columns': 2,
'painters': [
- ('host_state_appr', None),
+ ('host_state', None),
('host', 'mobile_host'),
('host_plugin_output', None),
],
@@ -383,7 +383,7 @@ multisite_builtin_views.update({
#List all host problems
'mobile_hostproblems': mobile_view({
'datasource': 'hosts',
- 'group_painters': [('host_state_appr', None)],
+ 'group_painters': [('host_state', None)],
'hard_filters': ['host_scheduled_downtime_depth',
'summary_host'],
'hard_filtervars': [
('is_host_scheduled_downtime_depth', '0'),
@@ -403,7 +403,7 @@ multisite_builtin_views.update({
'name': 'hostproblems',
'num_columns': 2,
'painters': [
- ('host_state_appr', None),
+ ('host_state', None),
('host', 'mobile_host'),
('host_plugin_output', None),
],
@@ -423,7 +423,7 @@ multisite_builtin_views.update({
#List unhandled host problems
'mobile_hostproblems_unack': mobile_view({
'datasource': 'hosts',
- 'group_painters': [('host_state_appr', None)],
+ 'group_painters': [('host_state', None)],
'hard_filters': ['host_scheduled_downtime_depth',
'summary_host', 'host_acknowledged'],
'hard_filtervars': [
('is_host_scheduled_downtime_depth', '0'),
@@ -442,7 +442,7 @@ multisite_builtin_views.update({
'name': 'hostproblems',
'num_columns': 2,
'painters': [
- ('host_state_appr', None),
+ ('host_state', None),
('host', 'mobile_host'),
('host_plugin_output', None),
],
diff --git a/web/plugins/views/painters.py b/web/plugins/views/painters.py
index 3cebe3f..2aa0991 100644
--- a/web/plugins/views/painters.py
+++ b/web/plugins/views/painters.py
@@ -261,18 +261,16 @@ multisite_painters["sitealias"] = {
# |____/ \___|_| \_/ |_|\___\___||___/
#
-def paint_service_state_short(row, char=False):
+def paint_service_state_short(row ):
if row["service_has_been_checked"] == 1:
state = row["service_state"]
name = nagios_short_state_names[row["service_state"]]
else:
state = "p"
name = "PEND"
- if char:
- name = name[0:3]
return "state svcstate state%s" % state, name
-def paint_host_state_short(row, char=False):
+def paint_host_state_short(row):
# return None, str(row)
if row["host_has_been_checked"] == 1:
state = row["host_state"]
@@ -280,8 +278,6 @@ def paint_host_state_short(row, char=False):
else:
state = "p"
name = "PEND"
- if char:
- name = name[0:3]
return "state hstate hstate%s" % state, name
multisite_painters["service_nagios_link"] = {
@@ -299,14 +295,6 @@ multisite_painters["service_state"] = {
"sorter" : 'svcstate',
}
-multisite_painters["service_state_appr"] = {
- "title" : _("Service state (first character)"),
- "short" : _("State"),
- "columns" :
["service_has_been_checked","service_state"],
- "paint" : lambda row: paint_service_state_short(row, True),
- "sorter" : 'svcstate',
-}
-
multisite_painters["site_icon"] = {
"title" : _("Icon showing the site"),
@@ -771,14 +759,6 @@ multisite_painters["host_state"] = {
"sorter" : 'hoststate',
}
-multisite_painters["host_state_appr"] = {
- "title" : _("Host state"),
- "short" : _("state"),
- "columns" : ["host_has_been_checked","host_state"],
- "paint" : lambda row: paint_host_state_short(row, True),
- "sorter" : 'hoststate',
-}
-
multisite_painters["host_state_onechar"] = {
"title" : _("Host state (first character)"),
"short" : _("S."),