Module: check_mk
Branch: master
Commit: a059095a71a01ea372154293aa0b660c4ae88392
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=a059095a71a01e…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Oct 29 08:34:52 2014 +0100
#1163 Service discovery: Added direct link to check parameter ruleset of services
This link was existing before. It had been replaced by a link to a page which lists
all rulesets affecting a service. This commit adds the link again as additional one to
the
list of discovered services
---
.werks/1163 | 11 +++++++++++
ChangeLog | 1 +
web/htdocs/images/button_diagnose_hi.png | Bin 0 -> 3195 bytes
web/htdocs/images/button_diagnose_lo.png | Bin 0 -> 3963 bytes
web/htdocs/images/button_ignore_hi.png | Bin 0 -> 3326 bytes
web/htdocs/images/button_ignore_lo.png | Bin 0 -> 3640 bytes
web/htdocs/wato.py | 29 ++++++++---------------------
7 files changed, 20 insertions(+), 21 deletions(-)
diff --git a/.werks/1163 b/.werks/1163
new file mode 100644
index 0000000..6268f02
--- /dev/null
+++ b/.werks/1163
@@ -0,0 +1,11 @@
+Title: Service discovery: Added direct link to check parameter ruleset of services
+Level: 1
+Component: wato
+Compatible: compat
+Version: 1.2.5i6
+Date: 1414567986
+Class: feature
+
+This link was existing before. It had been replaced by a link to a page which lists
+all rulesets affecting a service. This commit adds the link again as additional one to
the
+list of discovered services
diff --git a/ChangeLog b/ChangeLog
index b1761c1..957232e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -154,6 +154,7 @@
* 1115 Renamed rule: Hosts using SNMP v2c -> Legacy SNMP devices using SNMP
v2c...
* 1404 Make title/help of custom user attributes localizable...
* 1159 Remote BI Aggregations can now be configured to be checked as single
services...
+ * 1163 Service discovery: Added direct link to check parameter ruleset of
services...
* 1064 FIX: Fixed rare issue with WATO communication in distributed setups (different
OS versions)...
* 1089 FIX: Snapshot restore: fixed exception during exception handling......
* 1091 FIX: logwatch patterns: allow unicode text in pattern comment
diff --git a/web/htdocs/images/button_diagnose_hi.png
b/web/htdocs/images/button_diagnose_hi.png
new file mode 100644
index 0000000..15b6e00
Binary files /dev/null and b/web/htdocs/images/button_diagnose_hi.png differ
diff --git a/web/htdocs/images/button_diagnose_lo.png
b/web/htdocs/images/button_diagnose_lo.png
new file mode 100644
index 0000000..8517c1d
Binary files /dev/null and b/web/htdocs/images/button_diagnose_lo.png differ
diff --git a/web/htdocs/images/button_ignore_hi.png
b/web/htdocs/images/button_ignore_hi.png
new file mode 100644
index 0000000..59a7804
Binary files /dev/null and b/web/htdocs/images/button_ignore_hi.png differ
diff --git a/web/htdocs/images/button_ignore_lo.png
b/web/htdocs/images/button_ignore_lo.png
new file mode 100644
index 0000000..6b4497d
Binary files /dev/null and b/web/htdocs/images/button_ignore_lo.png differ
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index b180543..18dfd15 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -3300,10 +3300,6 @@ def show_service_table(host, firsttime):
table.cell(_("Check Parameters"))
if varname and varname in g_rulespecs:
rulespec = g_rulespecs[varname]
- url = make_link([("mode", "edit_ruleset"),
- ("varname", varname),
- ("host", hostname),
- ("item", mk_repr(item))])
try:
rulespec["valuespec"].validate_datatype(params,
"")
rulespec["valuespec"].validate_value(params,
"")
@@ -3314,30 +3310,22 @@ def show_service_table(host, firsttime):
html.write(paramtext)
- # # Strip all HTML code from the paramtext
- # table.cell("")
- # paramtext = paramtext.replace('</td>',
'\t')
- # paramtext = paramtext.replace('</tr>',
'\n')
- # paramtext = html.strip_tags(paramtext)
-
- # if parameter_column:
- # title = _("Edit the parameters of this services")
- # else:
- # title = _("Check parameters for this service") +
": \n" + paramtext
- # #html.write('<a href="%s"><img
title="%s" class=icon
src="images/icon_rulesets.png"></a>' %
- # # (url, title))
-
# Icon for Service parameters. Not for missing services!
- table.cell("", "")
+ table.cell(css='buttons')
if state_type not in [ "new", "ignored" ]:
+ # Link to list of all rulesets affecting this service
params_url = make_link([("mode",
"object_parameters"),
("host", hostname),
("service", descr)])
html.icon_button(params_url, _("View and modify the parameters for
this service"), "rulesets")
+ url = make_link([("mode", "edit_ruleset"),
+ ("varname", varname),
+ ("host", hostname),
+ ("item", mk_repr(item))])
+ html.icon_button(url, _("Edit and analyze the check parameters of
this services"), "diagnose")
# Permanently disable icon
- table.cell()
if state_type in ['new', 'old']:
url = make_link([
('mode', 'edit_ruleset'),
@@ -3350,8 +3338,7 @@ def show_service_table(host, firsttime):
('rule_folder', ''),
('back_mode', 'inventory'),
])
- html.write('<a href="%s"><img title="%s"
class=icon src="images/icon_ignore.png"></a>' %
- (url, _("Create rule to permanently disable this
service")))
+ html.icon_button(url, _("Create rule to permanently disable this
service"), "ignore")
# Temporary ignore checkbox
table.cell()