Module: check_mk
Branch: master
Commit: 5e7f4cceb66db14025cff9eb1abfaa7faea6a939
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=5e7f4cceb66db1…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu Jan 16 10:53:20 2014 +0100
New button in WATO service list for displaying check parameters
In WATO the service list of a host has now a new button <i>Show Check
Parameters</i>. That button
adds a new column to the list that shows the check parameters of that service directly in
the
table - not just as a tooltip to the triangle icon.
---
.werks/448 | 10 ++++++++++
ChangeLog | 1 +
web/htdocs/wato.py | 21 ++++++++++++++++++++-
3 files changed, 31 insertions(+), 1 deletion(-)
diff --git a/.werks/448 b/.werks/448
new file mode 100644
index 0000000..bc83c34
--- /dev/null
+++ b/.werks/448
@@ -0,0 +1,10 @@
+Title: New button in WATO service list for displaying check parameters
+Level: 2
+Component: wato
+Version: 1.2.5i1
+Date: 1389865905
+Class: feature
+
+In WATO the service list of a host has now a new button <i>Show Check
Parameters</i>. That button
+adds a new column to the list that shows the check parameters of that service directly in
the
+table - not just as a tooltip to the triangle icon.
diff --git a/ChangeLog b/ChangeLog
index ee4c4d2..88526b9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -150,6 +150,7 @@
* 0437 Convert WATO rule for debug_log into simple Checkbox...
* 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...
* 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 db695c7..77c8f69 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -2445,6 +2445,17 @@ def mode_inventory(phase, firsttime):
config.need_permission("wato.services")
check_host_permissions(hostname)
if html.check_transaction():
+
+ # Settings for showing parameters
+ if html.var("_show_parameters"):
+ parameter_column = True
+ config.save_user_file("parameter_column", True)
+ return
+ elif html.var("_hide_parameters"):
+ parameter_column = False
+ config.save_user_file("parameter_column", False)
+ return
+
cache_options = html.var("_scan") and [ '@scan' ] or [
'@noscan' ]
table = check_mk_automation(host[".siteid"],
"try-inventory", cache_options + [hostname])
table.sort()
@@ -2498,6 +2509,7 @@ def show_service_table(host, firsttime):
# Read current check configuration
cache_options = html.var("_scan") and [ '@scan' ] or [
'@noscan' ]
+ parameter_column = config.load_user_file("parameter_column", False)
# We first try using the Cache (if the user has not pressed Full Scan).
# If we do not find any data, we omit the cache and immediately try
@@ -2535,6 +2547,14 @@ def show_service_table(host, firsttime):
if len(checktable) > 0:
html.button("_save", _("Save manual check
configuration"))
+ html.write(" ")
+ if parameter_column:
+ html.button("_hide_parameters", _("Hide Check
Parameters"))
+ else:
+ html.button("_show_parameters", _("Show Check
Parameters"))
+
+
+
html.hidden_fields()
if html.var("_scan"):
html.hidden_field("_scan", "on")
@@ -2542,7 +2562,6 @@ def show_service_table(host, firsttime):
table.begin(css ="data", searchable = False)
# This option will later be switchable somehow
- parameter_column = False
for state_name, state_type, checkbox in [
( _("Available (missing) services"), "new", firsttime ),