Module: check_mk
Branch: master
Commit: cd00173169c8fe3bdb16a387ab0db9b39b3d92ba
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=cd00173169c8fe…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Tue Jan 14 09:45:32 2014 +0100
Fix werk 117: availability button must not be shown in dashboard
---
web/htdocs/views.py | 2 +-
web/plugins/wato/check_parameters.py | 11 +++++++++++
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/web/htdocs/views.py b/web/htdocs/views.py
index 6f5f12b..f36b808 100644
--- a/web/htdocs/views.py
+++ b/web/htdocs/views.py
@@ -1851,7 +1851,7 @@ def show_context_links(thisview, active_filters, show_filters,
display_options,
(thisview["owner"], thisview["name"], backurl)
html.context_button(_("Edit View"), url, "edit",
id="edit", bestof=config.context_buttons_to_show)
- if show_availability:
+ if 'E' in display_options and show_availability:
html.context_button(_("Availability"), html.makeuri([("mode",
"availability")]), "availability")
if 'B' in display_options:
diff --git a/web/plugins/wato/check_parameters.py b/web/plugins/wato/check_parameters.py
index 06307eb..e655090 100644
--- a/web/plugins/wato/check_parameters.py
+++ b/web/plugins/wato/check_parameters.py
@@ -1135,6 +1135,17 @@ register_check_parameters(
]
)
])),
+ ("average",
+ Integer (
+ title = _("Averaging"),
+ help = _("If this parameter is set, all measured values will be
averaged "
+ "over the specified time interval before levels are being
applied. Per "
+ "default, averaging is turned off. "),
+ unit = _("minutes"),
+ minvalue = 1,
+ )
+ ),
+
]),
None,
"dict"