From cc1f130099037cf2d27d0fbd280d2638097e333e Mon Sep 17 00:00:00 2001 From: shiyu Date: Tue, 30 Dec 2025 17:25:17 +0800 Subject: [PATCH] feat(audit): adjust column widths and alignments in Audit Logs table for improved readability --- web/src/pages/AuditLogsPage.tsx | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/web/src/pages/AuditLogsPage.tsx b/web/src/pages/AuditLogsPage.tsx index 3714901..b824ee1 100644 --- a/web/src/pages/AuditLogsPage.tsx +++ b/web/src/pages/AuditLogsPage.tsx @@ -126,35 +126,38 @@ const AuditLogsPage = memo(function AuditLogsPage() { { title: t('Action'), dataIndex: 'action', - width: 140, + width: 100, render: (action: string) => {action}, }, { title: t('User'), dataIndex: 'username', - width: 160, + width: 100, render: (_: any, rec: AuditLogItem) => rec.username || rec.user_id || '-', }, { title: t('Path'), dataIndex: 'path', + width: 350, ellipsis: true, render: (path: string, rec: AuditLogItem) => ( {renderHttpMethodTag(rec.method)} - {path} + {path} ), }, { title: t('Status Code'), dataIndex: 'status_code', - width: 100, + width: 80, + align: 'center' as const, }, { title: t('Duration (ms)'), dataIndex: 'duration_ms', - width: 120, + width: 110, + align: 'right' as const, render: (ms?: number | null) => (ms !== null && ms !== undefined ? ms : '-'), }, { @@ -166,7 +169,8 @@ const AuditLogsPage = memo(function AuditLogsPage() { { title: t('Result'), dataIndex: 'success', - width: 100, + width: 80, + align: 'center' as const, render: (success: boolean) => ( {success ? t('Success') : t('Failure')} @@ -175,7 +179,8 @@ const AuditLogsPage = memo(function AuditLogsPage() { }, { title: t('Actions'), - width: 100, + width: 80, + align: 'center' as const, render: (_: any, rec: AuditLogItem) => ( ),