Module: check_mk
Branch: master
Commit: 124c1bbe0719c241b47c7aa3ada21d336d675b90
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=124c1bbe0719c2…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Tue Nov 16 11:48:28 2010 +0100
webconf: complete cycle working for the first time
---
modules/check_mk.py | 2 ++
web/htdocs/webconf.py | 4 +++-
2 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/modules/check_mk.py b/modules/check_mk.py
index 6d9b0e4..e7b3447 100755
--- a/modules/check_mk.py
+++ b/modules/check_mk.py
@@ -3572,6 +3572,8 @@ def automation_parse_autochecks_file(hostname):
def automation_delete_host(args):
hostname = args[0]
for path in [
+ "%s/%s" % (precompiled_hostchecks_dir, hostname),
+ "%s/%s.py" % (precompiled_hostchecks_dir, hostname),
"%s/%s.mk" % (autochecksdir, hostname),
"%s/%s" % (logwatch_dir, hostname),
"%s/%s" % (counters_directory, hostname),
diff --git a/web/htdocs/webconf.py b/web/htdocs/webconf.py
index 63cdd54..d4caa78 100644
--- a/web/htdocs/webconf.py
+++ b/web/htdocs/webconf.py
@@ -134,7 +134,7 @@ def page_index(h):
if delname and delname in hosts and html.confirm("Do you really want to delete
the host <tt>%s</tt>?" % delname):
del hosts[delname]
write_configuration_file(filename, hosts)
- check_mk_automation("delete-host", delname)
+ check_mk_automation("delete-host", [delname])
# Show table of hosts in this file
@@ -199,6 +199,8 @@ def page_edithost(h):
html.header(title)
html.begin_context_buttons()
html.context_button("Hostlist", "webconf.py?filename=" +
filename)
+ if hostname == None:
+ hostname = html.var("name")
html.context_button("Services",
"webconf_services.py?filename=%s&host=%s&_activate_available=1" %
(filename, hostname))
html.end_context_buttons()