1
0
forked from baron/baron-sso

perf(admin): full-stack performance optimization for all list tables

- Implemented server-side search, infinite scrolling, and list virtualization for Tenants, Users, and Audit Logs.
- Backend: Enhanced Repository, Service, and Handler layers to support 'search' and 'cursor' parameters.
- Frontend: Integrated @tanstack/react-virtual and useInfiniteQuery for high-performance rendering.
- Quality: Updated all unit tests and E2E tests to match the new asynchronous server-side search architecture.
- i18n: Synced all translation keys and cleaned up unused resources.
This commit is contained in:
2026-06-04 16:06:30 +09:00
parent 6d3f128282
commit b2f155e35b
26 changed files with 1103 additions and 440 deletions

View File

@@ -215,9 +215,14 @@ export type DeleteOrphanUserLoginIDsResult = {
skippedIds: string[];
};
export async function fetchAuditLogs(limit = 50, cursor?: string) {
export async function fetchAuditLogs(
limit = 50,
cursor?: string,
search?: string,
status?: string,
) {
const { data } = await apiClient.get<AuditLogListResponse>("/v1/audit", {
params: { limit, cursor },
params: { limit, cursor, search, status },
});
return data;
}
@@ -662,6 +667,8 @@ export type UserListResponse = {
limit: number;
offset: number;
total: number;
next_cursor?: string;
nextCursor?: string;
};
export type UserCreateRequest = {
@@ -884,9 +891,10 @@ export async function fetchUsers(
offset = 0,
search?: string,
tenantSlug?: string,
cursor?: string,
) {
const { data } = await apiClient.get<UserListResponse>("/v1/admin/users", {
params: { limit, offset, search, tenantSlug },
params: { limit, offset, search, tenantSlug, cursor },
});
return data;
}