Module: check_mk
Branch: master
Commit: c13bf40f36414b96dc2f590550ec61ccbe45df2a
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=c13bf40f36414b…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed May 4 13:14:15 2011 +0200
FIX: Display limit-exceeded message also in multi site setups
---
ChangeLog | 1 +
web/htdocs/htmllib.py | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index d672a6a..5a56adc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -22,6 +22,7 @@
* find configuration file in subdirectories of conf.d also
Multisite:
+ * FIX: Display limit-exceeded message also in multi site setups
* FIX: Tactical Overview: fix unhandled host problems view
* FIX: customlinks snapin: Suppressing exception when no links configured
* FIX: webservice: suppress livestatus errors in multi-site setups
diff --git a/web/htdocs/htmllib.py b/web/htdocs/htmllib.py
index 26ee4f2..801dc80 100644
--- a/web/htdocs/htmllib.py
+++ b/web/htdocs/htmllib.py
@@ -500,14 +500,14 @@ class html:
def check_limit(self, rows, limit):
count = len(rows)
- if limit != None and count == limit + 1:
+ if limit != None and count >= limit + 1:
text = "Your query produced more then %d results. " % limit
if self.var("limit", "soft") == "soft" and
config.may("ignore_soft_limit"):
text += '<a href="%s">Repeat query and allow more
results.</a>' % self.makeuri([("limit", "hard")])
elif self.var("limit") == "hard" and
config.may("ignore_hard_limit"):
text += '<a href="%s">Repeat query without
limit.</a>' % self.makeuri([("limit", "none")])
self.show_warning(text)
- del rows[-1]
+ del rows[limit:]
return False
return True