From dd23604974c91a7559d51c87a74c2996e076f1cf Mon Sep 17 00:00:00 2001 From: Chuck SmileyRekiere Date: Tue, 10 Aug 2021 07:03:36 -0600 Subject: [PATCH] lf_qa.py : moved dash show to after the static version generated Signed-off-by: Chuck SmileyRekiere --- py-scripts/sandbox/lf_qa.py | 73 +++++++++++++++++++------------------ 1 file changed, 37 insertions(+), 36 deletions(-) diff --git a/py-scripts/sandbox/lf_qa.py b/py-scripts/sandbox/lf_qa.py index b381c840..95f01701 100755 --- a/py-scripts/sandbox/lf_qa.py +++ b/py-scripts/sandbox/lf_qa.py @@ -310,6 +310,10 @@ Example: kpi_csv_sq.py --store --png --show --path (read if(args.png == True and args.show == True): print("generating png files will effect initial display performance") + if args.store == False and args.png == False and args.show == False: + print("Need to enter an action of --store --png --show ") + + # create report class for reporting report = lf_report(_path = __path, @@ -333,46 +337,43 @@ Example: kpi_csv_sq.py --store --png --show --path (read csv_dash.store() if args.png: csv_dash.generate_graph_png() + + # generate output reports + report.set_title("LF QA: Verification Test Run") + report.build_banner_left() + report.start_content_div2() + report.set_obj_html("Objective", "QA Verification") + report.build_objective() + pdf_link_path = report.get_pdf_path() + pdf_link_path = __server + pdf_link_path.replace('/home/lanforge/','') + report.build_pdf_link(pdf_link_path) + + report_path = report.get_path() + report_path = __server + report_path.replace('/home/lanforge/','') + report.build_link(report_path,"{}".format(report_path)) + + report_parent_path = report.get_parent_path() + report_parent_path = __server + report_parent_path.replace('/home/lanforge/','') + report.build_link(report_parent_path,"{}".format(report_parent_path)) + report.set_table_title("QA Test Results") + report.build_table_title() + # report.set_text("lanforge-scripts git sha: {}".format(git_sha)) + # report.build_text() + html_results = csv_dash.get_html_results() + report.set_custom_html(html_results) + report.build_custom() + report.build_footer() + html_report = report.write_html_with_timestamp() + print("html report: {}".format(html_report)) + try: + report.write_pdf_with_timestamp() + except: + print("exception write_pdf_with_timestamp()") + if args.show: #csv_dash.show(n_clicks) csv_dash.show() - - # generate output reports - report.set_title("LF QA: Verification Test Run") - report.build_banner_left() - report.start_content_div2() - report.set_obj_html("Objective", "QA Verification") - report.build_objective() - pdf_link_path = report.get_pdf_path() - pdf_link_path = __server + pdf_link_path.replace('/home/lanforge/','') - report.build_pdf_link(pdf_link_path) - report_path = report.get_path() - report_path = __server + report_path.replace('/home/lanforge/','') - report.build_link(report_path,"{}".format(report_path)) - - report_parent_path = report.get_parent_path() - report_parent_path = __server + report_parent_path.replace('/home/lanforge/','') - report.build_link(report_parent_path,"{}".format(report_parent_path)) - report.set_table_title("QA Test Results") - report.build_table_title() - # report.set_text("lanforge-scripts git sha: {}".format(git_sha)) - # report.build_text() - html_results = csv_dash.get_html_results() - report.set_custom_html(html_results) - report.build_custom() - report.build_footer() - html_report = report.write_html_with_timestamp() - print("html report: {}".format(html_report)) - try: - report.write_pdf_with_timestamp() - except: - print("exception write_pdf_with_timestamp()") - - - - if args.store == False and args.png == False and args.show == False: - print("Need to enter an action of --store --png --show ") if __name__ == '__main__': main()