X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=resources%2Ftools%2Fpresentation%2Fgenerator_tables.py;h=5c692fa20845e0c51c426edb0d07e6446ccfb8ce;hb=bc2886111faedc0d43dcd3fe3cac787dc6e767a9;hp=835e6cf0127f7a78ac761aedd51a40fdeb22adb7;hpb=6420897309b9e677f9352e5bfee007b3421eb2c5;p=csit.git diff --git a/resources/tools/presentation/generator_tables.py b/resources/tools/presentation/generator_tables.py index 835e6cf012..5c692fa208 100644 --- a/resources/tools/presentation/generator_tables.py +++ b/resources/tools/presentation/generator_tables.py @@ -287,6 +287,7 @@ def table_merged_details(table, input_data): """ logging.info(f" Generating the table {table.get(u'title', u'')} ...") + # Transform the data logging.info( f" Creating the data set for the {table.get(u'type', u'')} " @@ -341,9 +342,15 @@ def table_merged_details(table, input_data): f"{u'-'.join(col_data_lst[half:])}" col_data = f" |prein| {col_data} |preout| " elif column[u"data"].split(u" ")[1] in (u"msg", ): + # Temporary solution: remove NDR results from message: + if bool(table.get(u'remove-ndr', False)): + try: + col_data = col_data.split(u"\n", 1)[1] + except IndexError: + pass col_data = f" |prein| {col_data} |preout| " elif column[u"data"].split(u" ")[1] in \ - (u"conf-history", u"show-run"): + (u"conf-history", u"show-run"): col_data = col_data.replace(u" |br| ", u"", 1) col_data = f" |prein| {col_data[:-5]} |preout| " row_lst.append(f'"{col_data}"')