Module: check_mk
Branch: master
Commit: a2c0d6be06e654ff7303eb577f4090ebbbd65191
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=a2c0d6be06e654…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Aug 23 12:22:36 2018 +0200
Use object for configured sidebar snapins during processing
* During runtime the configured sidebar snapins are represented
as UserSidebarSnapin() objects.
The persisted snapin config is now represented as dictionariy
instead of tuples. We could also persist it using the internal
classes. This would be something we need to decide in general
before starting with something like this here.
* Snapin visibility is now represented using SnapinVisibility enum.
* Cleaned up special case "off" for removing snapins instead of
toggling the visibility.
CMK-855
Change-Id: I39ca11073d58ce34f0eb2a8de3d09647c437f0c5
---
cmk/gui/sidebar.py | 165 ++++++++++++++++++++++++++++++-----------
tests/unit/web/test_sidebar.py | 80 +++++++++++---------
2 files changed, 165 insertions(+), 80 deletions(-)
Diff: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=a2c0d6be06…
Module: check_mk
Branch: master
Commit: 2ad3ec71258cadab31600594959f46025da61687
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=2ad3ec71258cad…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Aug 21 20:51:04 2018 +0200
Introduce UserSidebarConfig() for managing the users sidebar state
* Moved save_user_config / load_user_config to this class
* Wraps sidebar state now in internal dict that is exactly
the same as the previous data structure.
* Do not access htis new structure directly
* Access snapins through user_config.snapins
* Modifications to snapins have dedicated methods now:
* add_snapin()
* move_snapin_before()
* set_snapin_visibility()
* For folding control use
* is_folded
* fold()
* unfold()
* Use config.user.load_file() for sidebar config
CMK-855
Change-Id: I269d547bdc33beadaadc22224c0601ac5a95c5cb
---
cmk/gui/sidebar.py | 222 ++++++++++++++++++++++++++---------------
tests/unit/web/test_sidebar.py | 205 ++++++++++++++++++++++++++++---------
2 files changed, 299 insertions(+), 128 deletions(-)
Diff: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=2ad3ec7125…
Module: check_mk
Branch: master
Commit: 6a26d401bfcf689b75b638121928d3064192cbb2
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=6a26d401bfcf68…
Author: Tom Baerwinkel <tb(a)mathias-kettner.de>
Date: Wed Sep 5 10:46:09 2018 +0200
Make enum module available in the check_api and update module docstring
Change-Id: I2eaf7e105020c41a942525cd3a52e7459fd413d0
---
cmk_base/check_api.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/cmk_base/check_api.py b/cmk_base/check_api.py
index 28d3512..1bba202 100644
--- a/cmk_base/check_api.py
+++ b/cmk_base/check_api.py
@@ -29,13 +29,16 @@ The things in this module specify the official Check_MK check API. Meaning all
variables, functions etc. and default modules that are available to checks.
Modules available by default (pre imported by Check_MK):
+ collections
+ enum
fnmatch
math
re
socket
sys
+ os
time
-
+ pprint
Global variables:
from cmk.regex import regex
@@ -122,6 +125,7 @@ def get_check_api_context():
# TODO: Move imports directly to checks?
import collections
+import enum
import fnmatch
import math
import re