Module: check_mk
Branch: master
Commit: 4eb5d3b7e7c90eccb5f38424e56337990dc37709
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=4eb5d3b7e7c90e…
Author: Roland Halbig <rh(a)mathias-kettner.de>
Date: Thu Jan 5 15:27:37 2017 +0100
Refactoring table.py: Made testable using try catch blocks.
Change-Id: I75f2311029dd35cdf4c013775d3fdfed69816502
---
web/htdocs/table.py | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/web/htdocs/table.py b/web/htdocs/table.py
index 1be5b2e..4615b6b 100644
--- a/web/htdocs/table.py
+++ b/web/htdocs/table.py
@@ -23,7 +23,6 @@
# License along with GNU Make; see the file COPYING. If not, write
# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
# Boston, MA 02110-1301 USA.
-
import config
from lib import num_split
@@ -172,6 +171,7 @@ def end():
search_term = None
actions_enabled = (table["searchable"] or table["sortable"]) and
not do_csv
if actions_enabled:
+
user_opts = config.user.load_file("tableoptions", {})
user_opts.setdefault(table_id, {})
table_opts = user_opts[table_id]
@@ -388,9 +388,8 @@ def end():
'Click <a href="%s">here</a> to disable
the limitation.') %
(limit, num_rows_unlimited, html.makeuri([('limit',
'none')])))
- if actions_enabled and not do_csv:
+ if actions_enabled:
config.user.save_file("tableoptions", user_opts)
-
table = None