Module: check_mk
Branch: master
Commit: d14350f81a933d2978f99ebc55bb37de09b33e1f
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d14350f81a933d…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed Dec 18 11:45:17 2013 +0100
New button in service list for refreshing all services
In the list of a hosts's services there is now always a new button <i>Automatic
Refresh (Tabula Rasa)</i>. This button does the same as the bulk inventory
with the Tabula Rasa option, but just for that single host: It removes all
autochecks and reinventorizes the host. This is a conveniant way to reset
network interface checks to OK after some ports have changed from down to
up or vice versa. Also changes in the mount options of Linux filesystems
can thus be acknowledged.
Conflicts:
ChangeLog
web/htdocs/wato.py
---
.bugs/741 | 6 ++++--
.werks/353 | 14 ++++++++++++++
ChangeLog | 1 +
web/htdocs/wato.py | 21 +++++++++------------
4 files changed, 28 insertions(+), 14 deletions(-)
diff --git a/.bugs/741 b/.bugs/741
index c1b68d7..b1b0fb7 100644
--- a/.bugs/741
+++ b/.bugs/741
@@ -1,9 +1,9 @@
Title: Refreshing autochecks in wato
Component: wato
-State: open
+Class: nastiness
+State: done
Date: 2012-09-19 11:58:31
Targetversion: 1.4.0
-Class: nastiness
If for example mount options of a services changes, there is no way in the
wato service section to refresh the autochecks to use the new options
@@ -11,3 +11,5 @@ wato service section to refresh the autochecks to use the new options
Resolution: Make next to [Save manual check configuration] a new button
[Refresh all services], that does a complete reinventory (like cmk -II,
but should only refresh services that are already there!!!)
+
+2013-12-18 11:43:05: changed state open -> done
diff --git a/.werks/353 b/.werks/353
new file mode 100644
index 0000000..7b6426b
--- /dev/null
+++ b/.werks/353
@@ -0,0 +1,14 @@
+Title: New button in service list for refreshing all services
+Level: 2
+Component: wato
+Version: 1.2.4b1
+Date: 1387363388
+Class: feature
+
+In the list of a hosts's services there is now always a new button
<i>Automatic
+Refresh (Tabula Rasa)</i>. This button does the same as the bulk inventory
+with the Tabula Rasa option, but just for that single host: It removes all
+autochecks and reinventorizes the host. This is a conveniant way to reset
+network interface checks to OK after some ports have changed from down to
+up or vice versa. Also changes in the mount options of Linux filesystems
+can thus be acknowledged.
diff --git a/ChangeLog b/ChangeLog
index ea44f79..19446f2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -170,6 +170,7 @@
* 0428 Changed user profiles (e.g. pw changes) are now replicated in distributed
setups...
* 0114 User Custom Attributes can now be exported to the core...
* 0448 New button in WATO service list for displaying check parameters...
+ * 0353 New button in service list for refreshing all services...
* 0057 FIX: Fix exception in WATO host editor on custom tag without topic...
* 0241 FIX: Improved sorting of WATO folders in dropdown menu...
* 0019 FIX: Fixed wording in WATO rule for MSSQL check
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 4bc1877..481de8b 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -2457,9 +2457,6 @@ def mode_inventory(phase, firsttime):
return
cache_options = html.var("_scan") and [ '@scan' ] or [
'@noscan' ]
- table = check_mk_automation(host[".siteid"],
"try-inventory", cache_options + [hostname])
- table.sort()
- active_checks = {}
new_target = "folder"
if html.var("_refresh"):
@@ -2486,16 +2483,15 @@ def mode_inventory(phase, firsttime):
active_checks[(ct, item)] = paramstring
if st == "clustered":
active_checks[(ct, item)] = paramstring
- if st == "clustered":
- active_checks[(ct, item)] = paramstring
- check_mk_automation(host[".siteid"], "set-autochecks",
[hostname], active_checks)
- if host.get("inventory_failed"):
- del host["inventory_failed"]
- save_hosts()
- message = _("Saved check configuration of host [%s] with %d
services") % \
- (hostname, len(active_checks))
- log_pending(LOCALRESTART, hostname, "set-autochecks", message)
+ check_mk_automation(host[".siteid"],
"set-autochecks", [hostname], active_checks)
+ if host.get("inventory_failed"):
+ del host["inventory_failed"]
+ save_hosts()
+ message = _("Saved check configuration of host [%s] with %d
services") % \
+ (hostname, len(active_checks))
+ log_pending(LOCALRESTART, hostname, "set-autochecks", message)
+
mark_affected_sites_dirty(g_folder, hostname, sync=False, restart=True)
return new_target, message
return "folder"
@@ -2546,6 +2542,7 @@ def show_service_table(host, firsttime):
if len(checktable) > 0:
html.button("_save", _("Save manual check
configuration"))
+ html.button("_refresh", _("Automatic Refresh (Tabula
Rasa)"))
html.write(" ")
if parameter_column: