lf_check.py : added footer with had no png

lf_report.py : footer with no png

Signed-off-by: Chuck SmileyRekiere <chuck.smileyrekiere@candelatech.com>
This commit is contained in:
Chuck SmileyRekiere
2021-07-09 18:12:14 -06:00
parent 81a4f64cc2
commit 1a480434c8
2 changed files with 26 additions and 1 deletions

View File

@@ -402,6 +402,29 @@ class lf_report():
"""
self.html += self.footer_html
def build_footer_no_png(self):
self.footer_html = """<!DOCTYPE html>
<html lang='en'>
<footer>
<meta charset='UTF-8'>
<meta name='viewport' content='width=device-width, initial-scale=1' />
<style>
body {{ margin: 0; padding: 0; }}
</style>
<link rel='stylesheet' href='report.css' />
<link rel='stylesheet' href='custom.css' />
</footer>
<body>
<div class='FooterStyle'>
<p>Generate by Candela Technologies LANforge network testing tool</p>
<p><a href="https://www.candelatech.com">www.candelatech.com</a><p>
</div>
</body>
"""
self.html += self.footer_html
def build_custom(self):
self.html += self.custom_html
@@ -467,7 +490,8 @@ if __name__ == "__main__":
report.build_table()
#report.build_all()
report.build_footer()
#report.build_footer()
report.build_footer_no_png()
html_file = report.write_html()
print("returned file ")

View File

@@ -998,6 +998,7 @@ Example :
html_results = check.get_html_results()
report.set_custom_html(html_results)
report.build_custom()
report.build_footer_no_png()
html_report = report.write_html_with_timestamp()
print("html report: {}".format(html_report))
try: