Module: check_mk
Branch: master
Commit: 6dcae0f06a6de54a9f55ef9afe38609d1b9e2877
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=6dcae0f06a6de5…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Thu Feb 19 10:33:19 2015 +0100
#1945 FIX doc/treasures/downtime script: was no longer working because of latest changes
in the GUI
---
.werks/1945 | 10 ++++++++++
ChangeLog | 1 +
doc/treasures/downtime | 8 ++++++--
3 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/.werks/1945 b/.werks/1945
new file mode 100644
index 0000000..278a1f7
--- /dev/null
+++ b/.werks/1945
@@ -0,0 +1,10 @@
+Title: doc/treasures/downtime script: was no longer working because of latest changes in
the GUI
+Level: 1
+Component: multisite
+Compatible: compat
+Version: 1.2.7i1
+Date: 1424337912
+Class: fix
+
+This little helper script used the wrong multisite filter elements.
+Some of them have been renamed, e.g. from host to host_regex.
diff --git a/ChangeLog b/ChangeLog
index 2502a5b..e9ec13e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -204,6 +204,7 @@
* 1983 FIX: Fixed special case in language configuration via user profile...
* 1984 FIX: Fixed loosing sidebar after switching to/from edit mode in dashboard
edior on page reload...
* 1985 FIX: PNP graph dashlet handles graphs in distributed setups correctly...
+ * 1945 FIX: doc/treasures/downtime script: was no longer working because of latest
changes in the GUI...
WATO:
* 1760 Added search form to manual checks page
diff --git a/doc/treasures/downtime b/doc/treasures/downtime
index 8374419..262994d 100755
--- a/doc/treasures/downtime
+++ b/doc/treasures/downtime
@@ -154,19 +154,20 @@ variables = [
( "_transid", "-1" ),
( "_do_confirm", "yes" ),
( "_do_actions", "yes" ),
- ( "host", arg_host ),
]
if opt_mode == 'remove':
variables += [
("view_name", "downtimes"),
("_remove_downtimes", "Remove"),
+ ("host_regex", arg_host + "$" ),
]
else:
variables += [
( "_down_from_now", "yes" ),
( "_down_minutes", opt_duration ),
( "_down_comment", opt_comment ),
+ ("host", arg_host ),
]
if arg_services:
variables.append(("view_name", "service"))
@@ -192,7 +193,10 @@ def set_downtime(variables, add_vars):
if arg_services:
for service in arg_services:
- set_downtime(variables, [("service", service + "$")])
+ if opt_mode == "remove":
+ set_downtime(variables, [("service_regex", service +
"$")])
+ else:
+ set_downtime(variables, [("service", service)])
else:
set_downtime(variables, [])
if opt_all: