Module: check_mk
Branch: master
Commit: 4c32dd7525a021f90bae13346727dcfa86b87ef2
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=4c32dd7525a021…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed Oct 8 09:59:42 2014 +0200
views: allow specifying limit when calling show_view()
---
web/htdocs/views.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/web/htdocs/views.py b/web/htdocs/views.py
index 7e276d6..ed7778d 100644
--- a/web/htdocs/views.py
+++ b/web/htdocs/views.py
@@ -845,7 +845,7 @@ def prepare_display_options():
# is about.
def show_view(view, show_heading = False, show_buttons = True,
show_footer = True, render_function = None, only_count=False,
- all_filters_active=False):
+ all_filters_active=False, limit=None):
if html.var("mode") == "availability" and
html.has_var("av_aggr_name") and html.var("timeline"):
bi.page_timeline()
return
@@ -899,9 +899,9 @@ def show_view(view, show_heading = False, show_buttons = True,
# the limit was not applied on the resulting rows but on the
# lines of the log processed. This resulted in wrong stats.
# For these datasources we ignore the query limits.
- limit = None
- if not datasource.get('ignore_limit', False):
- limit = get_limit()
+ if limit == None: # Otherwise: specified as argument
+ if not datasource.get('ignore_limit', False):
+ limit = get_limit()
# Fork to availability view. We just need the filter headers, since we do not query
the normal
# hosts and service table, but "statehist". This is *not* true for BI
availability, though (see later)