mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-01 11:18:03 +00:00
kpi_csv_sq.py : debugging / verifitying the graphs produced
Signed-off-by: Chuck SmileyRekiere <chuck.smileyrekiere@candelatech.com>
This commit is contained in:
@@ -97,19 +97,22 @@ class csv_sqlite_dash():
|
|||||||
|
|
||||||
kpi_path_list = list(df_tmp['kpi_path'])
|
kpi_path_list = list(df_tmp['kpi_path'])
|
||||||
kpi_path = list(set(kpi_path_list))
|
kpi_path = list(set(kpi_path_list))
|
||||||
|
print("kpi_path {}".format(kpi_path))
|
||||||
|
print("kpi_path[0]: {}".format(kpi_path[0]))
|
||||||
|
print("kpi_path[-1]: {}".format(kpi_path[-1]))
|
||||||
|
|
||||||
units_list = list(df_tmp['Units'])
|
units_list = list(df_tmp['Units'])
|
||||||
units = list(set(units_list))
|
units = list(set(units_list))
|
||||||
|
|
||||||
kpi_fig.update_layout(
|
kpi_fig.update_layout(
|
||||||
title="{} : {} : {} : {}".format(test_id[0], group, test_tag, test_rig),
|
title="{} : {} : {} : {}".format(test_id[-1], group, test_tag, test_rig),
|
||||||
xaxis_title="Time",
|
xaxis_title="Time",
|
||||||
yaxis_title="{}".format(units[0]),
|
yaxis_title="{}".format(units[0]),
|
||||||
xaxis = {'type' : 'date'}
|
xaxis = {'type' : 'date'}
|
||||||
)
|
)
|
||||||
# save the figure - this may need to be re-written
|
# save the figure - this may need to be re-written
|
||||||
print("kpi_path:{}".format(df_tmp['kpi_path']))
|
print("kpi_path:{}".format(df_tmp['kpi_path']))
|
||||||
png_path = os.path.join(kpi_path[0],"{}_{}_{}_{}_kpi.png".format(test_id[0], group, test_tag, test_rig))
|
png_path = os.path.join(kpi_path[-1],"{}_{}_{}_{}_kpi.png".format(test_id[-1], group, test_tag, test_rig))
|
||||||
print("png_path {}".format(png_path))
|
print("png_path {}".format(png_path))
|
||||||
kpi_fig.write_image(png_path,scale=1,width=1200,height=350)
|
kpi_fig.write_image(png_path,scale=1,width=1200,height=350)
|
||||||
|
|
||||||
@@ -122,7 +125,7 @@ class csv_sqlite_dash():
|
|||||||
#TODO need to work out the reporting paths - pass in path adjust
|
#TODO need to work out the reporting paths - pass in path adjust
|
||||||
index_html_path = self.server + kpi_path[-1] + "index.html"
|
index_html_path = self.server + kpi_path[-1] + "index.html"
|
||||||
index_html_path = index_html_path.replace('/home/lanforge/','')
|
index_html_path = index_html_path.replace('/home/lanforge/','')
|
||||||
self.children_div.append(html.A('{}_{}_{}_{}_index.html'.format(test_id[0], group, test_tag, test_rig),
|
self.children_div.append(html.A('{}_{}_{}_{}_index.html'.format(test_id[-1], group, test_tag, test_rig),
|
||||||
href=index_html_path, target='_blank'))
|
href=index_html_path, target='_blank'))
|
||||||
self.children_div.append(html.Br())
|
self.children_div.append(html.Br())
|
||||||
self.children_div.append(html.A('html_reports', href=self.server_html_reports, target='_blank'))
|
self.children_div.append(html.A('html_reports', href=self.server_html_reports, target='_blank'))
|
||||||
|
|||||||
Reference in New Issue
Block a user