1
0
forked from baron/baron-sso

adminfront에 API Key 관리 및 RBAC 기능 추가

This commit is contained in:
2026-01-28 17:13:53 +09:00
parent 3e95650024
commit df03771121
9 changed files with 548 additions and 14 deletions

View File

@@ -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>
);