perf: support export dashboard

pull/15896/head
mikebofs 2025-08-21 15:59:27 +08:00 committed by 老广
parent dabb30d90a
commit d4d5224c17
3 changed files with 29 additions and 6 deletions

View File

@ -1608,5 +1608,9 @@
"removeWarningMsg": "Are you sure you want to remove",
"setVariable": "Set variable",
"userId": "User ID",
"userName": "User name"
"userName": "User name",
"ConsoleDashboard": "Console dashboard",
"AuditsDashboard": "Audits dashboard",
"PamDashboard": "PAM dashboard",
"ChangeSecretDashboard": "Change secret dashboard"
}

View File

@ -1617,5 +1617,9 @@
"removeWarningMsg": "你确定要移除",
"setVariable": "设置参数",
"userId": "用户ID",
"userName": "用户名"
"userName": "用户名",
"ConsoleDashboard": "控制台仪表盘",
"AuditsDashboard": "审计台仪表盘",
"PamDashboard": "特权账号仪表盘",
"ChangeSecretDashboard": "账号改密仪表盘"
}

View File

@ -34,11 +34,27 @@ charts_map = {
},
"AccountStatistics": {
"title": _('Account statistics report'),
"path": "/ui/#/reports/accounts/account-statistics"
"path": "/ui/#/reports/accounts/account-statistics?days=30"
},
"AccountAutomationReport": {
"title": _('Account automation report'),
"path": "/ui/#/reports/accounts/account-automation"
},
"ConsoleDashboard": {
"title": _('ConsoleDashboard'),
"path": "/ui/#/reports/dashboard/console"
},
"AuditsDashboard": {
"title": _('AuditsDashboard'),
"path": "/ui/#/reports/dashboard/audits"
},
"PamDashboard": {
"title": _('PamDashboard'),
"path": "/ui/#/reports/dashboard/pam"
},
"ChangeSecretDashboard": {
"title": _('ChangeSecretDashboard'),
"path": "/ui/#/reports/dashboard/change-secret"
}
}
@ -57,7 +73,6 @@ def export_chart_to_pdf(chart_name, sessionid, request=None):
url = url.replace(":8080", ":9528")
days = request.GET.get('days', 7)
url = url + f"?days={days}"
print("Url: ", url)
with sync_playwright() as p:
lang = request.COOKIES.get(settings.LANGUAGE_COOKIE_NAME)