Module: check_mk
Branch: master
Commit: c833b2edb1fc72625daf6c86411b34bda58f013c
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=c833b2edb1fc72…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Oct 10 13:38:46 2014 +0200
Approved fix
---
web/htdocs/views.py | 17 -----------------
1 file changed, 17 deletions(-)
diff --git a/web/htdocs/views.py b/web/htdocs/views.py
index d81eb5b..8ebe806 100644
--- a/web/htdocs/views.py
+++ b/web/htdocs/views.py
@@ -1975,23 +1975,6 @@ def link_to_view(content, row, view_name):
new_vars = filter_object.variable_settings(row)
vars += new_vars
- # FIXME: WDTCD (What Does This Contraption Do)?
- # Brauchen wir das hier? Aktuell macht das ein Problem: Wenn man in der View "allservices"
- # auf einen Gruppenkopf klickt - den Hostnamen, dann steckt in der Row der komplette Datensatz
- # zum ersten Service der Gruppe. Die new_vars erzeugen daraufhin einen Filter mit service_regex
- # mit dem ersten Service. In der Zielview bekommt man dann nur noch einen Service zu sehen,
- # und nicht alle von dem Host. Außerdem: VisualFilterList ist ein ValueSpec - zum Editieren
- # von Daten durch den Benutzer. Sollte das hier mißbraucht werden für ganz andere Zwecke?
- ## else:
- ## new_vars = visuals.VisualFilterList([info_key]).filter_variable_settings(view['context'], row)
- ## if "service_regex" in dict(new_vars):
- ## html.debug("VIEW-Titel", view["title"])
- ## html.debug('CONTEXT', view["context"])
- ## html.debug("NEW", new_vars)
- ## html.debug("row", row)
- ## raise 9
- ## vars += new_vars
-
do = html.var("display_options")
if do:
vars.append(("display_options", do))
Module: check_mk
Branch: master
Commit: eb726e2bbeda3ebabe82d950e2f16394a8fe342a
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=eb726e2bbeda3e…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Fri Oct 10 12:48:35 2014 +0200
Fix links to views in group headers
this comment removes some code that seems to
be useless.
---
web/htdocs/views.py | 24 ++++++++++++++++++++----
web/htdocs/visuals.py | 20 +++++++++++---------
2 files changed, 31 insertions(+), 13 deletions(-)
diff --git a/web/htdocs/views.py b/web/htdocs/views.py
index e0b6b0e..d81eb5b 100644
--- a/web/htdocs/views.py
+++ b/web/htdocs/views.py
@@ -1971,10 +1971,26 @@ def link_to_view(content, row, view_name):
for info_key in datasource['infos']:
if info_key in view['single_infos']:
for key in visuals.info_params(info_key):
- vars += visuals.get_filter(key).variable_settings(row)
-
- else:
- vars += visuals.VisualFilterList([info_key]).filter_variable_settings(view['context'], row)
+ filter_object = visuals.get_filter(key)
+ new_vars = filter_object.variable_settings(row)
+ vars += new_vars
+
+ # FIXME: WDTCD (What Does This Contraption Do)?
+ # Brauchen wir das hier? Aktuell macht das ein Problem: Wenn man in der View "allservices"
+ # auf einen Gruppenkopf klickt - den Hostnamen, dann steckt in der Row der komplette Datensatz
+ # zum ersten Service der Gruppe. Die new_vars erzeugen daraufhin einen Filter mit service_regex
+ # mit dem ersten Service. In der Zielview bekommt man dann nur noch einen Service zu sehen,
+ # und nicht alle von dem Host. Außerdem: VisualFilterList ist ein ValueSpec - zum Editieren
+ # von Daten durch den Benutzer. Sollte das hier mißbraucht werden für ganz andere Zwecke?
+ ## else:
+ ## new_vars = visuals.VisualFilterList([info_key]).filter_variable_settings(view['context'], row)
+ ## if "service_regex" in dict(new_vars):
+ ## html.debug("VIEW-Titel", view["title"])
+ ## html.debug('CONTEXT', view["context"])
+ ## html.debug("NEW", new_vars)
+ ## html.debug("row", row)
+ ## raise 9
+ ## vars += new_vars
do = html.var("display_options")
if do:
diff --git a/web/htdocs/visuals.py b/web/htdocs/visuals.py
index 1a2b118..1f76acd 100644
--- a/web/htdocs/visuals.py
+++ b/web/htdocs/visuals.py
@@ -1009,15 +1009,17 @@ class VisualFilterList(ListOfMultiple):
# get the filters to be used from the value and the data from the filter
# objects using the row data
- def filter_variable_settings(self, value, row):
- vars = []
- for fname in value.keys():
- try:
- vars += self._filters[fname].variable_settings(row)
- except KeyError:
- # When the row misses at least one var for a filter ignore this filter completely
- pass
- return vars
+ ## FIXME: This function does not deal with user input. It is just being
+ ## used for creating links to views. Why is it here?
+ ## def filter_variable_settings(self, value, row):
+ ## vars = []
+ ## for fname in value.keys():
+ ## try:
+ ## vars += self._filters[fname].variable_settings(row)
+ ## except KeyError:
+ ## # When the row misses at least one var for a filter ignore this filter completely
+ ## pass
+ ## return vars
# Realizes a Multisite/visual filter in a valuespec. It can render the filter form, get
# the filled in values and provide the filled in information for persistance.
Module: check_mk
Branch: master
Commit: e983bfcbb1b67d25f9fd2a06d59f59fd48c3a9ae
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=e983bfcbb1b67d…
Author: Goetz Golla <gg(a)mathias-kettner.de>
Date: Fri Oct 10 11:41:31 2014 +0200
FIX for case when disk is removed from the device, thanks to Marcel Schulte
---
checks/diskstat.include | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/checks/diskstat.include b/checks/diskstat.include
index a095b8a..6543833 100644
--- a/checks/diskstat.include
+++ b/checks/diskstat.include
@@ -234,7 +234,9 @@ def check_diskstat_generic(item, params, this_time, info, mode='sectors'):
result = check_diskstat_line(this_time, item, params, line, mode)
else:
result = (2, "more than one device found in cluster")
- return result
+
+ if result != "":
+ return result
return (3, "device missing")
Module: check_mk
Branch: master
Commit: 6856f5fcb4584feb1363ac1f95ac6d9b4ce378a5
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=6856f5fcb4584f…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Fri Oct 10 11:36:44 2014 +0200
#1125 FIX EC actions couldn't get saved when a EC rule had "Send monitoring notification" set
This lead to the warning<br>
<tt>You are missing the action with the ID @NOTIFY which is still used in some rules</tt>
---
.werks/1125 | 10 ++++++++++
ChangeLog | 1 +
mkeventd/web/plugins/wato/mkeventd.py | 2 +-
3 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/.werks/1125 b/.werks/1125
new file mode 100644
index 0000000..05e6dc2
--- /dev/null
+++ b/.werks/1125
@@ -0,0 +1,10 @@
+Title: EC actions couldn't get saved when a EC rule had "Send monitoring notification" set
+Level: 1
+Component: ec
+Compatible: compat
+Version: 1.2.5i6
+Date: 1412933594
+Class: fix
+
+This lead to the warning<br>
+<tt>You are missing the action with the ID @NOTIFY which is still used in some rules</tt>
diff --git a/ChangeLog b/ChangeLog
index b38b8cc..3e77fe0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -157,6 +157,7 @@
* 1399 FIX: Fix left-over tac processes when showing Event Console history...
* 1402 FIX: Fixed cased where counting events did not reach required count...
* 1124 FIX: WATO EC configuration: no longer raises an exception when user has restricted WATO access...
+ * 1125 FIX: EC actions couldn't get saved when a EC rule had "Send monitoring notification" set...
HW/SW-Inventory:
* 0643 windows inventory: OS now contains the install date, reg_uninstall now contains the path...
diff --git a/mkeventd/web/plugins/wato/mkeventd.py b/mkeventd/web/plugins/wato/mkeventd.py
index 6ea1e41..81304c4 100644
--- a/mkeventd/web/plugins/wato/mkeventd.py
+++ b/mkeventd/web/plugins/wato/mkeventd.py
@@ -88,7 +88,7 @@ class ActionList(ListOf):
rules = load_mkeventd_rules()
for rule in rules:
for action_id in rule.get("actions", []):
- if action_id not in action_ids:
+ if action_id not in action_ids + ["@NOTIFY"]:
raise MKUserError(varprefix, _("You are missing the action with the ID <b>%s</b>, "
"which is still used in some rules.") % action_id)
Module: check_mk
Branch: master
Commit: 9dcfe7b5bd842fd821b375664e03ac6f2faf2b9f
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=9dcfe7b5bd842f…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Thu Oct 9 16:38:57 2014 +0200
#1124 FIX WATO EC configuration: no longer raises an exception when user has restricted WATO access
An exception happened, when a user had restricted WATO permissions, but was allowed to edit the WATO EC configuration.
The following role settings caused this error:<br>
<br>
<tt>WATO - Check_MK's Web Administration Tool -> Read access to all modules.... -> No</tt><br>
and<br>
<tt>Event Console -> Configuration of event rules -> Yes</tt>
---
.werks/1124 | 14 ++++++++++++++
ChangeLog | 1 +
web/htdocs/wato.py | 4 +++-
3 files changed, 18 insertions(+), 1 deletion(-)
diff --git a/.werks/1124 b/.werks/1124
new file mode 100644
index 0000000..f27ae7c
--- /dev/null
+++ b/.werks/1124
@@ -0,0 +1,14 @@
+Title: WATO EC configuration: no longer raises an exception when user has restricted WATO access
+Level: 1
+Component: ec
+Compatible: compat
+Version: 1.2.5i6
+Date: 1412864930
+Class: fix
+
+An exception happened, when a user had restricted WATO permissions, but was allowed to edit the WATO EC configuration.
+The following role settings caused this error:<br>
+<br>
+<tt>WATO - Check_MK's Web Administration Tool -> Read access to all modules.... -> No</tt><br>
+and<br>
+<tt>Event Console -> Configuration of event rules -> Yes</tt>
diff --git a/ChangeLog b/ChangeLog
index 5bc5c41..b38b8cc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -156,6 +156,7 @@
* 1007 FIX: check_mkevents: fix case where events contain binary zeroes
* 1399 FIX: Fix left-over tac processes when showing Event Console history...
* 1402 FIX: Fixed cased where counting events did not reach required count...
+ * 1124 FIX: WATO EC configuration: no longer raises an exception when user has restricted WATO access...
HW/SW-Inventory:
* 0643 windows inventory: OS now contains the install date, reg_uninstall now contains the path...
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index a4cf757..b0fea5a 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -214,7 +214,9 @@ def page_handler():
# Check general permission for this mode
if modeperms != None and not config.may("wato.seeall"):
for pname in modeperms:
- config.need_permission("wato." + pname)
+ if '.' not in pname:
+ pname = "wato." + pname
+ config.need_permission(pname)
# Do actions (might switch mode)
action_message = None