mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-02 19:58:03 +00:00
kpi_csv_sq.py : updated to show png images improved performance
Signed-off-by: Chuck SmileyRekiere <chuck.smileyrekiere@candelatech.com>
This commit is contained in:
@@ -122,26 +122,31 @@ class csv_sqlite_dash():
|
|||||||
)
|
)
|
||||||
# save the figure - figures will be over written png
|
# save the figure - figures will be over written png
|
||||||
# for testing
|
# for testing
|
||||||
#png_path = ''
|
png_server_img = ''
|
||||||
if self.png:
|
#if self.png:
|
||||||
if self.png_generated:
|
# if self.png_generated:
|
||||||
pass
|
# pass
|
||||||
else:
|
# else:
|
||||||
self.png_generated = True
|
self.png_generated = True
|
||||||
print("generating png files")
|
print("generating png files")
|
||||||
print("kpi_path:{}".format(df_tmp['kpi_path']))
|
print("kpi_path:{}".format(df_tmp['kpi_path']))
|
||||||
png_path = os.path.join(kpi_path_list[-1],"kpi.png") # use simple names {}_{}_{}_{}_kpi.png".format(test_id_list[-1], group, test_tag, test_rig))
|
png_path = os.path.join(kpi_path_list[-1],"kpi.png") # use simple names {}_{}_{}_{}_kpi.png".format(test_id_list[-1], group, test_tag, test_rig))
|
||||||
html_path = os.path.join(kpi_path_list[-1],"kpi.html") # use simple names {}_{}_{}_{}_kpi.html".format(test_id_list[-1], group, test_tag, test_rig))
|
html_path = os.path.join(kpi_path_list[-1],"kpi.html") # use simple names {}_{}_{}_{}_kpi.html".format(test_id_list[-1], group, test_tag, test_rig))
|
||||||
print("png_path {}".format(png_path))
|
print("png_path {}".format(png_path))
|
||||||
|
png_server_img = self.server + png_path.replace('/home/lanforge','')
|
||||||
|
print("png_server_img {}".format(png_server_img))
|
||||||
kpi_fig.write_image(png_path,scale=1,width=1200,height=350)
|
kpi_fig.write_image(png_path,scale=1,width=1200,height=350)
|
||||||
#https://plotly.com/python/interactive-html-export/
|
#https://plotly.com/python/interactive-html-export/
|
||||||
kpi_fig.write_html(html_path)
|
kpi_fig.write_html(html_path)
|
||||||
|
self.children_div.append(html.Img(src=png_server_img))
|
||||||
|
|
||||||
|
|
||||||
# need to figure out how to add png
|
# need to figure out how to add png
|
||||||
#self.children_div.append(html.Img(src=png_path))
|
# need server path for images no os.path
|
||||||
|
|
||||||
|
|
||||||
# use image from above to creat html display
|
# use image from above to creat html display
|
||||||
self.children_div.append(dcc.Graph(figure=kpi_fig))
|
#self.children_div.append(dcc.Graph(figure=kpi_fig))
|
||||||
|
|
||||||
#TODO the link must be to a server to display html
|
#TODO the link must be to a server to display html
|
||||||
# WARNING: DO NOT USE os.path.join will use the path for where the script is RUN which can be container.
|
# WARNING: DO NOT USE os.path.join will use the path for where the script is RUN which can be container.
|
||||||
|
|||||||
Reference in New Issue
Block a user