Report: Detailed test results table 2 32/25132/1
authorTibor Frank <tifrank@cisco.com>
Fri, 14 Feb 2020 08:00:29 +0000 (09:00 +0100)
committerTibor Frank <tifrank@cisco.com>
Fri, 14 Feb 2020 08:00:29 +0000 (09:00 +0100)
Change-Id: Ica89d51b5590ba6ceaedb7a4d244abee78f30755
Signed-off-by: Tibor Frank <tifrank@cisco.com>
resources/tools/presentation/generator_tables.py

index b7f2678..15ed2c5 100644 (file)
@@ -321,7 +321,8 @@ def table_details(table, input_data):
                         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" \
+                            col_data = f"{u'-'.join(col_data_lst[:half])}" \
+                                       f"- |br| " \
                                        f"{u'-'.join(col_data_lst[half:])}"
                         col_data = f" |prein| {col_data} |preout| "
                     elif column[u"data"].split(u" ")[1] in (u"msg", ):
@@ -400,9 +401,17 @@ def table_merged_details(table, input_data):
                     col_data = col_data.replace(
                         u"No Data", u"Not Captured     "
                     )
-                    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])}" \
+                                       f"- |br| " \
+                                       f"{u'-'.join(col_data_lst[half:])}"
+                        col_data = f" |prein| {col_data} |preout| "
+                    elif column[u"data"].split(u" ")[1] in (u"msg", ):
                         col_data = f" |prein| {col_data} |preout| "
-                    if column[u"data"].split(u" ")[1] in \
+                    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| "

©2016 FD.io a Linux Foundation Collaborative Project. All Rights Reserved.
Linux Foundation is a registered trademark of The Linux Foundation. Linux is a registered trademark of Linus Torvalds.
Please see our privacy policy and terms of use.