Module: check_mk
Branch: master
Commit: 5a3467e47b0c97f617ce0fdd9540c4b63f53b3c7
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=5a3467e47b0c97…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Mar 17 10:27:20 2017 +0100
4504 FIX Removed wrong context menu links to add "availability views" to
dashboards
Change-Id: I84f2e1d579ab1440f227edc0bf2dbdab4afec814
---
.werks/4504 | 10 ++++++++++
web/htdocs/dashboard.py | 2 +-
web/htdocs/htmllib.py | 2 +-
3 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/.werks/4504 b/.werks/4504
new file mode 100644
index 0000000..8b64161
--- /dev/null
+++ b/.werks/4504
@@ -0,0 +1,10 @@
+Title: Removed wrong context menu links to add "availability views" to
dashboards
+Level: 1
+Component: multisite
+Compatible: compat
+Edition: cre
+Version: 1.5.0i1
+Date: 1489742803
+Class: fix
+
+
diff --git a/web/htdocs/dashboard.py b/web/htdocs/dashboard.py
index fc94229..a49d91d 100644
--- a/web/htdocs/dashboard.py
+++ b/web/htdocs/dashboard.py
@@ -1271,7 +1271,7 @@ def popup_list_dashboards(add_type):
if not config.user.may("general.edit_dashboards"):
return []
- if add_type == "graph_collection":
+ if add_type in [ "availability", "graph_collection" ]:
return
load_dashboards()
diff --git a/web/htdocs/htmllib.py b/web/htdocs/htmllib.py
index ff33ad0..d592cbe 100644
--- a/web/htdocs/htmllib.py
+++ b/web/htdocs/htmllib.py
@@ -2709,7 +2709,7 @@ class html(HTMLGenerator, Encoder, RequestHandler):
self.popup_trigger(
self.render_icon("menu", _("Add this view to..."),
cssclass="iconbutton inline"),
'add_visual', 'add_visual', data=[mode_name,
encoded_vars, {'name': self.var('view_name')}],
- url_vars=[("add_type", "view")])
+ url_vars=[("add_type", mode_name)])
# TODO: This should be handled by pagetypes.py
elif self.myfile == "graph_collection":