Module: check_mk
Branch: master
Commit: d82b0c77c90243b4ce411af61096efebf7a6ffcf
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d82b0c77c90243…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu Oct 9 14:36:12 2014 +0200
Added time filter information to datasources
---
mkeventd/web/plugins/views/mkeventd.py | 2 ++
web/plugins/views/datasources.py | 4 ++++
web/plugins/visuals/filters.py | 6 ------
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/mkeventd/web/plugins/views/mkeventd.py
b/mkeventd/web/plugins/views/mkeventd.py
index 71d6e3d..d8cd4bc 100644
--- a/mkeventd/web/plugins/views/mkeventd.py
+++ b/mkeventd/web/plugins/views/mkeventd.py
@@ -284,6 +284,7 @@ if mkeventd_enabled:
"infos" : [ "event", "host" ],
"keys" : [],
"idkeys" : [ 'site', 'host_name',
'event_id' ],
+ "time_filters" : [ "event_first" ],
}
multisite_datasources["mkeventd_history"] = {
@@ -292,6 +293,7 @@ if mkeventd_enabled:
"infos" : [ "history", "event",
"host" ],
"keys" : [],
"idkeys" : [ 'site', 'host_name',
'event_id', 'history_line' ],
+ "time_filters" : [ "history_time" ],
}
diff --git a/web/plugins/views/datasources.py b/web/plugins/views/datasources.py
index 88b5a4a..61e85ff 100644
--- a/web/plugins/views/datasources.py
+++ b/web/plugins/views/datasources.py
@@ -174,6 +174,7 @@ multisite_datasources["log"] = {
"infos" : [ "log", "host", "service",
"contact", "command" ],
"keys" : [],
"idkeys" : [ "log_lineno" ],
+ "time_filters" : [ "logtime" ],
}
multisite_datasources["log_events"] = {
@@ -183,6 +184,7 @@ multisite_datasources["log_events"] = {
"infos" : [ "log", "host", "service"
],
"keys" : [],
"idkeys" : [ "log_lineno" ],
+ "time_filters" : [ "logtime" ],
}
multisite_datasources["log_host_events"] = {
@@ -192,6 +194,7 @@ multisite_datasources["log_host_events"] = {
"infos" : [ "log", "host" ],
"keys" : [],
"idkeys" : [ "log_lineno" ],
+ "time_filters" : [ "logtime" ],
}
multisite_datasources["alert_stats"] = {
@@ -203,4 +206,5 @@ multisite_datasources["alert_stats"] = {
"keys" : [],
"idkeys" : [ 'host_name', 'service_description' ],
"ignore_limit" : True,
+ "time_filters" : [ "logtime" ],
}
diff --git a/web/plugins/visuals/filters.py b/web/plugins/visuals/filters.py
index e63c225..a006712 100644
--- a/web/plugins/visuals/filters.py
+++ b/web/plugins/visuals/filters.py
@@ -536,12 +536,6 @@ declare_filter(234, FilterNumberRange("host_num_services",
_("Number of Services
# Filter for setting time ranges, e.g. on last_state_change and last_check
-# Variante eins:
-# age [ ] seconds [ ] minutes [ ] hours [ ] days
-# Variante zwei: (not implemented)
-# since [2010-01-02] [00:00:00]
-# Variante drei: (not implemented)
-# from [2010-01-02] [00:00:00] until [2010-01-02] [00:00:00]
class FilterTime(Filter):
def __init__(self, info, name, title, column):
self.column = column