Module: check_mk
Branch: master
Commit: 2a283cddc1679bddcfa81a00c7a479fcf61cbfee
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=2a283cddc1679b…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Oct 2 14:10:56 2014 +0200
Refactored visual code again
The "context_type"-concept was not fitting all needs, for example
a single host visual showing multiple services could not be filtered
by details of the services. We decided to recode this feature again
to slightly simplify the mechanism again and make all features usable
again.
To the users which already used the dasboard designer or created custom
views with the git builds since introducion of the "context type"
feature will need to perform some migrations by hand.
You will either need to remove all your custom views and dashboards
from var/check_mk/web/*/user_dashboards.mk and
var/check_mk/web/*/user_views.mk. Or you try to migrate the defined
views and dashboards in this file. For this you will need to remove
the attribute "context_type" from views and dashboards and replace
it with the new "single_infos" attribute.
The "single_infos" attribute contains a list of strings which each
references a info type which should be identified by specific attributes
like the hostname to get a single object of that type.
For example replace the definition "context_type": "host" with
"single_infos": ['host'] in case of e.g. a view which only shows data
about one single host.
---
mkeventd/web/plugins/views/mkeventd.py | 2 -
mkeventd/web/plugins/visuals/mkeventd.py | 30 +---
web/htdocs/dashboard.py | 122 ++++++-------
web/htdocs/valuespec.py | 9 +-
web/htdocs/views.py | 289 +++++++++++++-----------------
web/htdocs/visuals.py | 173 ++++++++++++------
web/plugins/dashboard/builtin.py | 16 +-
web/plugins/dashboard/dashlets.py | 2 +-
web/plugins/pages/shipped.py | 4 +-
web/plugins/views/bi.py | 3 -
web/plugins/views/datasources.py | 24 ---
web/plugins/views/inventory.py | 1 -
web/plugins/visuals/context_types.py | 210 ----------------------
web/plugins/visuals/infos.py | 116 ++++++++++++
14 files changed, 431 insertions(+), 570 deletions(-)
Diff:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=2a283cddc1…