mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-01 19:28:00 +00:00
lf_report.py: link to pdf results added
lf_qa.py : link to pdf results Signed-off-by: Chuck SmileyRekiere <chuck.smileyrekiere@candelatech.com>
This commit is contained in:
@@ -84,6 +84,7 @@ class lf_report():
|
|||||||
self.csv_file_name=""
|
self.csv_file_name=""
|
||||||
self.html = ""
|
self.html = ""
|
||||||
self.custom_html = ""
|
self.custom_html = ""
|
||||||
|
self.pdf_link_html = ""
|
||||||
self.objective = _obj
|
self.objective = _obj
|
||||||
self.obj_title = _obj_title
|
self.obj_title = _obj_title
|
||||||
#self.systeminfopath = ""
|
#self.systeminfopath = ""
|
||||||
@@ -286,6 +287,15 @@ class lf_report():
|
|||||||
self.write_output_pdf = "{}/{}-{}".format(self.path_date_time,self.date,self.output_pdf)
|
self.write_output_pdf = "{}/{}-{}".format(self.path_date_time,self.date,self.output_pdf)
|
||||||
pdfkit.from_file(self.write_output_html, self.write_output_pdf, options=options)
|
pdfkit.from_file(self.write_output_html, self.write_output_pdf, options=options)
|
||||||
|
|
||||||
|
def build_pdf_link(self):
|
||||||
|
pdf_link_path = "{}/{}-{}".format(self.path_date_time,self.date,self.output_pdf)
|
||||||
|
self.pdf_link_html = """
|
||||||
|
<!-- pdf link -->
|
||||||
|
<a href={pdf_link_path}>PDF_Report<a>
|
||||||
|
""".format(pdf_link_path=pdf_link_path)
|
||||||
|
self.html += self.pdf_link_html
|
||||||
|
|
||||||
|
|
||||||
def generate_report(self):
|
def generate_report(self):
|
||||||
self.write_html()
|
self.write_html()
|
||||||
self.write_pdf()
|
self.write_pdf()
|
||||||
|
|||||||
@@ -336,6 +336,7 @@ Example: kpi_csv_sq.py --store --png --show --path <path to read kpi.csv> (read
|
|||||||
report.start_content_div2()
|
report.start_content_div2()
|
||||||
report.set_obj_html("Objective", "QA Verification")
|
report.set_obj_html("Objective", "QA Verification")
|
||||||
report.build_objective()
|
report.build_objective()
|
||||||
|
report.build_pdf_link()
|
||||||
report.set_table_title("QA Test Results")
|
report.set_table_title("QA Test Results")
|
||||||
report.build_table_title()
|
report.build_table_title()
|
||||||
# report.set_text("lanforge-scripts git sha: {}".format(git_sha))
|
# report.set_text("lanforge-scripts git sha: {}".format(git_sha))
|
||||||
|
|||||||
Reference in New Issue
Block a user