1
0
forked from baron/baron-sso

누락 키 수정 및 린트 적용

This commit is contained in:
2026-05-12 18:04:41 +09:00
parent 878867f6cc
commit 298b919d1a
4 changed files with 67 additions and 66 deletions

View File

@@ -139,13 +139,12 @@ function summarizeSeries(rows: RPUsageDailyMetric[]): SeriesSummary[] {
); );
bySeries.set(key, current); bySeries.set(key, current);
} }
return Array.from(bySeries.values()) return Array.from(bySeries.values()).sort(
.sort( (left, right) =>
(left, right) => right.loginRequests +
right.loginRequests + right.otherRequests -
right.otherRequests - (left.loginRequests + left.otherRequests),
(left.loginRequests + left.otherRequests), );
);
} }
function buildMultiLineSeries(rows: RPUsageDailyMetric[]): MultiLineSeries[] { function buildMultiLineSeries(rows: RPUsageDailyMetric[]): MultiLineSeries[] {
@@ -427,40 +426,39 @@ function RPUsageMixedChart({
</div> </div>
<div className="flex flex-wrap gap-x-4 gap-y-1 text-xs text-muted-foreground"> <div className="flex flex-wrap gap-x-4 gap-y-1 text-xs text-muted-foreground">
<span> <span>{t("ui.dev.dashboard.chart.x_axis", "X축: 기간")}</span>
{t("ui.dev.dashboard.chart.x_axis", "X축: 기간")} <span>{t("ui.dev.dashboard.chart.y_axis", "Y축: 로그인 요청 수")}</span>
</span>
<span>
{t("ui.dev.dashboard.chart.y_axis", "Y축: 로그인 요청 수")}
</span>
</div> </div>
{multiLinePoints && multiLinePoints.length > 0 ? ( {multiLinePoints && multiLinePoints.length > 0 ? (
<div className="grid gap-x-6 gap-y-2 border-t border-border/60 pt-2 text-xs md:grid-cols-2 xl:grid-cols-3"> <div className="grid gap-x-6 gap-y-2 border-t border-border/60 pt-2 text-xs md:grid-cols-2 xl:grid-cols-3">
{multiLinePoints.map((item) => ( {multiLinePoints.map((item) => {
<div const seriesItem = seriesByKey.get(item.key);
key={item.key} return (
className="flex min-w-0 flex-wrap items-center gap-x-3 gap-y-1" <div
> key={item.key}
<span className="flex min-w-0 flex-wrap items-center gap-x-3 gap-y-1"
className="h-2.5 w-2.5 rounded-full" >
style={{ backgroundColor: item.color.line }} <span
/> className="h-2.5 w-2.5 rounded-full"
<span className="font-medium">{item.clientLabel}</span> style={{ backgroundColor: item.color.line }}
{seriesByKey.get(item.key) ? ( />
<span className="whitespace-nowrap tabular-nums text-muted-foreground"> <span className="font-medium">{item.clientLabel}</span>
{t( {seriesItem ? (
"ui.dev.dashboard.chart.series", <span className="whitespace-nowrap tabular-nums text-muted-foreground">
"로그인 {{login}} / 사용자 {{subjects}}", {t(
{ "ui.dev.dashboard.chart.series",
login: seriesByKey.get(item.key)!.loginRequests.toLocaleString(), "로그인 {{login}} / 사용자 {{subjects}}",
subjects: seriesByKey.get(item.key)!.uniqueSubjects.toLocaleString(), {
}, login: seriesItem.loginRequests.toLocaleString(),
)} subjects: seriesItem.uniqueSubjects.toLocaleString(),
</span> },
) : null} )}
</div> </span>
))} ) : null}
</div>
);
})}
</div> </div>
) : topSeries.length > 0 ? ( ) : topSeries.length > 0 ? (
<div className="grid gap-x-6 gap-y-2 border-t border-border/60 pt-2 text-xs md:grid-cols-2 xl:grid-cols-3"> <div className="grid gap-x-6 gap-y-2 border-t border-border/60 pt-2 text-xs md:grid-cols-2 xl:grid-cols-3">
@@ -498,10 +496,7 @@ function DashboardPage() {
const [period, setPeriod] = useState<RPUsagePeriod>("day"); const [period, setPeriod] = useState<RPUsagePeriod>("day");
const [selectedClientIds, setSelectedClientIds] = useState<string[]>([]); const [selectedClientIds, setSelectedClientIds] = useState<string[]>([]);
const usageDays = period === "day" ? 14 : period === "week" ? 84 : 90; const usageDays = period === "day" ? 14 : period === "week" ? 84 : 90;
const { const { data: requestStatus, isLoading: isLoadingRequestStatus } = useQuery({
data: requestStatus,
isLoading: isLoadingRequestStatus,
} = useQuery({
queryKey: ["developer-request", tenantId], queryKey: ["developer-request", tenantId],
queryFn: () => fetchDeveloperRequestStatus(tenantId), queryFn: () => fetchDeveloperRequestStatus(tenantId),
enabled: hasAccessToken && role === "user", enabled: hasAccessToken && role === "user",
@@ -625,10 +620,7 @@ function DashboardPage() {
setSelectedClientIds([]); setSelectedClientIds([]);
}; };
if ( if ((role === "user" || role === "tenant_member") && isLoadingRequestStatus) {
(role === "user" || role === "tenant_member") &&
isLoadingRequestStatus
) {
return ( return (
<div className="p-8 text-center"> <div className="p-8 text-center">
{t("ui.common.loading", "Loading...")} {t("ui.common.loading", "Loading...")}
@@ -672,14 +664,8 @@ function DashboardPage() {
onClick={() => navigate("/developer-requests")} onClick={() => navigate("/developer-requests")}
> >
{isDeveloperRequestPending {isDeveloperRequestPending
? t( ? t("ui.dev.nav.developer_request", "개발자 권한 신청")
"ui.dev.nav.developer_request", : t("ui.dev.welcome.btn_request", "개발자 등록 신청하기")}
"개발자 권한 신청",
)
: t(
"ui.dev.welcome.btn_request",
"개발자 등록 신청하기",
)}
</button> </button>
)} )}
</div> </div>

View File

@@ -553,6 +553,10 @@ openid = "Openid"
profile = "Profile" profile = "Profile"
[msg.dev.dashboard] [msg.dev.dashboard]
access_denied = "Overview is available only to users with developer access."
access_denied_detail = "Submit a request on the developer access page and wait for approval."
access_pending = "Your developer access request is under review."
access_pending_detail = "You can use the overview and developer features after a super admin approves it."
description = "Review RP composition and authentication operations in one place." description = "Review RP composition and authentication operations in one place."
[msg.dev.dashboard.hero] [msg.dev.dashboard.hero]
@@ -2210,21 +2214,21 @@ registry = "RP registry"
rp_synced = "RP registry synced" rp_synced = "RP registry synced"
[ui.dev.dashboard.distribution] [ui.dev.dashboard.distribution]
headless = "Headless Login" headless_hint = "{{count}} with Headless Login enabled"
pkce = "PKCE" pkce = "PKCE"
private = "Server side App" private = "Server side App"
title = "Application Distribution" title = "Application Distribution"
[ui.dev.dashboard.chart] [ui.dev.dashboard.chart]
x_axis = "X-axis: Period"
y_axis = "Y-axis: Login requests"
aria = "RP request overview" aria = "RP request overview"
filter_all = "All" filter_all = "All"
login_requests = "Login requests"
other_requests = "Other requests"
period_day = "Day" period_day = "Day"
period_month = "Month" period_month = "Month"
period_week = "Week" period_week = "Week"
series = "Login {{login}} / Other {{other}} / Users {{subjects}}" series = "Login {{login}} / Users {{subjects}}"
title = "Login and other requests by application" title = "Login requests by application"
[ui.dev.dashboard.next] [ui.dev.dashboard.next]
subtitle = "Ship the RP controls" subtitle = "Ship the RP controls"
@@ -2267,6 +2271,7 @@ plane = "Dev Plane"
subtitle = "Manage your applications" subtitle = "Manage your applications"
[ui.dev.nav] [ui.dev.nav]
overview = "Overview"
clients = "Connected Application" clients = "Connected Application"
logout = "Logout" logout = "Logout"
developer_request = "Developer Access Request" developer_request = "Developer Access Request"

View File

@@ -405,6 +405,7 @@ pending = "준비 중"
success = "성공" success = "성공"
[ui.dev.nav] [ui.dev.nav]
overview = "개요"
clients = "연동 앱" clients = "연동 앱"
logout = "로그아웃" logout = "로그아웃"
developer_request = "개발자 권한 신청" developer_request = "개발자 권한 신청"
@@ -1044,6 +1045,10 @@ openid = "OIDC 인증 필수 스코프"
profile = "기본 프로필 정보 접근" profile = "기본 프로필 정보 접근"
[msg.dev.dashboard] [msg.dev.dashboard]
access_denied = "개요는 개발자 권한이 있어야 볼 수 있습니다."
access_denied_detail = "개발자 권한 신청 페이지에서 신청을 등록한 뒤 승인을 받아주세요."
access_pending = "개발자 권한 신청을 검토 중입니다."
access_pending_detail = "super admin이 승인하면 개요와 개발자 기능을 사용할 수 있습니다."
description = "연동 앱 구성과 인증 운영 지표를 한 곳에서 확인합니다." description = "연동 앱 구성과 인증 운영 지표를 한 곳에서 확인합니다."
[msg.dev.dashboard.hero] [msg.dev.dashboard.hero]
@@ -2672,21 +2677,21 @@ registry = "RP registry"
rp_synced = "RP registry synced" rp_synced = "RP registry synced"
[ui.dev.dashboard.distribution] [ui.dev.dashboard.distribution]
headless = "Headless Login" headless_hint = "이 중 Headless Login 사용 {{count}}"
pkce = "PKCE" pkce = "PKCE"
private = "Server side App" private = "Server side App"
title = "애플리케이션 구성 요약" title = "애플리케이션 구성 요약"
[ui.dev.dashboard.chart] [ui.dev.dashboard.chart]
x_axis = "X축: 기간"
y_axis = "Y축: 로그인 요청 수"
aria = "RP 요청 현황" aria = "RP 요청 현황"
filter_all = "전체" filter_all = "전체"
login_requests = "로그인 요청"
other_requests = "기타 요청"
period_day = "일" period_day = "일"
period_month = "월" period_month = "월"
period_week = "주" period_week = "주"
series = "로그인 {{login}} / 기타 {{other}} / 사용자 {{subjects}}" series = "로그인 {{login}} / 사용자 {{subjects}}"
title = "애플리케이션별 로그인요청/기타 요청 현황" title = "애플리케이션별 로그인 요청 현황"
[ui.dev.dashboard.next] [ui.dev.dashboard.next]
subtitle = "Ship the RP controls" subtitle = "Ship the RP controls"

View File

@@ -908,6 +908,10 @@ openid = ""
profile = "" profile = ""
[msg.dev.dashboard] [msg.dev.dashboard]
access_denied = ""
access_denied_detail = ""
access_pending = ""
access_pending_detail = ""
description = "" description = ""
[msg.dev.dashboard.hero] [msg.dev.dashboard.hero]
@@ -2551,16 +2555,16 @@ registry = ""
rp_synced = "" rp_synced = ""
[ui.dev.dashboard.distribution] [ui.dev.dashboard.distribution]
headless = "" headless_hint = ""
pkce = "" pkce = ""
private = "" private = ""
title = "" title = ""
[ui.dev.dashboard.chart] [ui.dev.dashboard.chart]
x_axis = ""
y_axis = ""
aria = "" aria = ""
filter_all = "" filter_all = ""
login_requests = ""
other_requests = ""
period_day = "" period_day = ""
period_month = "" period_month = ""
period_week = "" period_week = ""
@@ -2608,6 +2612,7 @@ plane = ""
subtitle = "" subtitle = ""
[ui.dev.nav] [ui.dev.nav]
overview = ""
clients = "" clients = ""
logout = "" logout = ""