Branch: refs/heads/master
Home:
https://github.com/tribe29/checkmk
Commit: 5d281d543edcf61e4097fb2e35a4fa59c0cacbfb
https://github.com/tribe29/checkmk/commit/5d281d543edcf61e4097fb2e35a4fa59c…
Author: Lars Michelsen <lm(a)tribe29.com>
Date: 2021-07-20 (Tue, 20 Jul 2021)
Changed paths:
M cmk/gui/config.py
M cmk/gui/globals.py
M cmk/gui/livestatus_utils/testing.py
M cmk/gui/plugins/config/base.py
M cmk/gui/utils/script_helpers.py
M cmk/gui/watolib/search.py
M cmk/gui/wsgi/applications/checkmk.py
M cmk/gui/wsgi/middleware.py
M tests/unit/cmk/utils/livestatus_helpers/conftest.py
Log Message:
-----------
Introduce config.Config object
Previously the module namespace `cmk.gui.config` was used for holding the
GUI configuration during runtime. This is obviously error prone, bad for
testability and not thread safe.
This change introduces the `config.Config` object which will hold the
GUI configuration during runtime in the future.
For each request context we start with an empty `Config` object for now.
It holds only the factory settings. Once the config is loaded during
request processing, which is done by `config.initialize()`, at the
moment, the configuration will be accessible through
`cmk.gui.globals.config` which is a request local proxy object.
The `Config` classes attributes are defined by the builtin config
plugins from the different editions, which will be `CREConfig`,
`CEEConfig` and `CMEConfig`. Using the dataclasses allows us to have
code completion and type checked access to config variables, at least
for the builtin config variables.
For now the new config object is initialized and populated. Next steps:
* Add CME and CEE specific options
* Refactor all call sites to use the config object
* Drop the old structures which are currently needed for compatibility
* Rename "_" prefixed definitions in config plugins
* Improve config option type hints
Change-Id: Ic96e9b71f83208333d54f297aea45bde41bd24dc
Commit: cd355a3c14c21b78686addc0524bddc492b2419b
https://github.com/tribe29/checkmk/commit/cd355a3c14c21b78686addc0524bddc49…
Author: Lars Michelsen <lm(a)tribe29.com>
Date: 2021-07-20 (Tue, 20 Jul 2021)
Changed paths:
M cmk/gui/config.py
M cmk/gui/plugins/config/base.py
M tests/unit/cmk/gui/test_gui_config.py
Log Message:
-----------
Extend config.Config capabilities
* Make CEEConfig and CMEConfig available
* Enable config tests for new structure
* Add missing basic type hints for config options in C*EConfig
(Needed to make them visible as dataclass fields)
Change-Id: Ia94b5bdf66dfab5beae73f61e799949740386c51
Commit: e52f58f93e4904b77bec41841767839ba6b6f087
https://github.com/tribe29/checkmk/commit/e52f58f93e4904b77bec41841767839ba…
Author: Lars Michelsen <lm(a)tribe29.com>
Date: 2021-07-20 (Tue, 20 Jul 2021)
Changed paths:
M cmk/gui/bi.py
M cmk/gui/config.py
M cmk/gui/crash_reporting.py
M cmk/gui/dashboard.py
M cmk/gui/hooks.py
M cmk/gui/htmllib/__init__.py
M cmk/gui/inventory.py
M cmk/gui/login.py
M cmk/gui/logwatch.py
M cmk/gui/main.py
M cmk/gui/mkeventd.py
M cmk/gui/mobile.py
M cmk/gui/node_vis_lib.py
M cmk/gui/node_visualization.py
M cmk/gui/notifications.py
M cmk/gui/notify.py
M cmk/gui/pages.py
M cmk/gui/plugins/config/base.py
M cmk/gui/plugins/dashboard/utils.py
M cmk/gui/plugins/metrics/graph_images.py
M cmk/gui/plugins/metrics/html_render.py
M cmk/gui/plugins/metrics/utils.py
M cmk/gui/plugins/openapi/restful_objects/constructors.py
M cmk/gui/plugins/openapi/restful_objects/decorators.py
M cmk/gui/plugins/sidebar/custom_links.py
M cmk/gui/plugins/sidebar/dashboards.py
M cmk/gui/plugins/sidebar/main_menu.py
M cmk/gui/plugins/sidebar/search.py
M cmk/gui/plugins/sidebar/tactical_overview.py
M cmk/gui/plugins/sidebar/views.py
M cmk/gui/plugins/sidebar/virtual_host_tree.py
M cmk/gui/plugins/sidebar/wato.py
M cmk/gui/plugins/userdb/ldap_connector.py
M cmk/gui/plugins/userdb/utils.py
M cmk/gui/plugins/views/commands.py
M cmk/gui/plugins/views/graphs.py
M cmk/gui/plugins/views/icons/__init__.py
M cmk/gui/plugins/views/icons/builtin.py
M cmk/gui/plugins/views/icons/mkeventd.py
M cmk/gui/plugins/views/icons/utils.py
M cmk/gui/plugins/views/icons/wato.py
M cmk/gui/plugins/views/inventory.py
M cmk/gui/plugins/views/layouts.py
M cmk/gui/plugins/views/mkeventd.py
M cmk/gui/plugins/views/painters.py
M cmk/gui/plugins/views/perfometer.py
M cmk/gui/plugins/views/sorters.py
M cmk/gui/plugins/views/utils.py
M cmk/gui/plugins/visuals/filters.py
M cmk/gui/plugins/visuals/wato.py
M cmk/gui/plugins/wato/bi_config.py
M cmk/gui/plugins/wato/check_mk_configuration.py
M cmk/gui/plugins/wato/graphs.py
M cmk/gui/plugins/wato/utils/__init__.py
M cmk/gui/plugins/webapi/bulk_discovery.py
M cmk/gui/plugins/webapi/utils.py
M cmk/gui/plugins/webapi/webapi.py
M cmk/gui/sidebar.py
M cmk/gui/sites.py
M cmk/gui/table.py
M cmk/gui/userdb.py
M cmk/gui/utils/logged_in.py
M cmk/gui/utils/ntop.py
M cmk/gui/utils/roles.py
M cmk/gui/valuespec.py
M cmk/gui/views.py
M cmk/gui/visuals.py
M cmk/gui/wato/__init__.py
M cmk/gui/wato/mkeventd.py
M cmk/gui/wato/page_handler.py
M cmk/gui/wato/pages/activate_changes.py
M cmk/gui/wato/pages/automation.py
M cmk/gui/wato/pages/bulk_discovery.py
M cmk/gui/wato/pages/bulk_import.py
M cmk/gui/wato/pages/custom_attributes.py
M cmk/gui/wato/pages/folders.py
M cmk/gui/wato/pages/global_settings.py
M cmk/gui/wato/pages/icons.py
M cmk/gui/wato/pages/ldap.py
M cmk/gui/wato/pages/notifications.py
M cmk/gui/wato/pages/object_parameters.py
M cmk/gui/wato/pages/parentscan.py
M cmk/gui/wato/pages/read_only.py
M cmk/gui/wato/pages/roles.py
M cmk/gui/wato/pages/rulesets.py
M cmk/gui/wato/pages/services.py
M cmk/gui/wato/pages/sites.py
M cmk/gui/wato/pages/tags.py
M cmk/gui/wato/pages/timeperiods.py
M cmk/gui/wato/pages/users.py
M cmk/gui/wato/user_profile.py
M cmk/gui/watolib/__init__.py
M cmk/gui/watolib/activate_changes.py
M cmk/gui/watolib/auth_php.py
M cmk/gui/watolib/automations.py
M cmk/gui/watolib/changes.py
M cmk/gui/watolib/config_domains.py
M cmk/gui/watolib/host_attributes.py
M cmk/gui/watolib/hosts_and_folders.py
M cmk/gui/watolib/notifications.py
M cmk/gui/watolib/read_only.py
M cmk/gui/watolib/rulesets.py
M cmk/gui/watolib/sample_config.py
M cmk/gui/watolib/search.py
M cmk/gui/watolib/services.py
M cmk/gui/watolib/sites.py
M cmk/gui/watolib/snapshots.py
M cmk/gui/watolib/tags.py
M cmk/gui/watolib/timeperiods.py
M cmk/gui/watolib/user_profile.py
M cmk/gui/watolib/users.py
M cmk/gui/watolib/utils.py
M cmk/gui/webapi.py
M cmk/gui/wsgi/applications/checkmk.py
M cmk/utils/bi/bi_legacy_config_converter.py
M tests/unit/cmk/gui/conftest.py
M tests/unit/cmk/gui/plugins/metrics/test_metrics_utils.py
M tests/unit/cmk/gui/plugins/views/test_views_inventory.py
M tests/unit/cmk/gui/plugins/visuals/test_filters.py
M tests/unit/cmk/gui/plugins/wato/test_check_mk_configuration.py
M tests/unit/cmk/gui/test_dashboard.py
M tests/unit/cmk/gui/test_gui_config.py
M tests/unit/cmk/gui/test_gui_hooks.py
M tests/unit/cmk/gui/test_index.py
M tests/unit/cmk/gui/test_login_unit.py
M tests/unit/cmk/gui/test_sidebar.py
M tests/unit/cmk/gui/test_sites.py
M tests/unit/cmk/gui/test_userdb.py
M tests/unit/cmk/gui/test_valuespec.py
M tests/unit/cmk/gui/test_views.py
M tests/unit/cmk/gui/utils/test_logged_in.py
M tests/unit/cmk/gui/utils/test_ntop.py
M tests/unit/cmk/gui/utils/test_theme.py
M tests/unit/cmk/gui/utils/test_transaction_manager.py
M tests/unit/cmk/gui/wato/pages/test_rulesets.py
M tests/unit/cmk/gui/watolib/test_changes.py
M tests/unit/cmk/gui/watolib/test_config_sync.py
M tests/unit/cmk/gui/watolib/test_gui_rulesets.py
M tests/unit/cmk/gui/wsgi/test_wsgi_router.py
M tests/unit/cmk/test_update_config.py
M tests/unit/cmk/utils/bi/test_bi_legacy_config_converter.py
M tests/unit/livestatus/test_livestatus_unit.py
Log Message:
-----------
Refactor GUI config access to request global object
* Move all accesses to config settings from cmk.gui.config.*
to the request global cmk.gui.globals.config.*.
* Remove all settings from the cmk.gui.config module scope
* Since the config is now accessible from the request context,
a lot of tests now need to use the register_builtin_html fixture
which nowadays creates the application an request context.
(It will be renamed soon).
Change-Id: I88090ad3e01d687d1402e858307fc09b136de43c
Commit: 6702912ffa614dc26fba61974f1b11745f1d3758
https://github.com/tribe29/checkmk/commit/6702912ffa614dc26fba61974f1b11745…
Author: Lars Michelsen <lm(a)tribe29.com>
Date: 2021-07-20 (Tue, 20 Jul 2021)
Changed paths:
M cmk/gui/plugins/config/base.py
Log Message:
-----------
Cleanup underscore hacks from config plugins
Change-Id: Ie3e8fdecc97741707680d527542e55902ba47110
Commit: 1dcf7f1426528499b7e50d1cecc488d0a467420b
https://github.com/tribe29/checkmk/commit/1dcf7f1426528499b7e50d1cecc488d0a…
Author: Lars Michelsen <lm(a)tribe29.com>
Date: 2021-07-20 (Tue, 20 Jul 2021)
Changed paths:
M tests/unit/cmk/gui/conftest.py
M tests/unit/cmk/gui/htmllib/test_foldable_container.py
M tests/unit/cmk/gui/htmllib/test_html_cls.py
M tests/unit/cmk/gui/plugins/metrics/test_metrics_utils.py
M tests/unit/cmk/gui/plugins/openapi/test_openapi_folder_config.py
M tests/unit/cmk/gui/plugins/sidebar/test_wato.py
M tests/unit/cmk/gui/plugins/views/icons/test_icon_mkeventd.py
M tests/unit/cmk/gui/plugins/views/test_painters.py
M tests/unit/cmk/gui/plugins/views/test_row_table.py
M tests/unit/cmk/gui/plugins/views/test_views_inventory.py
M tests/unit/cmk/gui/plugins/visuals/test_filters.py
M tests/unit/cmk/gui/plugins/wato/test_check_mk_configuration.py
M tests/unit/cmk/gui/test_background_job.py
M tests/unit/cmk/gui/test_backup_unit.py
M tests/unit/cmk/gui/test_dashboard.py
M tests/unit/cmk/gui/test_gui_crash_reporting.py
M tests/unit/cmk/gui/test_gui_hooks.py
M tests/unit/cmk/gui/test_http.py
M tests/unit/cmk/gui/test_index.py
M tests/unit/cmk/gui/test_page_menu.py
M tests/unit/cmk/gui/test_sidebar.py
M tests/unit/cmk/gui/test_table.py
M tests/unit/cmk/gui/test_userdb.py
M tests/unit/cmk/gui/test_userdb_ldap_connector.py
M tests/unit/cmk/gui/test_valuespec.py
M tests/unit/cmk/gui/test_views.py
M tests/unit/cmk/gui/test_visuals.py
M tests/unit/cmk/gui/test_watolib_hosts_and_folders.py
M tests/unit/cmk/gui/utils/test_logged_in.py
M tests/unit/cmk/gui/utils/test_theme.py
M tests/unit/cmk/gui/utils/test_transaction_manager.py
M tests/unit/cmk/gui/utils/test_user_errors.py
M tests/unit/cmk/gui/wato/pages/test_rulesets.py
M tests/unit/cmk/gui/watolib/test_changes.py
M tests/unit/cmk/gui/watolib/test_config_sync.py
M tests/unit/cmk/gui/watolib/test_gui_rulesets.py
M tests/unit/cmk/gui/watolib/test_hosts_and_folders.py
Log Message:
-----------
Rename register_builtin_html fixture to request_context
Because this is what the fixture is providing now.
Change-Id: Icc9a688463f24425a3659e1093b998372a94f6e5
Compare:
https://github.com/tribe29/checkmk/compare/cfa453e6188c...1dcf7f142652