Module: check_mk
Branch: master
Commit: 3b159b27f905cd66902bc8f2f7d6d28d77079046
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=3b159b27f905cd…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Apr 10 11:36:47 2019 +0200
Moved dynamic configuration link to host page
The dynamic configuration is currently a feature to configure hosts.
For this reason we moved the link to the hosts page of WATO.
Change-Id: I5dbc643d96dae2bd146433db0c531898366d6ac0
---
cmk/gui/wato/pages/folders.py | 5 +++++
tests/unit/cmk/gui/plugins/wato/utils/test_main_menu.py | 5 +----
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/cmk/gui/wato/pages/folders.py b/cmk/gui/wato/pages/folders.py
index 03e1e8a..e4321c9 100644
--- a/cmk/gui/wato/pages/folders.py
+++ b/cmk/gui/wato/pages/folders.py
@@ -125,6 +125,11 @@ class ModeFolder(WatoMode):
html.context_button(
_("Search"), watolib.folder_preserving_link([("mode",
"search")]), "search")
+ if config.user.may("wato.dcd_connections"):
+ html.context_button(
+ _("Dynamic configuration"),
+ watolib.folder_preserving_link([("mode",
"dcd_connections")]), "dcd_connections")
+
def action(self):
if html.request.var("_search"): # just commit to search form
return
diff --git a/tests/unit/cmk/gui/plugins/wato/utils/test_main_menu.py
b/tests/unit/cmk/gui/plugins/wato/utils/test_main_menu.py
index 146721f..edb3d99 100644
--- a/tests/unit/cmk/gui/plugins/wato/utils/test_main_menu.py
+++ b/tests/unit/cmk/gui/plugins/wato/utils/test_main_menu.py
@@ -1,6 +1,4 @@
-import pytest
-
-# Following import is used to trigger pluggin loading
+# Following import is used to trigger plugin loading
import cmk.gui.wato # pylint: disable=unused-import
import cmk.gui.plugins.wato.utils.main_menu as main_menu
@@ -8,7 +6,6 @@ import cmk.gui.plugins.wato.utils.main_menu as main_menu
def test_registered_modules():
module_names = [m.mode_or_url for m in main_menu.get_modules()]
assert module_names == [
- 'dcd_connections',
'agents',
'folder',
'tags',