mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-02 19:58:03 +00:00
report.css, lf_report.py , lf_check.py : formatting updates to have
report anchored left Signed-off-by: Chuck SmileyRekiere <chuck.smileyrekiere@candelatech.com>
This commit is contained in:
@@ -187,6 +187,20 @@ li {
|
|||||||
max-width: 1000px;
|
max-width: 1000px;
|
||||||
max-height: 205px;
|
max-height: 205px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#BannerLeft {
|
||||||
|
background-image:url("banner.png");
|
||||||
|
background-repeat:no-repeat;
|
||||||
|
padding: 0;
|
||||||
|
margin: 1em;
|
||||||
|
min-width: 1000px;
|
||||||
|
min-height: 205px;
|
||||||
|
width: 1000px;
|
||||||
|
height: 205px;
|
||||||
|
max-width: 1000px;
|
||||||
|
max-height: 205px;
|
||||||
|
}
|
||||||
|
|
||||||
#BannerLogo {
|
#BannerLogo {
|
||||||
text-align: right;
|
text-align: right;
|
||||||
padding: 25px;
|
padding: 25px;
|
||||||
|
|||||||
@@ -329,6 +329,39 @@ class lf_report():
|
|||||||
)
|
)
|
||||||
self.html += self.banner_html
|
self.html += self.banner_html
|
||||||
|
|
||||||
|
def build_banner_left(self):
|
||||||
|
# NOTE: {{ }} are the ESCAPED curly braces
|
||||||
|
self.banner_html = """<!DOCTYPE html>
|
||||||
|
<html lang='en'>
|
||||||
|
<head>
|
||||||
|
<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' />
|
||||||
|
<title>{title}</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id='BannerBack'>
|
||||||
|
<div id='BannerLeft'>
|
||||||
|
<br/>
|
||||||
|
<img id='BannerLogo' align='right' src="CandelaLogo2-90dpi-200x90-trans.png" border='0'/>
|
||||||
|
<div class='HeaderStyle'>
|
||||||
|
<br>
|
||||||
|
<h1 class='TitleFontPrint' style='color:darkgreen;'> {title} </h1>
|
||||||
|
<h3 class='TitleFontPrint' style='color:darkgreen;'>{date}</h3>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
""".format(
|
||||||
|
title=self.title,
|
||||||
|
date=self.date,
|
||||||
|
)
|
||||||
|
self.html += self.banner_html
|
||||||
|
|
||||||
|
|
||||||
def build_table_title(self):
|
def build_table_title(self):
|
||||||
self.table_title_html = """
|
self.table_title_html = """
|
||||||
<!-- Table Title-->
|
<!-- Table Title-->
|
||||||
|
|||||||
@@ -1140,7 +1140,7 @@ Example :
|
|||||||
|
|
||||||
# generate output reports
|
# generate output reports
|
||||||
report.set_title("LF Check: lf_check.py")
|
report.set_title("LF Check: lf_check.py")
|
||||||
report.build_banner()
|
report.build_banner_left()
|
||||||
report.start_content_div2()
|
report.start_content_div2()
|
||||||
report.set_table_title("LF Check Test Results")
|
report.set_table_title("LF Check Test Results")
|
||||||
report.build_table_title()
|
report.build_table_title()
|
||||||
@@ -1149,7 +1149,7 @@ Example :
|
|||||||
html_results = check.get_html_results()
|
html_results = check.get_html_results()
|
||||||
report.set_custom_html(html_results)
|
report.set_custom_html(html_results)
|
||||||
report.build_custom()
|
report.build_custom()
|
||||||
report.build_footer_no_png()
|
report.build_footer()
|
||||||
html_report = report.write_html_with_timestamp()
|
html_report = report.write_html_with_timestamp()
|
||||||
print("html report: {}".format(html_report))
|
print("html report: {}".format(html_report))
|
||||||
try:
|
try:
|
||||||
|
|||||||
Reference in New Issue
Block a user