From 420f2429c3e5dad2b74be961334376149c88f7ba Mon Sep 17 00:00:00 2001 From: kyy Date: Fri, 29 May 2026 15:15:09 +0900 Subject: [PATCH] =?UTF-8?q?adminfront=20=EC=A0=95=EC=A0=81=20=EC=84=9C?= =?UTF-8?q?=EB=B9=99=20=EA=B2=BD=EB=A1=9C=20=EC=88=98=EC=A0=95=20&=20devfr?= =?UTF-8?q?ont=20=EB=B9=8C=EB=93=9C=20=EC=98=A4=EB=A5=98=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adminfront/scripts/runtime-mode.sh | 1 + adminfront/vite.config.ts | 6 +++- devfront/src/features/clients/ClientsPage.tsx | 36 ++++++++++--------- .../features/overview/GlobalOverviewPage.tsx | 5 +-- 4 files changed, 27 insertions(+), 21 deletions(-) diff --git a/adminfront/scripts/runtime-mode.sh b/adminfront/scripts/runtime-mode.sh index 0f5cf3f3..481ae1ca 100644 --- a/adminfront/scripts/runtime-mode.sh +++ b/adminfront/scripts/runtime-mode.sh @@ -120,6 +120,7 @@ ensure_frontend_dependencies if [ "$mode" = "production" ]; then echo "Running in production mode with custom static server..." + export ADMINFRONT_BUILD_OUT_DIR="${ADMINFRONT_BUILD_OUT_DIR:-/tmp/baron-sso-adminfront-dist}" exec sh -c "npm run build && node ./scripts/serve-prod.mjs" fi diff --git a/adminfront/vite.config.ts b/adminfront/vite.config.ts index 43bb7a5e..4c6c9d57 100644 --- a/adminfront/vite.config.ts +++ b/adminfront/vite.config.ts @@ -2,7 +2,8 @@ import react from "@vitejs/plugin-react"; import path from "path"; import { defineConfig } from "vite"; -const buildOutDir = process.env.ADMINFRONT_BUILD_OUT_DIR ?? "dist"; +const buildOutDir = + process.env.ADMINFRONT_BUILD_OUT_DIR ?? "/tmp/baron-sso-adminfront-dist"; export default defineConfig({ plugins: [react()], @@ -11,6 +12,9 @@ export default defineConfig({ "lucide-react": path.resolve(process.cwd(), "node_modules/lucide-react"), }, }, + cacheDir: + process.env.ADMINFRONT_VITE_CACHE_DIR ?? + "/tmp/baron-sso-adminfront-vite-cache", envPrefix: ["VITE_", "USERFRONT_", "ORGFRONT_"], build: { outDir: buildOutDir, diff --git a/devfront/src/features/clients/ClientsPage.tsx b/devfront/src/features/clients/ClientsPage.tsx index d2ae9306..8828d222 100644 --- a/devfront/src/features/clients/ClientsPage.tsx +++ b/devfront/src/features/clients/ClientsPage.tsx @@ -1,8 +1,8 @@ import { useMutation, useQuery } from "@tanstack/react-query"; import type { AxiosError } from "axios"; import { - BookOpenText, Filter, + Info, Plus, Search, ShieldHalf, @@ -54,6 +54,7 @@ import { type DevAuditLog, fetchDevUser, fetchClients, + fetchDevAuditLogs, fetchDeveloperRequestStatus, fetchDevStats, fetchMyTenants, @@ -296,7 +297,9 @@ function ClientsPage() { } = useQuery({ queryKey: ["developer-request", tenantId], queryFn: () => fetchDeveloperRequestStatus(tenantId), - enabled: hasAccessToken && (profileRole === "user" || profileRole === "tenant_member"), + enabled: + hasAccessToken && + (profileRole === "user" || profileRole === "tenant_member"), }); const { data: tenants } = useQuery({ queryKey: ["myTenants"], @@ -363,8 +366,9 @@ function ClientsPage() { .flat() .filter( (item, index, self) => - self.findIndex((candidate) => candidate.event_id === item.event_id) === - index, + self.findIndex( + (candidate) => candidate.event_id === item.event_id, + ) === index, ) .sort( (left, right) => @@ -508,7 +512,8 @@ function ClientsPage() { .filter((item): item is RecentClientChange => Boolean(item)) .sort( (left, right) => - new Date(right.timestamp).getTime() - new Date(left.timestamp).getTime(), + new Date(right.timestamp).getTime() - + new Date(left.timestamp).getTime(), ); }, [clients, recentAuditData?.items]); @@ -548,7 +553,8 @@ function ClientsPage() { }, [recentClientActors, recentClientChanges]); const recentChangedClientCount = useMemo(() => { - return new Set(recentClientChangesWithActors.map((item) => item.clientId)).size; + return new Set(recentClientChangesWithActors.map((item) => item.clientId)) + .size; }, [recentClientChangesWithActors]); const visibleRecentClientChanges = useMemo(() => { @@ -572,10 +578,7 @@ function ClientsPage() { ), ); } - }, [ - recentClientChangesWithActors.length, - visibleRecentClientChangesCount, - ]); + }, [recentClientChangesWithActors.length, visibleRecentClientChangesCount]); const isLoading = isLoadingClients || @@ -1046,7 +1049,7 @@ function ClientsPage() { - +
@@ -1145,9 +1148,7 @@ function ClientsPage() { {item.clientId} - - {item.actorName} - + {item.actorName} {item.actorId} @@ -1155,8 +1156,11 @@ function ClientsPage() {
{item.detailLabels.length > 0 ? ( - item.detailLabels.map((detail, index) => ( - + item.detailLabels.map((detail) => ( + {detail.label}: {detail.value} )) diff --git a/devfront/src/features/overview/GlobalOverviewPage.tsx b/devfront/src/features/overview/GlobalOverviewPage.tsx index a3741a3f..44925543 100644 --- a/devfront/src/features/overview/GlobalOverviewPage.tsx +++ b/devfront/src/features/overview/GlobalOverviewPage.tsx @@ -21,7 +21,6 @@ import { useDeveloperAccessGate } from "../developer-access/developerAccessGate" import { type ClientSummary, fetchClients, - fetchDeveloperRequestStatus, fetchDevRPUsageDaily, fetchDevStats, type RPUsageDailyMetric, @@ -611,9 +610,7 @@ function GlobalOverviewPage() { setSelectedClientIds([]); }; - if ( - isLoadingDeveloperAccessGate - ) { + if (isLoadingDeveloperAccessGate) { return (
{t("ui.common.loading", "Loading...")}