Module: check_mk
Branch: master
Commit: de7cef8acd999755ffdbe4418df58f7fea89b0e3
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=de7cef8acd9997…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Wed Jun 21 13:49:46 2017 +0200
4870 FIX Fixed ineffective graph time range display option
Change-Id: I0382874116c5ec3135a94c9b72da9a8f8abd4af9
---
.werks/4870 | 16 ++++++++++++++++
web/plugins/views/painters.py | 4 +++-
2 files changed, 19 insertions(+), 1 deletion(-)
diff --git a/.werks/4870 b/.werks/4870
new file mode 100644
index 0000000..3bee8b3
--- /dev/null
+++ b/.werks/4870
@@ -0,0 +1,16 @@
+Title: Fixed ineffective graph time range display option
+Level: 1
+Component: metrics
+Class: fix
+Compatible: compat
+Edition: cee
+State: unknown
+Version: 1.5.0i1
+Date: 1497954949
+
+Starting point is having views with configured column
+{{Service Graphs with Timerange Previews}}. Then in
+{{Display options}} which modifies user specific options,
+chosen {{Graph Timerange}} had no effects on displayed graphs.
+The time range could be changed only with {{Set default time range}}
+which is a subset of {{Graph Timerange}}.
diff --git a/web/plugins/views/painters.py b/web/plugins/views/painters.py
index a2c98f8..afc0d87 100644
--- a/web/plugins/views/painters.py
+++ b/web/plugins/views/painters.py
@@ -92,7 +92,7 @@ from lib import *
multisite_painter_options["pnp_timerange"] = {
'valuespec' : Timerange(
- title = _("Graph Timerange"),
+ title = _("Graph time range"),
default_value = None,
include_time = True,
)
@@ -1002,9 +1002,11 @@ def paint_time_graph_cmk(row, cell, show_timeranges=False):
# a) the painter parameters configured in the view
# b) the painter options set per user and view
graph_render_options = cell.painter_parameters().copy()
+
options = painter_options.get_without_default("graph_render_options")
if options != None:
graph_render_options.update(options)
+ del graph_render_options["set_default_time_range"]
if html.is_mobile():
graph_render_options.update({