Module: check_mk
Branch: master
Commit: 429fef06efb9267b1b1c981dc27ca9712b71467e
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=429fef06efb926…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Tue Jul 9 17:42:19 2013 +0200
table.begin(): allow to omit id
---
web/htdocs/table.py | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/web/htdocs/table.py b/web/htdocs/table.py
index 5682918..ce9a27a 100644
--- a/web/htdocs/table.py
+++ b/web/htdocs/table.py
@@ -31,9 +31,13 @@ mode = None
next_func = None
row_css = None
-def begin(id, title=None, **kwargs):
+def begin(table_id=None, title=None, **kwargs):
global table, mode, next_func
+ # Use our pagename as table id if none is specified
+ if table_id == None:
+ table_id = html.myfile
+
try:
limit = config.table_row_limit
except:
@@ -44,7 +48,7 @@ def begin(id, title=None, **kwargs):
limit = None
table = {
- "id" : id,
+ "id" : table_id,
"title" : title,
"headers" : [],
"rows" : [],