Module: check_mk
Branch: master
Commit: 32a7c8eeb953f12eaf25f630b66154f92da0c98b
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=32a7c8eeb953f1…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Jul 16 12:09:02 2018 +0200
Fixed circular dependency between WATO plugins and wato module
The plugins must not refer to cmk.gui.wato or it's submodules. Moved
shared functionality from cmk.gui.wato to cmk.gui.plugins.wato.utils.
Change-Id: I56a47c0362105eabb94a2d2b2b41bf45b1414000
---
cmk/gui/plugins/wato/utils/__init__.py | 8 ++++----
cmk/gui/{wato => plugins/wato/utils}/base_modes.py | 0
cmk/gui/{wato => plugins/wato/utils}/context_buttons.py | 0
cmk/gui/{wato => plugins/wato/utils}/html_elements.py | 0
cmk/gui/{wato => plugins/wato/utils}/main_menu.py | 0
cmk/gui/wato/__init__.py | 10 +++++-----
cmk/gui/wato/pages/global_settings.py | 4 ++--
cmk/gui/wato/pages/groups.py | 2 +-
cmk/gui/wato/pages/sites.py | 2 +-
9 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/cmk/gui/plugins/wato/utils/__init__.py
b/cmk/gui/plugins/wato/utils/__init__.py
index 91457b3..e9f4fff 100644
--- a/cmk/gui/plugins/wato/utils/__init__.py
+++ b/cmk/gui/plugins/wato/utils/__init__.py
@@ -43,20 +43,20 @@ from cmk.gui.valuespec import (TextAscii, Dictionary, RadioChoice,
Tuple,
CascadingDropdown, ListChoice, ListOfStrings,
DualListChoice, ValueSpec)
-from cmk.gui.wato.base_modes import WatoMode
-from cmk.gui.wato.context_buttons import (
+from cmk.gui.plugins.wato.utils.base_modes import WatoMode
+from cmk.gui.plugins.wato.utils.context_buttons import (
global_buttons,
changelog_button,
home_button,
)
-from cmk.gui.wato.html_elements import (
+from cmk.gui.plugins.wato.utils.html_elements import (
wato_styles,
wato_confirm,
search_form,
)
-from cmk.gui.wato.main_menu import (
+from cmk.gui.plugins.wato.utils.main_menu import (
MainMenu,
MenuItem,
WatoModule,
diff --git a/cmk/gui/wato/base_modes.py b/cmk/gui/plugins/wato/utils/base_modes.py
similarity index 100%
rename from cmk/gui/wato/base_modes.py
rename to cmk/gui/plugins/wato/utils/base_modes.py
diff --git a/cmk/gui/wato/context_buttons.py
b/cmk/gui/plugins/wato/utils/context_buttons.py
similarity index 100%
rename from cmk/gui/wato/context_buttons.py
rename to cmk/gui/plugins/wato/utils/context_buttons.py
diff --git a/cmk/gui/wato/html_elements.py b/cmk/gui/plugins/wato/utils/html_elements.py
similarity index 100%
rename from cmk/gui/wato/html_elements.py
rename to cmk/gui/plugins/wato/utils/html_elements.py
diff --git a/cmk/gui/wato/main_menu.py b/cmk/gui/plugins/wato/utils/main_menu.py
similarity index 100%
rename from cmk/gui/wato/main_menu.py
rename to cmk/gui/plugins/wato/utils/main_menu.py
diff --git a/cmk/gui/wato/__init__.py b/cmk/gui/wato/__init__.py
index dda85e9..a01ab6d 100644
--- a/cmk/gui/wato/__init__.py
+++ b/cmk/gui/wato/__init__.py
@@ -120,7 +120,7 @@ import cmk.gui.gui_background_job as gui_background_job
import cmk.gui.i18n
import cmk.gui.pages
import cmk.gui.plugin_registry
-import cmk.gui.wato.base_modes
+import cmk.gui.plugins.wato.utils.base_modes
from cmk.gui.i18n import _u, _
from cmk.gui.globals import html
from cmk.gui.htmllib import HTML
@@ -131,7 +131,7 @@ from cmk.gui.valuespec import *
from cmk.gui.display_options import display_options
from cmk.gui.plugins.userdb.htpasswd import encrypt_password
-from cmk.gui.wato.base_modes import WatoMode, WatoWebApiMode
+from cmk.gui.plugins.wato.utils.base_modes import WatoMode, WatoWebApiMode
from cmk.gui.wato.pages.global_settings import GlobalSettingsMode, EditGlobalSettingMode
from cmk.gui.wato.pages.sites import ModeSites, ModeEditSite
from cmk.gui.wato.pages.password_store import ModePasswords, ModeEditPassword
@@ -232,7 +232,7 @@ from cmk.gui.watolib import (
modes = {}
-from .html_elements import (
+from cmk.gui.plugins.wato.utils.html_elements import (
wato_styles,
wato_confirm,
wato_html_head,
@@ -241,7 +241,7 @@ from .html_elements import (
search_form,
)
-from .context_buttons import (
+from cmk.gui.plugins.wato.utils.context_buttons import (
global_buttons,
changelog_button,
home_button,
@@ -250,7 +250,7 @@ from .context_buttons import (
folder_status_button,
)
-from cmk.gui.wato.main_menu import (
+from cmk.gui.plugins.wato.utils.main_menu import (
MainMenu,
MenuItem,
WatoModule,
diff --git a/cmk/gui/wato/pages/global_settings.py
b/cmk/gui/wato/pages/global_settings.py
index 6f61700..e3811ef 100644
--- a/cmk/gui/wato/pages/global_settings.py
+++ b/cmk/gui/wato/pages/global_settings.py
@@ -29,14 +29,14 @@ import abc
import cmk.gui.config as config
import cmk.gui.watolib as watolib
import cmk.gui.forms as forms
-from cmk.gui.wato.base_modes import WatoMode
+from cmk.gui.plugins.wato.utils.base_modes import WatoMode
from cmk.gui.i18n import _
from cmk.gui.globals import html
from cmk.gui.exceptions import MKGeneralException, MKAuthException
from cmk.gui.log import logger
from cmk.gui.htmllib import HTML
-from cmk.gui.wato.html_elements import (
+from cmk.gui.plugins.wato.utils.html_elements import (
search_form,
wato_confirm,
)
diff --git a/cmk/gui/wato/pages/groups.py b/cmk/gui/wato/pages/groups.py
index c241a78..bc28aaa 100644
--- a/cmk/gui/wato/pages/groups.py
+++ b/cmk/gui/wato/pages/groups.py
@@ -47,7 +47,7 @@ from cmk.gui.valuespec import (
TextAscii,
)
-from cmk.gui.wato.main_menu import (
+from cmk.gui.plugins.wato.utils.main_menu import (
MainMenu,
MenuItem,
)
diff --git a/cmk/gui/wato/pages/sites.py b/cmk/gui/wato/pages/sites.py
index f004492..20c03e1 100644
--- a/cmk/gui/wato/pages/sites.py
+++ b/cmk/gui/wato/pages/sites.py
@@ -37,7 +37,7 @@ from cmk.gui.globals import html
from cmk.gui.exceptions import MKUserError
from cmk.gui.log import logger
-from cmk.gui.wato.html_elements import (
+from cmk.gui.plugins.wato.utils.html_elements import (
wato_html_head,
wato_confirm,
)