Module: check_mk
Branch: master
Commit: 91e22dd23dabce6e77082caa27cb3e77b615c25c
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=91e22dd23dabce…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Oct 5 13:49:39 2017 +0200
Graph tunings can now be applied to only specific destinations (views, dashlets, ...)
Change-Id: I455d26e6c62417176cbb7ced88255b91ae3df16e
---
web/htdocs/metrics.py | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)
diff --git a/web/htdocs/metrics.py b/web/htdocs/metrics.py
index dec841d..ef9616a 100644
--- a/web/htdocs/metrics.py
+++ b/web/htdocs/metrics.py
@@ -156,6 +156,22 @@ scalar_colors = {
}
+class GraphDestinations(object):
+ dashlet = "dashlet"
+ view = "view"
+ report = "report"
+ notification = "notification"
+
+ @classmethod
+ def choices(self):
+ return [
+ (GraphDestinations.dashlet, _("Dashlet")),
+ (GraphDestinations.view, _("View")),
+ (GraphDestinations.report, _("Report")),
+ (GraphDestinations.notification, _("Notification")),
+ ]
+
+
#.
# .--Helpers-------------------------------------------------------------.
# | _ _ _ |
@@ -1577,7 +1593,8 @@ def host_service_graph_dashlet_cmk(graph_identification,
custom_graph_render_opt
graph_render_options)
try:
- graph_recipes =
graph_identification_types.create_graph_recipes(graph_identification)
+ graph_recipes =
graph_identification_types.create_graph_recipes(graph_identification,
+
destination=GraphDestinations.dashlet)
if graph_recipes:
graph_recipe = graph_recipes[0]
else: