refine app management and source repository displays
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
@@ -73,12 +73,12 @@ function getTone(status: string) {
|
||||
return 'neutral';
|
||||
}
|
||||
|
||||
function formatStatus(status?: string | null) {
|
||||
function formatStatus(status?: string | null, launcherLinked?: boolean) {
|
||||
if (status === 'DISABLED' || status === 'INACTIVE') return '비활성';
|
||||
if (launcherLinked) return '활성';
|
||||
const statusMap: Record<string, string> = {
|
||||
ACTIVE: '준비됨',
|
||||
ACTIVE: '활성',
|
||||
READY: '준비됨',
|
||||
INACTIVE: '비활성',
|
||||
DISABLED: '비활성',
|
||||
ERROR: '오류'
|
||||
};
|
||||
|
||||
@@ -906,7 +906,9 @@ export function AppManagementPage() {
|
||||
<td className="px-5 py-3">{app.name}</td>
|
||||
<td className="px-5 py-3 text-muted-foreground">{app.namespace || '-'}</td>
|
||||
<td className="px-5 py-3">{app.components?.length ?? 0}</td>
|
||||
<td className="px-5 py-3"><Badge tone={getTone(app.status)}>{formatStatus(app.status)}</Badge></td>
|
||||
<td className="px-5 py-3">
|
||||
<Badge tone={getTone(formatStatus(app.status, app.launcherLinked))}>{formatStatus(app.status, app.launcherLinked)}</Badge>
|
||||
</td>
|
||||
<td className="px-5 py-3">
|
||||
<div className="flex justify-end">
|
||||
<Button
|
||||
@@ -952,7 +954,7 @@ export function AppManagementPage() {
|
||||
['네임스페이스', selectedApp.namespace],
|
||||
['연결 소스', `${linkedComponents}개`],
|
||||
['구성요소', `${totalComponents}개`],
|
||||
['상태', formatStatus(selectedApp.status)]
|
||||
['상태', formatStatus(selectedApp.status, selectedApp.launcherLinked)]
|
||||
].map(([label, value]) => (
|
||||
<div key={label} className="rounded-md border border-border bg-muted/20 p-4">
|
||||
<p className="text-xs text-muted-foreground">{label}</p>
|
||||
@@ -1008,7 +1010,6 @@ export function AppManagementPage() {
|
||||
<span className="inline-flex items-center gap-2">
|
||||
<span className={cn('size-2.5 shrink-0 rounded-full', running ? statusDotToneClass('green') : component.repository ? statusDotToneClass('blue') : statusDotToneClass('neutral'))} />
|
||||
{component.name}
|
||||
{running ? <Badge tone="green">실행 중</Badge> : null}
|
||||
</span>
|
||||
</td>
|
||||
<td className="px-5 py-3 text-muted-foreground">{imageSourceLabel}</td>
|
||||
@@ -1091,7 +1092,6 @@ export function AppManagementPage() {
|
||||
<span className="inline-flex items-center gap-2">
|
||||
<span className={cn('block size-2.5 shrink-0 rounded-full', stopped ? statusDotToneClass('neutral') : runtimeStatusDotClass(resource.status))} />
|
||||
<span className="text-sm text-foreground">{resource.name}</span>
|
||||
<Badge tone={runtimeStatusTone(resource, stopped)}>{runtimeStatusLabel(resource, stopped)}</Badge>
|
||||
</span>
|
||||
</td>
|
||||
<td className="px-5 py-3 text-foreground">{resource.kind}</td>
|
||||
|
||||
Reference in New Issue
Block a user