Module: check_mk
Branch: master
Commit: 40f04edb83aab15a599e5b23ad1683ed2a270110
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=40f04edb83aab1…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Thu Jan 3 11:35:18 2019 +0100
Made non-public parts of Table, well, non-public...
Change-Id: Iff7c951b1a0eafccc9c266977faec380bf331837
---
cmk/gui/table.py | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/cmk/gui/table.py b/cmk/gui/table.py
index 3b1da3b..b0fb369 100644
--- a/cmk/gui/table.py
+++ b/cmk/gui/table.py
@@ -94,8 +94,8 @@ class Table(object):
html.plug()
def row(self, *posargs, **kwargs):
- self.finish_previous()
- self.next_func = self.add_row
+ self._finish_previous()
+ self.next_func = self._add_row
self.next_args = posargs, kwargs
def text_cell(self, *args, **kwargs):
@@ -103,16 +103,16 @@ class Table(object):
self.cell(*args, **kwargs)
def cell(self, *posargs, **kwargs):
- self.finish_previous()
- self.next_func = self.add_cell
+ self._finish_previous()
+ self.next_func = self._add_cell
self.next_args = posargs, kwargs
- def finish_previous(self):
+ def _finish_previous(self):
if self.next_args is not None:
self.next_func(*self.next_args[0], **self.next_args[1])
self.next_func = None
- def add_row(self, css=None, state=0, collect_headers=True, fixed=False, **attrs):
+ def _add_row(self, css=None, state=0, collect_headers=True, fixed=False, **attrs):
if self.next_header:
self.rows.append((self.next_header, None, "header", True, attrs))
self.next_header = None
@@ -125,14 +125,14 @@ class Table(object):
elif not collect_headers and self.options["collect_headers"] is True:
self.options["collect_headers"] = False
- def add_cell(self,
- title="",
- text="",
- css=None,
- help_txt=None,
- colspan=None,
- sortable=True,
- escape_text=False):
+ def _add_cell(self,
+ title="",
+ text="",
+ css=None,
+ help_txt=None,
+ colspan=None,
+ sortable=True,
+ escape_text=False):
if escape_text:
text = html.permissive_attrencode(text)
else:
@@ -162,7 +162,7 @@ class Table(object):
return self
def __exit__(self, exc_type, exc_val, exc_tb):
- self.finish_previous()
+ self._finish_previous()
html.unplug()
if not self.rows and self.options["omit_if_empty"]: