forked from baron/baron-sso
adminfront에 API Key 관리 및 RBAC 기능 추가
This commit is contained in:
@@ -121,8 +121,9 @@ function AuditLogsPage() {
|
||||
});
|
||||
|
||||
const logs =
|
||||
data?.pages?.flatMap((page) =>
|
||||
page?.items?.filter((item): item is AuditLog => Boolean(item)) ?? [],
|
||||
data?.pages?.flatMap(
|
||||
(page) =>
|
||||
page?.items?.filter((item): item is AuditLog => Boolean(item)) ?? [],
|
||||
) ?? [];
|
||||
|
||||
const handleAddFilter = () => {
|
||||
@@ -160,12 +161,16 @@ function AuditLogsPage() {
|
||||
</div>
|
||||
<h2 className="text-3xl font-semibold">감사 로그</h2>
|
||||
<p className="text-sm text-[var(--color-muted)]">
|
||||
Command 요청 기반 ClickHouse 로그를 조회합니다. 사용자/테넌트는
|
||||
추후 세션 연동 시 자동 채워집니다.
|
||||
Command 요청 기반 ClickHouse 로그를 조회합니다. 사용자/테넌트는 추후
|
||||
세션 연동 시 자동 채워집니다.
|
||||
</p>
|
||||
</div>
|
||||
<div className="flex items-center gap-2">
|
||||
<Button variant="outline" onClick={() => refetch()} disabled={isFetching}>
|
||||
<Button
|
||||
variant="outline"
|
||||
onClick={() => refetch()}
|
||||
disabled={isFetching}
|
||||
>
|
||||
<RefreshCw size={16} />
|
||||
새로고침
|
||||
</Button>
|
||||
@@ -241,7 +246,7 @@ function AuditLogsPage() {
|
||||
<TableHead>PATH</TableHead>
|
||||
<TableHead className="w-[120px]">STATUS</TableHead>
|
||||
<TableHead>Action / Target</TableHead>
|
||||
<TableHead className="w-[80px]"></TableHead>
|
||||
<TableHead className="w-[80px]" />
|
||||
</TableRow>
|
||||
</TableHeader>
|
||||
<TableBody>
|
||||
@@ -294,7 +299,9 @@ function AuditLogsPage() {
|
||||
className="h-7 w-7 text-muted-foreground hover:text-primary"
|
||||
aria-label="Copy actor id"
|
||||
onClick={() =>
|
||||
handleCopy(row.user_id || details.actor_id || "")
|
||||
handleCopy(
|
||||
row.user_id || details.actor_id || "",
|
||||
)
|
||||
}
|
||||
>
|
||||
<Copy className="h-3 w-3" />
|
||||
@@ -313,7 +320,9 @@ function AuditLogsPage() {
|
||||
size="icon"
|
||||
className="h-7 w-7 text-muted-foreground hover:text-primary"
|
||||
aria-label="Copy request id"
|
||||
onClick={() => handleCopy(details.request_id || "")}
|
||||
onClick={() =>
|
||||
handleCopy(details.request_id || "")
|
||||
}
|
||||
>
|
||||
<Copy className="h-3 w-3" />
|
||||
</Button>
|
||||
@@ -388,12 +397,15 @@ function AuditLogsPage() {
|
||||
Request
|
||||
</div>
|
||||
<div className="break-all">
|
||||
Request ID · {formatCellValue(details.request_id)}
|
||||
Request ID ·{" "}
|
||||
{formatCellValue(details.request_id)}
|
||||
</div>
|
||||
<div className="break-all">
|
||||
Event ID · {formatCellValue(row.event_id)}
|
||||
</div>
|
||||
<div>IP · {formatCellValue(row.ip_address)}</div>
|
||||
<div>
|
||||
IP · {formatCellValue(row.ip_address)}
|
||||
</div>
|
||||
<div>
|
||||
Latency ·{" "}
|
||||
{details.latency_ms !== undefined
|
||||
@@ -406,10 +418,15 @@ function AuditLogsPage() {
|
||||
Actor
|
||||
</div>
|
||||
<div>
|
||||
Actor ID · {row.user_id || details.actor_id || "-"}
|
||||
Actor ID ·{" "}
|
||||
{row.user_id || details.actor_id || "-"}
|
||||
</div>
|
||||
<div>
|
||||
Tenant · {formatCellValue(details.tenant_id)}
|
||||
</div>
|
||||
<div>
|
||||
Device · {formatCellValue(row.device_id)}
|
||||
</div>
|
||||
<div>Tenant · {formatCellValue(details.tenant_id)}</div>
|
||||
<div>Device · {formatCellValue(row.device_id)}</div>
|
||||
</div>
|
||||
<div className="space-y-1">
|
||||
<div className="uppercase tracking-[0.16em]">
|
||||
@@ -451,7 +468,6 @@ function AuditLogsPage() {
|
||||
</div>
|
||||
</CardContent>
|
||||
</Card>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user