diff --git a/src/App.tsx b/src/App.tsx index 8b8992e..03e0489 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -483,7 +483,7 @@ function Sidebar({ const isParentActive = hasChildren ? item.children.some((child) => resolveNavView(child) === activeView) : activeView === resolveNavView(item); - const isMenuOpen = Boolean(normalizedMenuSearch) || openMenus[item.label] || isParentActive; + const isMenuOpen = Boolean(normalizedMenuSearch) || (openMenus[item.label] ?? isParentActive); return (
diff --git a/src/pages/launcher/LauncherBuildPage.tsx b/src/pages/launcher/LauncherBuildPage.tsx index 585e0c6..13f8675 100644 --- a/src/pages/launcher/LauncherBuildPage.tsx +++ b/src/pages/launcher/LauncherBuildPage.tsx @@ -269,7 +269,7 @@ export function LauncherBuildPage() {
-

클라이언트 빌드 환경변수

+

클라이언트 빌드 환경변수

저장 후 실행한 빌드부터 반영됩니다.

- + {tab === 'client' ? ( + + ) : ( + + )} } /> - {!loading && !launcher ? 등록된 런처 버전이 없습니다. : null} +
+ + +
- {launcher ? ( + {tab === 'client' && !loading && !launcher ? 등록된 런처 버전이 없습니다. : null} + + {tab === 'client' && launcher ? (
@@ -183,6 +233,59 @@ export function LauncherVersionsPage() {
) : null} + {tab === 'backend' ? ( +
+ + +
+
+
+

Namespace

+

{backendDeployment?.namespace || 'studio-system'}

+
+
+

Deployment

+

{backendDeployment?.deployment || 'studio-launcher-be'}

+
+
+

상태

+
+ {backendDeployment?.available ? '조회됨' : '조회 실패'} +
+
+
+
+

현재 배포 이미지

+

{backendDeployment?.currentImage || '-'}

+
+
+

최신 성공 빌드 이미지

+

{latestBackendBuild?.downloadUrl || '-'}

+
+ 버전 {latestBackendBuild?.version || '-'} + 브랜치 {latestBackendBuild?.branch || '-'} + 커밋 {latestBackendBuild?.commitSha || '-'} +
+
+
+ +
+
+
+ + +
+
+                {deployResult?.logs || '아직 이 화면에서 실행한 배포 로그가 없습니다.'}
+              
+
+
+
+ ) : null} + + setDeployOpen(false)} + footer={<>} + > +
+
+

최신 성공 빌드 이미지로 런처 백엔드를 배포합니다.

+

Deployment 이미지가 교체되고 rollout 완료까지 대기합니다.

+
+
+

배포 이미지

+

{latestBackendBuild?.downloadUrl || '-'}

+
+
+

현재 이미지

+

{backendDeployment?.currentImage || '-'}

+
+
+
+ ); diff --git a/src/pages/launcher/launcher-api.ts b/src/pages/launcher/launcher-api.ts index 43694d1..24b01e5 100644 --- a/src/pages/launcher/launcher-api.ts +++ b/src/pages/launcher/launcher-api.ts @@ -36,6 +36,25 @@ export type LauncherBuildJob = { updatedAt?: string; }; +export type LauncherBackendDeployment = { + namespace: string; + deployment: string; + container: string; + currentImage?: string | null; + available: boolean; + source?: LauncherSource['backend']; + latestBuild?: LauncherBuildJob | null; +}; + +export type LauncherBackendDeployResult = { + deployed: boolean; + namespace: string; + deployment: string; + container: string; + image: string; + logs: string; +}; + export type LauncherBuildEnvVariable = { key: string; value: string; @@ -199,6 +218,17 @@ export function listLauncherBuildJobs() { return apiRequest('/launcher/builds'); } +export function getLauncherBackendDeployment() { + return apiRequest('/launcher/backend-deployment'); +} + +export function deployLauncherBackend(image: string) { + return apiRequest('/launcher/backend-deployment', { + method: 'POST', + body: JSON.stringify({ image }) + }); +} + export function listLauncherBuildEnv() { return apiRequest<{ variables: LauncherBuildEnvVariable[] }>('/launcher/build-env'); }