Module: check_mk
Branch: master
Commit: 3c34caf8e5a82aac572b1f5fce92c457346a73fa
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=3c34caf8e5a82a…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Sun Jun 26 14:47:31 2011 +0200
Use _FILENAME instead of _PATH as custom macro
---
modules/check_mk.py | 4 ++--
web/htdocs/dashboard.py | 2 +-
web/plugins/views/wato.py | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/modules/check_mk.py b/modules/check_mk.py
index 14c3699..f782e16 100755
--- a/modules/check_mk.py
+++ b/modules/check_mk.py
@@ -1272,7 +1272,7 @@ def create_nagios_hostdefs(outfile, hostname):
# WATO folder path
path = host_paths.get(hostname)
if path:
- outfile.write(" _PATH\t\t\t\t%s\n" % path)
+ outfile.write(" _FILENAME\t\t\t%s\n" % path)
# Host groups: If the host has no hostgroups it gets the default
@@ -1338,7 +1338,7 @@ def create_nagios_hostdefs(outfile, hostname):
outfile.write(" parents\t\t\t%s\n" % hostname)
if path:
- outfile.write(" _PATH\t\t\t\t%s\n" % path)
+ outfile.write(" _FILENAME\t\t\t%s\n" % path)
hgs = summary_hostgroups_of(hostname)
hostgroups = ",".join(hgs)
diff --git a/web/htdocs/dashboard.py b/web/htdocs/dashboard.py
index 5632561..c3111dd 100644
--- a/web/htdocs/dashboard.py
+++ b/web/htdocs/dashboard.py
@@ -455,7 +455,7 @@ def render_statistics(what, table, filter):
filename = html.var("filename")
if filename and filename != "/":
# filter += "Filter: host_state = 0"
- filter += "Filter: host_custom_variables ~ PATH ^%s\n" %
filename.replace("\n", "")
+ filter += "Filter: host_custom_variables ~ FILENAME ^%s\n" %
filename.replace("\n", "")
query = "GET %s\n" % what
for entry in table:
diff --git a/web/plugins/views/wato.py b/web/plugins/views/wato.py
index eb0f032..e8e27df 100644
--- a/web/plugins/views/wato.py
+++ b/web/plugins/views/wato.py
@@ -40,7 +40,7 @@ class FilterWatoFile(Filter):
def filter(self, infoname):
current = html.var(self.name)
if current and current in self.path_to_tree:
- return "Filter: host_custom_variables ~ PATH ^%s\n" %
current.replace("\n", "") # prevent insertions attack
+ return "Filter: host_custom_variables ~ FILENAME ^%s\n" %
current.replace("\n", "") # prevent insertions attack
else:
return ""