Module: check_mk
Branch: master
Commit: cffd55a2bb72b2e5159ba7f3fe1e13ed9145a55e
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=cffd55a2bb72b2…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Feb 18 14:35:39 2019 +0100
Cleanup module global state cmk.gui.plugins.views.utils.painter_options
The PainterOptions object deals with view (request) specific information
which should never be stored in module scope. As intermediate solution
we store the object in current_app.g["painter_options"].
A better solution would be to create a "view instance" object that holds
the painter options object as helper. This would need a bigger
restructuring of the views code, which we can not focus on at the
moment.
CMK-1626
Change-Id: I6edd86d7c798417c468b0bca5a5b883249ff9667
---
cmk/gui/mobile.py | 13 +++++++++----
cmk/gui/plugins/dashboard/view.py | 4 +++-
cmk/gui/plugins/views/__init__.py | 2 +-
cmk/gui/plugins/views/bi.py | 3 ++-
cmk/gui/plugins/views/inventory.py | 3 ++-
cmk/gui/plugins/views/layouts.py | 4 +++-
cmk/gui/plugins/views/mobile.py | 5 ++++-
cmk/gui/plugins/views/painters.py | 3 ++-
cmk/gui/plugins/views/utils.py | 21 ++++++++++++---------
cmk/gui/views.py | 22 ++++++++++++++--------
10 files changed, 52 insertions(+), 28 deletions(-)
Diff:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=cffd55a2bb…