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 06:45:16 +0000
commit1f765eac3a4caa6f4aa5b51fcd8bafe12ffba8c0 (patch)
tree6d28d67e04ad4b6627d8967ec6eafc04e40e1f47 /resources/tools/presentation/generator_tables.py
parente2e656d09ecf74660f1d522907af712f259d098d (diff)
Report: Detailed test results table
Change-Id: I2fd223ac522d8a88546269db0752995d0c77e4fe Signed-off-by: Tibor Frank <tifrank@cisco.com> (cherry picked from commit c81eac1e36b37c78f144a4218c231da846a908f6)
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 3ed6bac1a0..0ae73b17ff 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| "