Module: check_mk
Branch: master
Commit: c74ba91d47b000fe42923bc11e05f1aa50592505
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=c74ba91d47b000…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Sat Aug 19 20:44:41 2017 +0200
Improved separation of watolib and wato
The wato.py was importing all things of the watolib.py via star import to it's
own namespace. With the later plugin loading mechanism confusions (and bugs)
could occur easily because there are not only functions and classes, but also
data structures loaded from watolib.py.
The current idea of these both modules is now:
- wato: Implementation of WATO pages (the views you can open in browser) and
registration of things to configure via plugins
(rulesets, global settings, ...).
- watolib: Implementation of the logic and data structures. Plugins for the
watolib extend the internal functionality of WATO.
The watolib module is allowed to be imported from the whole GUI code.
The wato module should only be imported for accessing the pages.
The thing that has been changed now is that the star import has been
removed and all references from wato to watolib has been made explicit.
Most wato plugins should be compatible with this change. Plugins that
are doing more than just registering some configuration options may miss
some variables / methods that were available before. This can mostly be
solved by specifying the module name <tt>watolib.</tt> before the name.
Change-Id: I95e8530c36293ca3916e538a576e1981fcc1f33e
---
web/htdocs/notifications.py | 2 +-
web/htdocs/userdb.py | 8 +-
web/htdocs/wato.py | 1375 ++++++++++++----------------
web/htdocs/watolib.py | 237 ++++-
web/plugins/pages/wato.py | 3 +-
web/plugins/sidebar/shipped.py | 5 +-
web/plugins/sidebar/wato.py | 9 +-
web/plugins/userdb/hook_auth.py | 5 +-
web/plugins/userdb/ldap.py | 12 +-
web/plugins/views/wato.py | 5 +-
web/plugins/visuals/wato.py | 6 +-
web/plugins/wato/backup_domains.py | 2 +-
web/plugins/wato/bi.py | 14 +-
web/plugins/wato/builtin_attributes.py | 2 +-
web/plugins/wato/check_mk_configuration.py | 10 +-
web/plugins/wato/datasource_programs.py | 26 +-
web/plugins/wato/mkeventd.py | 14 +-
web/plugins/wato/omd_configuration.py | 14 +-
18 files changed, 914 insertions(+), 835 deletions(-)
Diff:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=c74ba91d47…