mirror of https://github.com/jumpserver/jumpserver
perf: Improve chart rendering wait logic in export process
parent
af7a00c1b1
commit
1350b774b3
|
@ -95,9 +95,7 @@ def export_chart_to_pdf(chart_name, sessionid, request=None):
|
|||
page = context.new_page()
|
||||
try:
|
||||
page.goto(url, wait_until='networkidle')
|
||||
page.wait_for_selector('.charts-zone', timeout=10000)
|
||||
# 等待渲染完成
|
||||
page.wait_for_timeout(2000)
|
||||
page.wait_for_function('window.echartsFinished === true', timeout=10000)
|
||||
|
||||
page_title = page.title()
|
||||
print(f"Page title: {page_title}")
|
||||
|
|
Loading…
Reference in New Issue