Module: check_mk
Branch: master
Commit: 82c398bdfc1cb59144d222a6f891cb14af7f15b9
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=82c398bdfc1cb5…
Author: Konstantin Büttner <kb(a)mathias-kettner.de>
Date: Wed Sep 27 15:16:52 2017 +0200
df: Fix btrfs compatibility issue introduced in Werk #4806
Change-Id: I3bada28b8baef79c1848f7941663a36d9c5f76fe
---
checks/df | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/checks/df b/checks/df
index 905d0ae..9d4a62d 100644
--- a/checks/df
+++ b/checks/df
@@ -114,11 +114,13 @@ def parse_df(info):
if line[2] == "File" and line[3] == "System":
line = [ line[0], " ".join(line[1:4]) ] + line[4:]
+ # This particular bit of magic originated in Werk #2671 and has the purpose of avoiding duplicate checks,
+ # as btrfs filesystems are often mounted at multiple mountpoints. We keep it for compatibility.
if line[1] == "btrfs":
device = line[0]
if device not in btrfs_devices:
btrfs_devices.add(device)
- mountpoint = device
+ mountpoint = "btrfs " + device
else:
mountpoint = " ".join(line[6:]).replace('\\', '/') # Windows \ is replaced with /
Module: check_mk
Branch: master
Commit: ed014378ca2ae19e84f2fd321c2d9bbe575e5331
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ed014378ca2ae1…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Sep 27 13:39:07 2017 +0200
5213 Global settings can now be filtered to show only modified settings
To get a better view on the locally modified global settings it is now
possible to filter the list of global settings to show only the modified
ones.
This affects the following places:
<ul>
<li>global settings</li>
<li>site specific global settings</li>
<li>event console settings</li>
</ul>
When the filtering is enabled, each page only shows the settings that
have been modified on this page. E.g. the site specific global settings
page only shows modified settings that are set specific for this site.
Change-Id: I826d3139bd25195d4cf893db8379e9f7b686db59
---
.werks/5213 | 24 ++++++++++++++++++++++++
web/htdocs/wato.css | 4 +++-
web/htdocs/wato.py | 17 +++++++++++++++--
3 files changed, 42 insertions(+), 3 deletions(-)
diff --git a/.werks/5213 b/.werks/5213
new file mode 100644
index 0000000..f613ea9
--- /dev/null
+++ b/.werks/5213
@@ -0,0 +1,24 @@
+Title: Global settings can now be filtered to show only modified settings
+Level: 1
+Component: multisite
+Compatible: compat
+Edition: cre
+Version: 1.5.0i1
+Date: 1506512099
+Class: feature
+
+To get a better view on the locally modified global settings it is now
+possible to filter the list of global settings to show only the modified
+ones.
+
+This affects the following places:
+
+<ul>
+ <li>global settings</li>
+ <li>site specific global settings</li>
+ <li>event console settings</li>
+</ul>
+
+When the filtering is enabled, each page only shows the settings that
+have been modified on this page. E.g. the site specific global settings
+page only shows modified settings that are set specific for this site.
diff --git a/web/htdocs/wato.css b/web/htdocs/wato.css
index c8be8d7..17f6a4e 100644
--- a/web/htdocs/wato.css
+++ b/web/htdocs/wato.css
@@ -682,9 +682,11 @@ form#form_timeperiod td.vlof_content {
/* main menu */
-form.search {
+form.search, div.filter_buttons {
padding-top: 10px;
clear: both;
+ display: inline-block;
+ margin-bottom: 10px;
}
.wato div.mainmenu a {
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 9edd75f..6f84153 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -6730,6 +6730,7 @@ class ModeGlobalSettings(WatoMode):
def __init__(self):
super(ModeGlobalSettings, self).__init__()
self._search = None
+ self._show_only_modified = False
self._default_values = ConfigDomain.get_all_default_globals()
self._global_settings = {}
@@ -6740,6 +6741,7 @@ class ModeGlobalSettings(WatoMode):
def _from_vars(self):
self._search = get_search_expression()
+ self._show_only_modified = html.has_var("show_only_modified")
def _group_names(self, show_all=False):
@@ -6769,6 +6771,15 @@ class ModeGlobalSettings(WatoMode):
search_form(_("Search for settings:"))
search = self._search
+ html.open_div(class_="filter_buttons")
+ if self._show_only_modified:
+ html.buttonlink(html.makeuri([], delvars=["show_only_modified"]),
+ _("Show all settings"))
+ else:
+ html.buttonlink(html.makeuri([("show_only_modified", "1")]),
+ _("Show only modified settings"))
+ html.close_div()
+
at_least_one_painted = False
html.open_div(class_="globalvars")
for group_name in group_names:
@@ -6785,6 +6796,9 @@ class ModeGlobalSettings(WatoMode):
if not configvar_show_in_global_settings(varname):
continue
+ if self._show_only_modified and varname not in self._current_settings:
+ continue
+
help_text = valuespec.help() or ''
title_text = valuespec.title()
@@ -6798,7 +6812,7 @@ class ModeGlobalSettings(WatoMode):
if not header_is_painted:
# always open headers when searching
- forms.header(group_name, isopen=search)
+ forms.header(group_name, isopen=search or self._show_only_modified)
header_is_painted = True
default_value = self._default_values[varname]
@@ -12355,7 +12369,6 @@ def search_form(title=None, mode=None, default_value=""):
html.write_text(" ")
html.button("_do_seach", _("Search"))
html.end_form()
- html.br()
def get_search_expression():