aboutsummaryrefslogtreecommitdiffstats
path: root/resources/tools/presentation/generator_tables.py
diff options
context:
space:
mode:
authorTibor Frank <tifrank@cisco.com>2020-02-14 07:42:29 +0100
committerTibor Frank <tifrank@cisco.com>2020-02-14 07:42:29 +0100
commitc81eac1e36b37c78f144a4218c231da846a908f6 (patch)
tree762ba7ea9b599bcceecdaa7510b20a54a78743b1 /resources/tools/presentation/generator_tables.py
parent8d43bb0239f0100e46a8e333da57ea10e2c956d3 (diff)
Report: Detailed test results table
Change-Id: I2fd223ac522d8a88546269db0752995d0c77e4fe Signed-off-by: Tibor Frank <tifrank@cisco.com>
Diffstat (limited to 'resources/tools/presentation/generator_tables.py')
-rw-r--r--resources/tools/presentation/generator_tables.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/resources/tools/presentation/generator_tables.py b/resources/tools/presentation/generator_tables.py
index f703e4b718..b7f267847c 100644
--- a/resources/tools/presentation/generator_tables.py
+++ b/resources/tools/presentation/generator_tables.py
@@ -317,9 +317,16 @@ def table_details(table, input_data):
try:
col_data = str(data[job][build][test][column[
u"data"].split(" ")[1]]).replace(u'"', u'""')
- if column[u"data"].split(u" ")[1] in (u"name", u"msg"):
+ if column[u"data"].split(u" ")[1] in (u"name", ):
+ if len(col_data) > 30:
+ col_data_lst = col_data.split(u"-")
+ half = int(len(col_data_lst) / 2)
+ col_data = f"{u'-'.join(col_data_lst[:half])}\n" \
+ f"{u'-'.join(col_data_lst[half:])}"
col_data = f" |prein| {col_data} |preout| "
- if column[u"data"].split(u" ")[1] in \
+ elif column[u"data"].split(u" ")[1] in (u"msg", ):
+ col_data = f" |prein| {col_data} |preout| "
+ elif column[u"data"].split(u" ")[1] in \
(u"conf-history", u"show-run"):
col_data = col_data.replace(u" |br| ", u"", 1)
col_data = f" |prein| {col_data[:-5]} |preout| "