mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-02 19:58:03 +00:00
test_l3_longevity.py - update for making the index.html
lf_report.py - update method for index.html Signed-off-by: Chuck SmileyRekiere <chuck.smileyrekiere@candelatech.com>
This commit is contained in:
@@ -76,6 +76,7 @@ class lf_report():
|
|||||||
self.output_html=_output_html
|
self.output_html=_output_html
|
||||||
self.path_date_time = _path_date_time
|
self.path_date_time = _path_date_time
|
||||||
self.write_output_html = ""
|
self.write_output_html = ""
|
||||||
|
self.write_output_index_html = ""
|
||||||
self.output_pdf=_output_pdf
|
self.output_pdf=_output_pdf
|
||||||
self.write_output_pdf = ""
|
self.write_output_pdf = ""
|
||||||
self.banner_html = ""
|
self.banner_html = ""
|
||||||
@@ -270,6 +271,18 @@ class lf_report():
|
|||||||
print("write_html failed")
|
print("write_html failed")
|
||||||
return self.write_output_html
|
return self.write_output_html
|
||||||
|
|
||||||
|
def write_index_html(self):
|
||||||
|
self.write_output_index_html = str(self.path_date_time)+'/'+ str("index.html")
|
||||||
|
print("write_output_index_html: {}".format(self.write_output_index_html))
|
||||||
|
try:
|
||||||
|
test_file = open(self.write_output_index_html, "w")
|
||||||
|
test_file.write(self.html)
|
||||||
|
test_file.close()
|
||||||
|
except:
|
||||||
|
print("write_index_html failed")
|
||||||
|
return self.write_output_index_html
|
||||||
|
|
||||||
|
|
||||||
def write_html_with_timestamp(self):
|
def write_html_with_timestamp(self):
|
||||||
self.write_output_html = "{}/{}-{}".format(self.path_date_time,self.date,self.output_html)
|
self.write_output_html = "{}/{}-{}".format(self.path_date_time,self.date,self.output_html)
|
||||||
print("write_output_html: {}".format(self.write_output_html))
|
print("write_output_html: {}".format(self.write_output_html))
|
||||||
|
|||||||
@@ -3118,6 +3118,7 @@ Setting wifi_settings per radio
|
|||||||
report.set_table_dataframe_from_csv(csv_kpi_file)
|
report.set_table_dataframe_from_csv(csv_kpi_file)
|
||||||
report.build_table()
|
report.build_table()
|
||||||
report.write_html_with_timestamp()
|
report.write_html_with_timestamp()
|
||||||
|
report.write_index_html()
|
||||||
# report.write_pdf(_page_size = 'A3', _orientation='Landscape')
|
# report.write_pdf(_page_size = 'A3', _orientation='Landscape')
|
||||||
report.write_pdf_with_timestamp(_page_size='A4', _orientation='Portrait')
|
report.write_pdf_with_timestamp(_page_size='A4', _orientation='Portrait')
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user