change some formatting with the board report and fix some bugs

This commit is contained in:
UpstreamData
2022-04-27 16:58:47 -06:00
parent 9c88d21db6
commit 87291e2a89
3 changed files with 16 additions and 2 deletions

View File

@@ -102,7 +102,7 @@ async def save_report(file_location):
miner_img_table = Table(
table_data,
colWidths=0.8 * inch,
repeatRows=1,
# repeatRows=1,
# rowHeights=[4 * inch],
)
@@ -122,6 +122,18 @@ async def save_report(file_location):
elements.append(miner_img_table)
elements.append(PageBreak())
elements.append(
Paragraph(
"Board Data",
style=ParagraphStyle(
"Title",
alignment=TA_CENTER,
fontSize=20,
spaceAfter=40,
fontName="Helvetica-Bold",
),
)
)
elements.append(create_data_table(list_data))
elements.append(PageBreak())

View File

@@ -29,11 +29,12 @@ layout = [
sg.Button("ALL", key="select_all_ips"),
sg.Button("REFRESH DATA", key="refresh_data"),
sg.Button("OPEN IN WEB", key="open_in_web"),
sg.Input(key="save_report", visible=False, enable_events=True),
sg.Input(visible=False, enable_events=True, key="save_report"),
sg.SaveAs(
"SAVE REPORT",
key="save_report_button",
file_types=(("PDF Files", "*.pdf"),),
target="save_report",
),
],
[

View File

@@ -42,6 +42,7 @@ async def ui():
if event == "save_report":
if not value["save_report"] == "":
asyncio.create_task(save_report(value["save_report"]))
window["save_report"].update("")
if event == "select_all_ips":
if len(value["ip_table"]) == len(window["ip_table"].Values):
window["ip_table"].update(select_rows=())