Module: check_mk
Branch: master
Commit: 9a210fa2e0497ce7068f10f8264a93b398318b34
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=9a210fa2e0497c…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed Apr 6 10:04:21 2016 +0200
3321 FIX Globes in dashboards now correctly reflect selected WATO folder
The bug was that they always showed the stats of all hosts, not just
of the selected folder (if you are using the {{Folders}} snapin).
---
.werks/3321 | 11 +++++++++++
ChangeLog | 1 +
web/htdocs/dashboard.py | 9 ++++++---
web/plugins/dashboard/dashlets.py | 9 +++++++--
4 files changed, 25 insertions(+), 5 deletions(-)
diff --git a/.werks/3321 b/.werks/3321
new file mode 100644
index 0000000..eccd641
--- /dev/null
+++ b/.werks/3321
@@ -0,0 +1,11 @@
+Title: Globes in dashboards now correctly reflect selected WATO folder
+Level: 2
+Component: multisite
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.9i1
+Date: 1459929807
+
+The bug was that they always showed the stats of all hosts, not just
+of the selected folder (if you are using the {{Folders}} snapin).
diff --git a/ChangeLog b/ChangeLog
index 256412a..24fa9f6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -166,6 +166,7 @@
* 3021 FIX: interface metrics: fixed broken interface metrics when using nagios core...
* 3360 FIX: Fixed different exceptions in predictive monitoring GUI
* 3320 FIX: Fix bogus interfering snapins Tree of folders and Folders...
+ * 3321 FIX: Globes in dashboards now correctly reflect selected WATO folder...
WATO:
* 3244 WATO BI Module: swap order of aggregation function and child node selection...
diff --git a/web/htdocs/dashboard.py b/web/htdocs/dashboard.py
index 06d5804..07be582 100644
--- a/web/htdocs/dashboard.py
+++ b/web/htdocs/dashboard.py
@@ -440,13 +440,14 @@ def dashlet_container_end():
html.write("</div>\n")
-def draw_dashlet_content(nr, the_dashlet, stash_html_vars=True):
+def draw_dashlet_content(nr, the_dashlet, wato_folder, stash_html_vars=True):
if stash_html_vars:
html.stash_vars()
html.del_all_vars()
try:
visuals.add_context_to_uri_vars(the_dashlet)
+ html.set_var("wato_folder", wato_folder)
dashlet_type = dashlet_types[the_dashlet['type']]
if 'iframe_render' in dashlet_type:
@@ -692,7 +693,7 @@ def draw_dashlet(name, board, nr, dashlet, wato_folder):
# The content is rendered only if it is fixed. In the
# other cases the initial (re)-size will paint the content.
if "render" in dashlet_type:
- draw_dashlet_content(nr, dashlet)
+ draw_dashlet_content(nr, dashlet, wato_folder)
elif "content" in dashlet: # fixed content
html.write(dashlet["content"])
@@ -762,7 +763,9 @@ def ajax_dashlet():
if the_dashlet['type'] not in dashlet_types:
raise MKGeneralException(_('The requested dashlet type does not exist.'))
- draw_dashlet_content(ident, the_dashlet, stash_html_vars=False)
+
+ wato_folder = html.var("wato_folder")
+ draw_dashlet_content(ident, the_dashlet, wato_folder, stash_html_vars=False)
#.
# .--Dashboard List------------------------------------------------------.
diff --git a/web/plugins/dashboard/dashlets.py b/web/plugins/dashboard/dashlets.py
index 28e548b..e21b7fe 100644
--- a/web/plugins/dashboard/dashlets.py
+++ b/web/plugins/dashboard/dashlets.py
@@ -214,8 +214,13 @@ def render_statistics(pie_id, what, table, filter, dashlet):
pie_left_aspect = 0.5
pie_right_aspect = 0.8
- info = what == 'hosts' and 'host' or 'service'
- use_filters = visuals.filters_of_visual(dashlet, [info])
+ if what == 'hosts':
+ info = 'host'
+ infos = [ info ]
+ else:
+ info = 'service'
+ infos = [ 'host', 'service' ]
+ use_filters = visuals.filters_of_visual(dashlet, infos)
for filt in use_filters:
if filt.available() and not isinstance(filt, visuals.FilterSite):
filter += filt.filter(info)
Module: check_mk
Branch: master
Commit: fbb73a4d855106febce2c5ddcb6e495247cf7d9f
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=fbb73a4d855106…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed Apr 6 09:50:53 2016 +0200
3320 FIX Fix bogus interfering snapins Tree of folders and Folders
If you have both snapins enabled than folding the tree in one
would affect the tree of the other. This has been fixed.
---
.werks/3320 | 11 +++++++++++
ChangeLog | 1 +
web/plugins/sidebar/wato.py | 27 ++++++++++++++++-----------
3 files changed, 28 insertions(+), 11 deletions(-)
diff --git a/.werks/3320 b/.werks/3320
new file mode 100644
index 0000000..7e46150
--- /dev/null
+++ b/.werks/3320
@@ -0,0 +1,11 @@
+Title: Fix bogus interfering snapins Tree of folders and Folders
+Level: 1
+Component: multisite
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.9i1
+Date: 1459928994
+
+If you have both snapins enabled than folding the tree in one
+would affect the tree of the other. This has been fixed.
diff --git a/ChangeLog b/ChangeLog
index 79b691b..256412a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -165,6 +165,7 @@
* 3355 FIX: Fixed possible broken HW-/SW-Inventory history view
* 3021 FIX: interface metrics: fixed broken interface metrics when using nagios core...
* 3360 FIX: Fixed different exceptions in predictive monitoring GUI
+ * 3320 FIX: Fix bogus interfering snapins Tree of folders and Folders...
WATO:
* 3244 WATO BI Module: swap order of aggregation function and child node selection...
diff --git a/web/plugins/sidebar/wato.py b/web/plugins/sidebar/wato.py
index b8b008d..74b2cf8 100644
--- a/web/plugins/sidebar/wato.py
+++ b/web/plugins/sidebar/wato.py
@@ -184,25 +184,28 @@ def compute_foldertree():
return user_folders
-def render_tree_folder(f, js_func):
- subfolders = f.get(".folders", {}).values()
+# Note: the dictionary that represents the folder here is *not*
+# the datastructure from WATO but a result of compute_foldertree(). The reason:
+# We fetch the information via livestatus - not from WATO.
+def render_tree_folder(tree_id, folder, js_func):
+ subfolders = folder.get(".folders", {}).values()
subfolders.sort(cmp = lambda f1, f2: cmp(f1["title"].lower(), f2["title"].lower()))
is_leaf = len(subfolders) == 0
# Suppress indentation for non-emtpy root folder
- if f['.path'] == '' and is_leaf:
+ if folder['.path'] == '' and is_leaf:
html.write("<ul>") # empty root folder
- elif f and f['.path'] != '':
+ elif folder and folder['.path'] != '':
html.write("<ul style='padding-left: 0px;'>")
title = '<a class="link" href="#" onclick="%s(this, \'%s\');">%s (%d)</a>' % (
- js_func, f[".path"], html.attrencode(f["title"]), f[".num_hosts"])
+ js_func, folder[".path"], html.attrencode(folder["title"]), folder[".num_hosts"])
if not is_leaf:
- html.begin_foldable_container('wato-hosts', "/" + f[".path"], False, HTML(title))
+ html.begin_foldable_container(tree_id, "/" + folder[".path"], False, HTML(title))
for subfolder in subfolders:
- render_tree_folder(subfolder, js_func)
+ render_tree_folder(tree_id, subfolder, js_func)
html.end_foldable_container()
else:
html.write("<li>" + title + "</li>")
@@ -263,12 +266,14 @@ def render_wato_foldertree():
# Now render the whole tree
if user_folders:
- render_tree_folder(user_folders.values()[0], 'wato_tree_click')
+ render_tree_folder("wato-hosts", user_folders.values()[0], 'wato_tree_click')
sidebar_snapins['wato_foldertree'] = {
- 'title' : _('Tree of Folders'),
- 'description' : _('This snapin shows the folders defined in WATO. It can be used to open views filtered by the WATO folder. It works standalone, without interaction with any other snapin.'),
+ 'title' : _('Tree of folders'),
+ 'description' : _('This snapin shows the folders defined in WATO. It can be used to '
+ 'open views filtered by the WATO folder. It works standalone, without '
+ 'interaction with any other snapin.'),
'render' : render_wato_foldertree,
'allowed' : [ 'admin', 'user', 'guest' ],
'styles' : """
@@ -299,7 +304,7 @@ def render_wato_folders():
user_folders = compute_foldertree()
if user_folders:
- render_tree_folder(user_folders.values()[0], 'wato_folders_clicked')
+ render_tree_folder("wato-folders", user_folders.values()[0], 'wato_folders_clicked')
sidebar_snapins['wato_folders'] = {
'title' : _('Folders'),
Module: check_mk
Branch: master
Commit: ef09824efa32c03d2db723b0b4c0939dcaf2f1b3
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ef09824efa32c0…
Author: Sebastian Herbord <sh(a)mathias-kettner.de>
Date: Tue Apr 5 17:32:56 2016 +0200
3114 linux and windows agent can now be configured to directly encrypt their output. For real-time updates encryption is now optional (but active per default)
This feature can be configured through Host&Service Parameters -> Access to agents -> Encryption.
When "Encryption for Agents" is set to "enforce" or "enable", two things will happen:
a) Baked windows or linux agents will be configured to encrypt their output
b) check_mk will be configured to try to decrypt output from agents. In case of "enable" it will
also accept unencrypted output, in case of "enforce" it won't.
This change also affects real-time updates as these were already encrypted.
The passphrase configured for real-time updates will now only serve as a default, agents with
"Encryption" configured will use the same passphrase for rt and regular updates.
Finally, it is now also possible to configure real-time updates to be unencrypted.
All encryption happens with AES using 256bit keys and cbc.
The above is completely optional, the default behaviour for everything (including real-time updates)
is compatible with previous versions.
---
.werks/3114 | 23 +++++
ChangeLog | 1 +
agents/check_mk_agent.linux | 28 ++++++-
agents/windows/Configuration.cc | 13 ++-
agents/windows/Configuration.h | 8 +-
agents/windows/OutputProxy.cc | 20 +++--
agents/windows/OutputProxy.h | 8 +-
agents/windows/build_version | 2 +-
agents/windows/check_mk.example.ini | 9 +-
agents/windows/check_mk_agent-64.exe | Bin 939520 -> 939520 bytes
agents/windows/check_mk_agent-64.unversioned.exe | Bin 939520 -> 939520 bytes
agents/windows/check_mk_agent.cc | 97 ++++++++++++----------
agents/windows/check_mk_agent.exe | Bin 866304 -> 867328 bytes
agents/windows/check_mk_agent.msi | Bin 2067456 -> 2068480 bytes
agents/windows/check_mk_agent.unversioned.exe | Bin 866304 -> 867328 bytes
agents/windows/install_agent-64.exe | Bin 431102 -> 431298 bytes
agents/windows/install_agent.exe | Bin 421747 -> 422023 bytes
modules/check_mk.py | 8 ++
modules/check_mk_base.py | 40 +++++++++
modules/config.py | 1 +
web/htdocs/images/button_showhide.png | Bin 0 -> 3885 bytes
web/htdocs/js/checkmk.js | 11 +++
web/htdocs/valuespec.py | 18 +++-
web/plugins/wato/check_mk_configuration.py | 36 ++++++++
24 files changed, 249 insertions(+), 74 deletions(-)
Diff: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=ef09824efa…