Module: check_mk
Branch: master
Commit: 73a427e4ecbf4409eb7753ad1fd885e165af8aa3
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=73a427e4ecbf44…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Mar 2 16:01:26 2018 +0100
Removed long deprecated summary host related code
Change-Id: I0509559e60c7ccb46f0d6e4f131b8688f2801bc9
---
web/htdocs/bi.py | 4 +---
web/plugins/icons/builtin.py | 23 -----------------------
web/plugins/sidebar/shipped.py | 22 ++--------------------
web/plugins/visuals/filters.py | 5 -----
4 files changed, 3 insertions(+), 51 deletions(-)
diff --git a/web/htdocs/bi.py b/web/htdocs/bi.py
index 56344b6..4b1b786 100644
--- a/web/htdocs/bi.py
+++ b/web/htdocs/bi.py
@@ -138,7 +138,7 @@ def load_services(only_hosts):
g_services_by_hostname = {}
# Create optional host filter
- filter_txt = 'Filter: custom_variable_names < _REALNAME\n' # drop summary
hosts
+ filter_txt = ''
if only_hosts:
# Only fetch the requested hosts
host_filter = []
@@ -685,7 +685,6 @@ class BISitedataManager(object):
def _query_data(self, only_sites):
- filter_txt = 'Filter: custom_variable_names < _REALNAME\n' # drop
summary hosts
try:
sites.live().set_only_sites(only_sites)
sites.live().set_prepend_site(True)
@@ -693,7 +692,6 @@ class BISitedataManager(object):
data = sites.live().query(
"GET hosts\n"
- +filter_txt+
"Columns: name custom_variable_names custom_variable_values "
"services childs parents alias\n"
"Cache: reload\n"
diff --git a/web/plugins/icons/builtin.py b/web/plugins/icons/builtin.py
index 9c3d10d..e95dd7f 100644
--- a/web/plugins/icons/builtin.py
+++ b/web/plugins/icons/builtin.py
@@ -264,29 +264,6 @@ multisite_icons_and_actions['status_acknowledged'] = {
}
#.
-# .--Real-Host-----------------------------------------------------------.
-# | ____ _ _ _ _ |
-# | | _ \ ___ __ _| | | | | | ___ ___| |_ |
-# | | |_) / _ \/ _` | |_____| |_| |/ _ \/ __| __| |
-# | | _ < __/ (_| | |_____| _ | (_) \__ \ |_ |
-# | |_| \_\___|\__,_|_| |_| |_|\___/|___/\__| |
-# | |
-# +----------------------------------------------------------------------+
-# | |
-# '----------------------------------------------------------------------'
-
-def paint_realhost_link_image(what, row, tags, host_custom_vars):
- # Link to detail host if this is a summary host
- if "_REALNAME" in host_custom_vars:
- newrow = row.copy()
- newrow["host_name"] = host_custom_vars["_REALNAME"]
- return 'detail', _("Detailed host infos"), url_to_view(newrow,
'host')
-
-multisite_icons_and_actions['realhost'] = {
- 'paint': paint_realhost_link_image,
-}
-
-#.
# .--Perfgraph-----------------------------------------------------------.
# | ____ __ _ |
# | | _ \ ___ _ __ / _| __ _ _ __ __ _ _ __ | |__ |
diff --git a/web/plugins/sidebar/shipped.py b/web/plugins/sidebar/shipped.py
index 20cc2e2..8dc45bd 100644
--- a/web/plugins/sidebar/shipped.py
+++ b/web/plugins/sidebar/shipped.py
@@ -281,11 +281,6 @@ def render_hosts(mode):
query = "GET hosts\nColumns: name state worst_service_state\nLimit: 100\n"
view = "host"
- if mode == "summary":
- query += "Filter: custom_variable_names >= _REALNAME\n"
- else:
- query += "Filter: custom_variable_names < _REALNAME\n"
-
if mode == "problems":
view = "problemsofhost"
# Exclude hosts and services in downtime
@@ -358,16 +353,6 @@ sidebar_snapins["hosts"] = {
"styles" : snapin_allhosts_styles,
}
-sidebar_snapins["summary_hosts"] = {
- "title" : _("Summary Hosts"),
- "description" : _("A summary state of all summary hosts (summary hosts
hold "
- "aggregated service states and are a feature of
Check_MK)"),
- "render" : lambda: render_hosts("summary"),
- "allowed" : [],
- "refresh" : True,
- "styles" : snapin_allhosts_styles,
-}
-
sidebar_snapins["problem_hosts"] = {
"title" : _("Problem Hosts"),
"description" : _("A summary state of all hosts that have a problem,
with "
@@ -392,7 +377,6 @@ def render_hostmatrix():
sites.live().set_prepend_site(True)
query = "GET hosts\n" \
"Columns: name state has_been_checked worst_service_state
scheduled_downtime_depth\n" \
- "Filter: custom_variable_names < _REALNAME\n" \
"Limit: 901\n"
hosts = sites.live().query(query)
sites.live().set_prepend_site(False)
@@ -590,8 +574,7 @@ def get_tactical_overview_data(extra_filter_headers):
"Stats: host_staleness >= %s\n" % configured_staleness_threshold +
\
"Stats: host_scheduled_downtime_depth = 0\n" \
"StatsAnd: 2\n" \
- "Filter: custom_variable_names < _REALNAME\n" + \
- extra_filter_headers
+ + extra_filter_headers
service_query = \
"GET services\n" \
@@ -611,8 +594,7 @@ def get_tactical_overview_data(extra_filter_headers):
"Stats: host_scheduled_downtime_depth = 0\n" \
"Stats: service_scheduled_downtime_depth = 0\n" \
"StatsAnd: 3\n" \
- "Filter: host_custom_variable_names < _REALNAME\n" + \
- extra_filter_headers
+ + extra_filter_headers
# In case the user is not allowed to see unrelated events
ec_filters = ""
diff --git a/web/plugins/visuals/filters.py b/web/plugins/visuals/filters.py
index f31cc59..3002855 100644
--- a/web/plugins/visuals/filters.py
+++ b/web/plugins/visuals/filters.py
@@ -682,11 +682,6 @@ class FilterNagiosExpression(FilterTristate):
def filter_code(self, infoname, positive):
return positive and self.pos or self.neg
-
-declare_filter(120, FilterNagiosExpression("host", "summary_host",
_("Is summary host"),
- "Filter: host_custom_variable_names >= _REALNAME\n",
- "Filter: host_custom_variable_names < _REALNAME\n"))
-
declare_filter(250, FilterNagiosFlag("service",
"service_process_performance_data", _("Processes performance data")))
declare_filter(251, FilterNagiosExpression("service",
"has_performance_data", _("Has performance data"),
"Filter: service_perf_data != \n",