1
0
forked from baron/baron-sso

dev 병합 code-check 오류 수정

This commit is contained in:
2026-05-12 13:08:29 +09:00
parent 6709bf3029
commit 7259c62251
18 changed files with 87 additions and 135 deletions

View File

@@ -129,7 +129,10 @@ function summarizeSeries(rows: RPUsageDailyMetric[]): SeriesSummary[] {
} satisfies SeriesSummary);
current.loginRequests += row.loginRequests;
current.otherRequests += row.otherRequests;
current.uniqueSubjects = Math.max(current.uniqueSubjects, row.uniqueSubjects);
current.uniqueSubjects = Math.max(
current.uniqueSubjects,
row.uniqueSubjects,
);
bySeries.set(key, current);
}
return Array.from(bySeries.values())
@@ -153,12 +156,10 @@ function buildMultiLineSeries(rows: RPUsageDailyMetric[]): MultiLineSeries[] {
>();
for (const row of rows) {
const current =
byClient.get(row.clientId) ??
{
clientLabel: row.clientName || row.clientId,
byDate: new Map<string, DailyPoint>(),
};
const current = byClient.get(row.clientId) ?? {
clientLabel: row.clientName || row.clientId,
byDate: new Map<string, DailyPoint>(),
};
const point =
current.byDate.get(row.date) ??
({
@@ -173,7 +174,9 @@ function buildMultiLineSeries(rows: RPUsageDailyMetric[]): MultiLineSeries[] {
}
return Array.from(byClient.entries())
.sort((left, right) => left[1].clientLabel.localeCompare(right[1].clientLabel))
.sort((left, right) =>
left[1].clientLabel.localeCompare(right[1].clientLabel),
)
.map(([clientId, entry], index) => ({
key: clientId,
clientLabel: entry.clientLabel,
@@ -307,10 +310,7 @@ function RPUsageMixedChart({
if (daily.length === 0) {
return (
<div className="flex min-h-[210px] items-center justify-center text-sm text-muted-foreground">
{t(
"msg.dev.dashboard.chart.empty",
"표시할 RP 이용 집계가 없습니다.",
)}
{t("msg.dev.dashboard.chart.empty", "표시할 RP 이용 집계가 없습니다.")}
</div>
);
}
@@ -477,11 +477,15 @@ function RPUsageMixedChart({
<div key={item.key} className="flex min-w-0 items-center gap-2">
<span className="truncate font-medium">{item.clientLabel}</span>
<span className="ml-auto whitespace-nowrap tabular-nums">
{t("ui.dev.dashboard.chart.series", "로그인 {{login}} / 기타 {{other}} / 사용자 {{subjects}}", {
login: item.loginRequests.toLocaleString(),
other: item.otherRequests.toLocaleString(),
subjects: item.uniqueSubjects.toLocaleString(),
})}
{t(
"ui.dev.dashboard.chart.series",
"로그인 {{login}} / 기타 {{other}} / 사용자 {{subjects}}",
{
login: item.loginRequests.toLocaleString(),
other: item.otherRequests.toLocaleString(),
subjects: item.uniqueSubjects.toLocaleString(),
},
)}
</span>
</div>
))}
@@ -582,9 +586,11 @@ function DashboardPage() {
"msg.dev.dashboard.chart.unavailable_with_reason",
"RP 이용 통계 API 응답을 확인할 수 없습니다. {{reason}}",
{
reason: usageErrorMessage || t("err.common.unknown", "알 수 없는 오류"),
reason:
usageErrorMessage ||
t("err.common.unknown", "알 수 없는 오류"),
},
);
);
const isAllClientsSelected = selectedClientIds.length === 0;
const toggleClientSelection = (clientId: string) => {
@@ -712,9 +718,7 @@ function DashboardPage() {
</div>
{usageQuery.isError ? (
<div className="text-sm text-muted-foreground">
{usageErrorText}
</div>
<div className="text-sm text-muted-foreground">{usageErrorText}</div>
) : isAllClientsSelected ? (
<RPUsageMixedChart rows={filteredUsageRows} period={period} />
) : (
@@ -762,10 +766,7 @@ function DashboardPage() {
</div>
<div className="rounded-xl border border-border/60 bg-secondary/30 p-4">
<p className="text-sm text-muted-foreground">
{t(
"ui.dev.dashboard.distribution.headless",
"Headless Login",
)}
{t("ui.dev.dashboard.distribution.headless", "Headless Login")}
</p>
<p className="mt-2 text-2xl font-semibold tabular-nums">
{distribution.headlessClients.toLocaleString()}
@@ -817,10 +818,7 @@ function DashboardPage() {
"Server side App (Headless Login)",
)
: client.type === "private"
? t(
"ui.dev.clients.type.private",
"Server side App",
)
? t("ui.dev.clients.type.private", "Server side App")
: t("ui.dev.clients.type.pkce", "PKCE")}
</p>
<p>