From 0327409631312cb64272715c8cb0ccb14ebcf70b Mon Sep 17 00:00:00 2001 From: kyy Date: Thu, 14 May 2026 17:01:50 +0900 Subject: [PATCH] =?UTF-8?q?devfront:=20=EA=B0=9C=EC=9A=94=20=ED=8E=98?= =?UTF-8?q?=EC=9D=B4=EC=A7=80=20=EA=B2=BD=EB=A1=9C=EC=99=80=20=EB=A0=88?= =?UTF-8?q?=EC=9D=B4=EC=95=84=EC=9B=83=20=EC=A0=95=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- devfront/src/app/routes.tsx | 4 +- .../GlobalOverviewPage.tsx} | 79 ++++++------------- devfront/src/locales/en.toml | 5 -- devfront/src/locales/ko.toml | 5 -- devfront/src/locales/template.toml | 5 -- 5 files changed, 26 insertions(+), 72 deletions(-) rename devfront/src/features/{dashboard/DashboardPage.tsx => overview/GlobalOverviewPage.tsx} (93%) diff --git a/devfront/src/app/routes.tsx b/devfront/src/app/routes.tsx index acaed7b2..685e2bf4 100644 --- a/devfront/src/app/routes.tsx +++ b/devfront/src/app/routes.tsx @@ -9,7 +9,7 @@ import ClientDetailsPage from "../features/clients/ClientDetailsPage"; import ClientGeneralPage from "../features/clients/ClientGeneralPage"; import ClientRelationsPage from "../features/clients/ClientRelationsPage"; import ClientsPage from "../features/clients/ClientsPage"; -import DashboardPage from "../features/dashboard/DashboardPage"; +import GlobalOverviewPage from "../features/overview/GlobalOverviewPage"; import DeveloperRequestPage from "../features/developer-request/DeveloperRequestPage"; import ProfilePage from "../features/profile/ProfilePage"; import { DEVFRONT_AUTH_CALLBACK_PATH } from "../lib/authConfig"; @@ -30,7 +30,7 @@ export const devFrontRoutes: RouteObject[] = [ { element: , children: [ - { index: true, element: }, + { index: true, element: }, { path: "clients", element: }, { path: "clients/new", element: }, { path: "clients/:id", element: }, diff --git a/devfront/src/features/dashboard/DashboardPage.tsx b/devfront/src/features/overview/GlobalOverviewPage.tsx similarity index 93% rename from devfront/src/features/dashboard/DashboardPage.tsx rename to devfront/src/features/overview/GlobalOverviewPage.tsx index 3c1bc14e..9ff5e851 100644 --- a/devfront/src/features/dashboard/DashboardPage.tsx +++ b/devfront/src/features/overview/GlobalOverviewPage.tsx @@ -8,7 +8,7 @@ import { Layers3, ShieldCheck, } from "lucide-react"; -import { type ReactNode, useMemo, useState } from "react"; +import { useMemo, useState } from "react"; import { useAuth } from "react-oidc-context"; import { useNavigate } from "react-router-dom"; import { @@ -22,6 +22,11 @@ import { } from "../../lib/devApi"; import { t } from "../../lib/i18n"; import { resolveProfileRole } from "../../lib/role"; +import { + OverviewAxisNotes, + OverviewMetric, + OverviewSelectionChips, +} from "../../../../common/core/components/overview"; type ClientDistribution = { activeClients: number; @@ -261,24 +266,6 @@ function formatMetric(value: number | undefined) { return value === undefined ? "-" : value.toLocaleString(); } -function OverviewMetric({ - icon, - label, - value, -}: { - icon: ReactNode; - label: string; - value: string; -}) { - return ( - - {icon} - {label} - {value} - - ); -} - function RPUsageMixedChart({ period, rows, @@ -425,10 +412,10 @@ function RPUsageMixedChart({ -
- {t("ui.dev.dashboard.chart.x_axis", "X축: 기간")} - {t("ui.dev.dashboard.chart.y_axis", "Y축: 로그인 요청 수")} -
+ {multiLinePoints && multiLinePoints.length > 0 ? (
@@ -486,7 +473,7 @@ function RPUsageMixedChart({ ); } -function DashboardPage() { +function GlobalOverviewPage() { const navigate = useNavigate(); const auth = useAuth(); const hasAccessToken = Boolean(auth.user?.access_token); @@ -633,7 +620,7 @@ function DashboardPage() {

- {t("ui.dev.dashboard.title", "대시보드")} + {t("ui.common.overview.title", "운영 현황")}

{isDeveloperRequestPending @@ -678,7 +665,7 @@ function DashboardPage() {

- {t("ui.dev.dashboard.title", "Dashboard")} + {t("ui.common.overview.title", "운영 현황")}

{t( @@ -736,9 +723,9 @@ function DashboardPage() {

{[ - ["day", t("ui.dev.dashboard.chart.period_day", "일")], - ["week", t("ui.dev.dashboard.chart.period_week", "주")], - ["month", t("ui.dev.dashboard.chart.period_month", "월")], + ["day", t("ui.common.chart.period.day", "일")], + ["week", t("ui.common.chart.period.week", "주")], + ["month", t("ui.common.chart.period.month", "월")], ].map(([value, label]) => (
-
- - {clientFilterOptions.map((client) => ( - - ))} -
+ {usageQuery.isError ? (
{usageErrorText}
@@ -910,4 +879,4 @@ function DashboardPage() { ); } -export default DashboardPage; +export default GlobalOverviewPage; diff --git a/devfront/src/locales/en.toml b/devfront/src/locales/en.toml index 008f3bd5..887b2a0b 100644 --- a/devfront/src/locales/en.toml +++ b/devfront/src/locales/en.toml @@ -967,7 +967,6 @@ start_import = "Start Import" [ui.admin.overview] kicker = "Global Overview" -title = "Tenant-independent control plane" [ui.admin.overview.playbook] title = "Admin playbook" @@ -1658,7 +1657,6 @@ private_headless = "Server side App (Headless Login)" [ui.dev.dashboard] ready_badge = "devfront ready" -title = "Dashboard" [ui.dev.dashboard.badge] consent_guard = "Consent guard ready" @@ -1676,9 +1674,6 @@ title = "Application Distribution" [ui.dev.dashboard.chart] aria = "RP request overview" filter_all = "All" -period_day = "Day" -period_month = "Month" -period_week = "Week" series = "Login {{login}} / Users {{subjects}}" title = "Login requests by application" x_axis = "X-axis: Period" diff --git a/devfront/src/locales/ko.toml b/devfront/src/locales/ko.toml index 460be974..cfddfa8a 100644 --- a/devfront/src/locales/ko.toml +++ b/devfront/src/locales/ko.toml @@ -967,7 +967,6 @@ start_import = "임포트 시작" [ui.admin.overview] kicker = "Global Overview" -title = "Tenant-independent control plane" [ui.admin.overview.playbook] title = "Admin playbook" @@ -1657,7 +1656,6 @@ private_headless = "Server side App (Headless Login)" [ui.dev.dashboard] ready_badge = "devfront ready" -title = "대시보드" [ui.dev.dashboard.badge] consent_guard = "Consent guard ready" @@ -1675,9 +1673,6 @@ title = "애플리케이션 구성 요약" [ui.dev.dashboard.chart] aria = "RP 요청 현황" filter_all = "전체" -period_day = "일" -period_month = "월" -period_week = "주" series = "로그인 {{login}} / 사용자 {{subjects}}" title = "애플리케이션별 로그인 요청 현황" x_axis = "X축: 기간" diff --git a/devfront/src/locales/template.toml b/devfront/src/locales/template.toml index e2eca1fb..5be16834 100644 --- a/devfront/src/locales/template.toml +++ b/devfront/src/locales/template.toml @@ -1006,7 +1006,6 @@ start_import = "" [ui.admin.overview] kicker = "" -title = "" [ui.admin.overview.playbook] title = "" @@ -1714,7 +1713,6 @@ private_headless = "" [ui.dev.dashboard] ready_badge = "" -title = "" [ui.dev.dashboard.badge] consent_guard = "" @@ -1732,9 +1730,6 @@ title = "" [ui.dev.dashboard.chart] aria = "" filter_all = "" -period_day = "" -period_month = "" -period_week = "" series = "" title = "" x_axis = ""