service parameters per default now
Message-ID: <54817980.eNmkKY27iSOWracc%mk(a)mathias-kettner.de>
User-Agent: Heirloom mailx 12.5 6/20/10
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Module: check_mk
Branch: master
Commit: f230ee1cd5cd07b2ac171929e351f876954eb6d4
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=f230ee1cd5cd07…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Fri Dec 5 10:22:28 2014 +0100
#1700 Enable icon for link to host/service parameters per default now
Also let it point to the general configuration page of that host/service, not
to its check parameters. Now also active checks and hosts have this icon.
---
.werks/1700 | 10 ++++++++++
ChangeLog | 1 +
web/plugins/config/builtin.py | 2 +-
web/plugins/icons/builtin.py | 23 ++++++++++++-----------
web/plugins/wato/check_mk_configuration.py | 2 +-
5 files changed, 25 insertions(+), 13 deletions(-)
diff --git a/.werks/1700 b/.werks/1700
new file mode 100644
index 0000000..8bc0a01
--- /dev/null
+++ b/.werks/1700
@@ -0,0 +1,10 @@
+Title: Enable icon for link to host/service parameters per default now
+Level: 2
+Component: multisite
+Compatible: compat
+Version: 1.2.5i7
+Date: 1417771306
+Class: feature
+
+Also let it point to the general configuration page of that host/service, not
+to its check parameters. Now also active checks and hosts have this icon.
diff --git a/ChangeLog b/ChangeLog
index 1ca3481..303736f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -127,6 +127,7 @@
* 1558 Better visualize manually changed notification enable/disable
* 1621 Sorting Check_MK* services always on top of services lists
* 1636 Crash checks now have an icon for viewing and sending a crash dump...
+ * 1700 Enable icon for link to host/service parameters per default now...
* 1164 FIX: Fixed links from servicegroup overviews to single servicegroups
* 1166 FIX: Also prevting stylesheet update issues during version updates (just like
for JS files)
* 1481 FIX: Fix broken layout of Host-, Service- and Contactgroup filters
diff --git a/web/plugins/config/builtin.py b/web/plugins/config/builtin.py
index 255f37d..11f4b2a 100644
--- a/web/plugins/config/builtin.py
+++ b/web/plugins/config/builtin.py
@@ -192,7 +192,7 @@ auth_by_http_header = False
table_row_limit = 100
# Add an icon pointing to the WATO rule to each service
-multisite_draw_ruleicon = False
+multisite_draw_ruleicon = True
# Default downtime configuration
adhoc_downtime = {}
diff --git a/web/plugins/icons/builtin.py b/web/plugins/icons/builtin.py
index 97fc581..86eafcb 100644
--- a/web/plugins/icons/builtin.py
+++ b/web/plugins/icons/builtin.py
@@ -118,18 +118,19 @@ multisite_icons.append({
def paint_rule_editor(what, row, tags, custom_vars):
- if config.may("wato.rulesets") and config.multisite_draw_ruleicon:
+ if config.wato_enabled and config.may("wato.rulesets") and
config.multisite_draw_ruleicon:
+ urlvars = [("mode", "object_parameters"),
+ ("host", row["host_name"])]
+
if what == 'service':
- check_command = row["service_check_command"]
- if check_command.startswith("check_mk-") or \
- check_command.startswith("check_mk_active-"):
- url = html.makeuri_contextless( [("mode",
"edit_ruleset"),
- ("check_command",
row["service_check_command"]),
- ("service_description",
row["service_description"]),
- ("host",
row["host_name"])], "wato.py")
- title = _("Edit check parameters for this service")
- return '<a href="%s"><img title="%s"
class=icon src="images/icon_rulesets.png"></a>' % \
- (url, title)
+ urlvars.append(("service", row["service_description"]))
+ title = _("View and edit parameters for this service")
+ else:
+ title = _("View and edit parameters for this host")
+
+ url = html.makeuri_contextless(urlvars, "wato.py")
+ return '<a href="%s"><img title="%s" class=icon
src="images/icon_rulesets.png"></a>' % \
+ (url, title)
multisite_icons.append({
'service_columns': [ 'description', 'check_command',
"host_name" ],
diff --git a/web/plugins/wato/check_mk_configuration.py
b/web/plugins/wato/check_mk_configuration.py
index 03df040..626e839 100644
--- a/web/plugins/wato/check_mk_configuration.py
+++ b/web/plugins/wato/check_mk_configuration.py
@@ -240,7 +240,7 @@ register_configvar(group,
help = _("When enabled a rule editor icon is displayed for each "
"service in the multisite views. It is only displayed if the
user "
"does have the permission to edit rules."),
- default_value = False),
+ default_value = True),
domain = "multisite")