Module: check_mk
Branch: master
Commit: 1a96f46cce84416d30ddcee5381c7c6161996587
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=1a96f46cce8441…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Jul 7 09:55:17 2016 +0200
3664 FIX Fixed not working hardware/system serial and model painters and filters
If you already configured them in your views and they were not working, you will have
to remove them from your view and re-add them.
---
.werks/3664 …
[View More] | 11 +++++++++++
ChangeLog | 1 +
web/plugins/views/inventory.py | 5 +++++
3 files changed, 17 insertions(+)
diff --git a/.werks/3664 b/.werks/3664
new file mode 100644
index 0000000..2834b00
--- /dev/null
+++ b/.werks/3664
@@ -0,0 +1,11 @@
+Title: Fixed not working hardware/system serial and model painters and filters
+Level: 1
+Component: inv
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.4.0i1
+Date: 1467877979
+
+If you already configured them in your views and they were not working, you will have
+to remove them from your view and re-add them.
diff --git a/ChangeLog b/ChangeLog
index 71cb0f9..7c37f3c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -560,6 +560,7 @@
* 3526 FIX: Inventory scripts are no longer called when no data is available for their section...
* 3455 FIX: Fixed broken switch port filtering/sorting view
* 3663 FIX: Added missing system manufacturer filter/painter
+ * 3664 FIX: Fixed not working hardware/system serial and model painters and filters...
1.2.8b1:
diff --git a/web/plugins/views/inventory.py b/web/plugins/views/inventory.py
index 4e4f109..1d821a0 100644
--- a/web/plugins/views/inventory.py
+++ b/web/plugins/views/inventory.py
@@ -581,6 +581,11 @@ inventory_displayhints.update({
".hardware.system.product" : { "title" : _("Product") },
".hardware.system.serial" : { "title" : _("Serial Number") },
".hardware.system.model" : { "title" : _("Model Name") },
+
+ # Legacy ones. Kept to not break existing views - DON'T use these values for new plugins
+ ".hardware.system.serial_number" : { "title" : _("Serial Number - LEGACY, don't use") },
+ ".hardware.system.model_name" : { "title" : _("Model Name - LEGACY, don't use") },
+
".hardware.system.manufacturer" : { "title" : _("Manufacturer") },
".hardware.components." : { "title" : _("Physical Components") },
[View Less]
Module: check_mk
Branch: master
Commit: 84e7c1998e0895e90a7bfce11114c9395eb14d88
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=84e7c1998e0895…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Jul 6 12:45:16 2016 +0200
Fixed implementation of "see unrelated" permission checking in GUI
---
web/htdocs/views.py | 21 ++++++++++++++++++---
web/plugins/views/mkeventd.py | 21 +++++++++++++++++++--
2 files changed, 37 insertions(+), 5 …
[View More]deletions(-)
diff --git a/web/htdocs/views.py b/web/htdocs/views.py
index ad955ee..c5d70ca 100644
--- a/web/htdocs/views.py
+++ b/web/htdocs/views.py
@@ -1126,9 +1126,15 @@ def show_view(view, show_heading = False, show_buttons = True,
# tablename may be a function instead of a livestatus tablename
# In that case that function is used to compute the result.
+ # It may also be a tuple. In this case the first element is a function and the second element
+ # is a list of argument to hand over to the function together with all other arguments that
+ # are passed to query_data().
if type(tablename) == type(lambda x:None):
rows = tablename(columns, query, only_sites, limit, all_active_filters)
+ elif type(tablename) == tuple:
+ func, args = tablename
+ rows = func(datasource, columns, add_columns, query, only_sites, limit, *args)
else:
rows = query_data(datasource, columns, add_columns, query, only_sites, limit)
@@ -1664,8 +1670,10 @@ def ajax_count_button():
# add_headers: additional livestatus headers to add
# only_sites: list of sites the query is limited to
# limit: maximum number of data rows to query
-def query_data(datasource, columns, add_columns, add_headers, only_sites = [], limit = None):
- tablename = datasource["table"]
+def query_data(datasource, columns, add_columns, add_headers, only_sites = [], limit = None, tablename=None):
+ if tablename == None:
+ tablename = datasource["table"]
+
add_headers += datasource.get("add_headers", "")
merge_column = datasource.get("merge_by")
if merge_column:
@@ -1691,9 +1699,16 @@ def query_data(datasource, columns, add_columns, add_headers, only_sites = [], l
# Remove columns which are implicitely added by the datasource
columns = [ c for c in columns if c not in add_columns ]
query = "GET %s\n" % tablename
- return do_query_data(query, columns, add_columns, merge_column,
+ rows = do_query_data(query, columns, add_columns, merge_column,
add_headers, only_sites, limit, auth_domain)
+ # Datasource may have optional post processing function to filter out rows
+ post_process_func = datasource.get("post_process")
+ if post_process_func:
+ return post_process_func(rows)
+ else:
+ return rows
+
def do_query_data(query, columns, add_columns, merge_column,
add_headers, only_sites, limit, auth_domain):
diff --git a/web/plugins/views/mkeventd.py b/web/plugins/views/mkeventd.py
index c54f9b9..ffc2944 100644
--- a/web/plugins/views/mkeventd.py
+++ b/web/plugins/views/mkeventd.py
@@ -42,6 +42,23 @@ except:
# | |
# '----------------------------------------------------------------------'
+
+def query_ec_table(datasource, columns, add_columns, query, only_sites, limit, tablename):
+ if "event_contact_groups" not in columns:
+ columns.append("event_contact_groups")
+ if "host_contact_groups" not in columns:
+ columns.append("host_contact_groups")
+
+ rows = query_data(datasource, columns, add_columns, query, only_sites, limit,
+ tablename=tablename)
+
+ if config.may("mkeventd.seeunrelated"):
+ return rows # user is allowed to see all events returned by the core
+
+ return [ r for r in rows if r["event_contact_groups"] != [] or r["host_name"] != "" ]
+
+
+
# Declare datasource only if the event console is activated. We do
# not want to irritate users that do not know anything about the EC.
if mkeventd_enabled:
@@ -60,7 +77,7 @@ if mkeventd_enabled:
multisite_datasources["mkeventd_events"] = {
"title" : _("Event Console: Current Events"),
- "table" : "eventconsoleevents",
+ "table" : (query_ec_table, ["eventconsoleevents"]),
"auth_domain" : "ec",
"infos" : [ "event", "host" ],
"keys" : [],
@@ -70,7 +87,7 @@ if mkeventd_enabled:
multisite_datasources["mkeventd_history"] = {
"title" : _("Event Console: Event History"),
- "table" : "eventconsolehistory",
+ "table" : (query_ec_table, ["eventconsolehistory"]),
"auth_domain" : "ec",
"infos" : [ "history", "event", "host" ],
"keys" : [],
[View Less]
Module: check_mk
Branch: master
Commit: f523be54e9a5ff4f9cc2ff19ab9eb62edd84c12e
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=f523be54e9a5ff…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed Jul 6 11:44:37 2016 +0200
Updated bug entries #2498
---
.bugs/2498 | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/.bugs/2498 b/.bugs/2498
new file mode 100644
index 0000000..4f60f1f
--- /dev/null
+++ b/.bugs/2498
@@ -0,0 +1,13 @@
+Title: …
[View More]WATO-Snapshots should warn if data in local/ is too much
+Component: wato
+State: open
+Date: 2016-07-06 11:43:10
+Targetversion: 1.2.8
+Class: bug
+
+We had the case that a user pu approx 4GB of tmp data below local/.
+During "Activate Changes" WATO creates a snapshot of this. This
+took very long and lead to a Apache timeout (proxy error...).
+
+We need to validate the data in local/ somehow. Maybe make size
+limit? Or positively check all directories?
[View Less]