Module: check_mk
Branch: master
Commit: bef81a57d7bf4e94108eb3e4d4134c2a788fd0c3
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=bef81a57d7bf4e…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Sep 5 13:04:03 2011 +0200
Top buttons recognizing search filter now
---
web/htdocs/wato.py | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 2fef9db..09342b9 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -655,7 +655,8 @@ def mode_file(phase):
# a folder information but not yet moved to that folder). If at least
# one host has a target folder, then we show an additional bulk action.
at_least_one_imported = False
- for hostname in hostnames:
+ more_than_ten_items = False
+ for num, hostname in enumerate(hostnames):
if search_text and (search_text.lower() not in hostname.lower()):
continue
@@ -665,9 +666,12 @@ def mode_file(phase):
if effective.get("imported_folder"):
at_least_one_imported = True
+ if num == 11:
+ more_than_ten_items = True
+
# Add the bulk action buttons also to the top of the table when this
# list shows more than 10 rows
- if len(hostnames) > 10:
+ if more_than_ten_items:
bulk_actions(at_least_one_imported)
for hostname in hostnames: