From be6509a4f61501908654d1036b55baa4afbacbcf Mon Sep 17 00:00:00 2001 From: chyoo Date: Mon, 13 Jul 2026 16:55:40 +0900 Subject: [PATCH] modify nav.. --- src/App.tsx | 24 ------ src/data/mock.ts | 10 --- src/layout/navigation.ts | 11 --- src/pages/RestoredPages.tsx | 9 --- .../applications/DeploymentManagementPage.tsx | 81 ++++++++++++++++++- src/pages/applications/application-api.ts | 16 +++- src/pages/launcher/LauncherVersionsPage.tsx | 81 ++++++++++++++++++- src/pages/launcher/launcher-api.ts | 12 ++- 8 files changed, 184 insertions(+), 60 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index fdf25ef..f62a504 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -60,10 +60,6 @@ import { AgentInstallStatusPage as AgentInstallStatusRestoredPage, AgentRegistrationPage as AgentRegistrationRestoredPage, AgentSshKeysPage as AgentSshKeysRestoredPage, - AgentWorkspacePage as AgentWorkspaceRestoredPage, - GatewayAgentsPage as GatewayAgentsRestoredPage, - GatewayDevicesPage as GatewayDevicesRestoredPage, - GatewayStatusPage as GatewayStatusRestoredPage, TailscaleAclPage as TailscaleAclRestoredPage, TailscaleRoutesPage as TailscaleRoutesRestoredPage, TailscaleStatusPage as TailscaleStatusRestoredPage @@ -90,9 +86,6 @@ type ViewKey = | 'appReleases' | 'appDeployments' | 'appMigrations' - | 'gatewayStatus' - | 'gatewayAgents' - | 'gatewayDevices' | 'tailscaleStatus' | 'tailscaleRoutes' | 'tailscaleAcl' @@ -104,7 +97,6 @@ type ViewKey = | 'agentRegistration' | 'agentInstallStatus' | 'agentSshKeys' - | 'agentWorkspace' | 'agentCommands' | 'runtimeConfig' | 'runtimeLogs' @@ -129,9 +121,6 @@ const viewByLabel: Record = { '실행 설정': 'runtimeConfig', '배포 관리': 'appDeployments', 마이그레이션: 'appMigrations', - '연결 상태': 'gatewayStatus', - 'Agent 관리': 'gatewayAgents', - '장비 동기화': 'gatewayDevices', '노드 현황': 'tailscaleStatus', 라우트: 'tailscaleRoutes', ACL: 'tailscaleAcl', @@ -143,7 +132,6 @@ const viewByLabel: Record = { '장비 등록': 'agentRegistration', '설치 상태': 'agentInstallStatus', 'SSH 키 배포': 'agentSshKeys', - 'Workspace 설정': 'agentWorkspace', '원격 명령': 'agentCommands', '로그/이벤트': 'runtimeLogs', '장비 제어': 'runtimeDeviceControl', @@ -174,9 +162,6 @@ const pathByView: Record = { appReleases: '/applications/releases', appDeployments: '/applications/deployments', appMigrations: '/applications/migrations', - gatewayStatus: '/gateway/status', - gatewayAgents: '/gateway/agents', - gatewayDevices: '/gateway/devices', tailscaleStatus: '/tailscale/status', tailscaleRoutes: '/tailscale/routes', tailscaleAcl: '/tailscale/acl', @@ -188,7 +173,6 @@ const pathByView: Record = { agentRegistration: '/agents/registration', agentInstallStatus: '/agents/install-status', agentSshKeys: '/agents/ssh-keys', - agentWorkspace: '/agents/workspace', agentCommands: '/agents/commands', runtimeConfig: '/applications/runtime-settings', runtimeLogs: '/runtime/logs', @@ -2325,12 +2309,6 @@ function App() { return ; case 'appMigrations': return ; - case 'gatewayStatus': - return ; - case 'gatewayAgents': - return ; - case 'gatewayDevices': - return ; case 'tailscaleStatus': return ; case 'tailscaleRoutes': @@ -2353,8 +2331,6 @@ function App() { return ; case 'agentSshKeys': return ; - case 'agentWorkspace': - return ; case 'agentCommands': return ; case 'runtimeConfig': diff --git a/src/data/mock.ts b/src/data/mock.ts index 18896eb..bb0a8d7 100644 --- a/src/data/mock.ts +++ b/src/data/mock.ts @@ -75,19 +75,9 @@ export const navGroups = [ { label: '장비 제어' }, { label: '설치 상태' }, { label: 'SSH 키 배포' }, - { label: 'Workspace 설정' }, { label: '원격 명령' } ] }, - { - label: '플랫폼 게이트웨이', - icon: ServerCog, - children: [ - { label: '연결 상태' }, - { label: 'Agent 관리' }, - { label: '장비 동기화' } - ] - }, { label: '인프라', icon: HardDrive, diff --git a/src/layout/navigation.ts b/src/layout/navigation.ts index 6ad08f8..772e87e 100644 --- a/src/layout/navigation.ts +++ b/src/layout/navigation.ts @@ -7,7 +7,6 @@ import { Megaphone, Network, Rocket, - ServerCog, ShieldCheck, Users } from 'lucide-react'; @@ -80,19 +79,9 @@ export const navGroups: NavGroup[] = [ { label: '장비 제어', path: '/runtime/devices' }, { label: '설치 상태', path: '/agents/install-status' }, { label: 'SSH 키 배포', path: '/agents/ssh-keys' }, - { label: 'Workspace 설정', path: '/agents/workspace' }, { label: '원격 명령', path: '/agents/commands' } ] }, - { - label: '플랫폼 게이트웨이', - icon: ServerCog, - children: [ - { label: '연결 상태', path: '/gateway/status' }, - { label: 'Agent 관리', path: '/gateway/agents' }, - { label: '장비 동기화', path: '/gateway/devices' } - ] - }, { label: '인프라', icon: HardDrive, diff --git a/src/pages/RestoredPages.tsx b/src/pages/RestoredPages.tsx index e518a64..9781717 100644 --- a/src/pages/RestoredPages.tsx +++ b/src/pages/RestoredPages.tsx @@ -879,15 +879,6 @@ export function AgentSshKeysPage() { ); } -export function AgentWorkspacePage() { - return ( - <> - - - - ); -} - export function AgentCommandsPage() { const columns = useMemo>>( () => [ diff --git a/src/pages/applications/DeploymentManagementPage.tsx b/src/pages/applications/DeploymentManagementPage.tsx index dd7f20a..8006e24 100644 --- a/src/pages/applications/DeploymentManagementPage.tsx +++ b/src/pages/applications/DeploymentManagementPage.tsx @@ -77,6 +77,11 @@ export function DeploymentManagementPage() { const [releases, setReleases] = useState([]); const [releaseId, setReleaseId] = useState(''); const [namespace, setNamespace] = useState(''); + const [replicas, setReplicas] = useState('1'); + const [cpuRequest, setCpuRequest] = useState('100m'); + const [cpuLimit, setCpuLimit] = useState('500m'); + const [memoryRequest, setMemoryRequest] = useState('128Mi'); + const [memoryLimit, setMemoryLimit] = useState('256Mi'); const [updateLauncherAppVersion, setUpdateLauncherAppVersion] = useState(true); const [deployModalOpen, setDeployModalOpen] = useState(false); const [selectedDeployment, setSelectedDeployment] = useState(null); @@ -158,6 +163,12 @@ export function DeploymentManagementPage() { setReleaseId(release.id); setNamespace(release.app.namespace || ''); } + if (!release && !releaseId && !releases[0]?.app?.namespace) setNamespace(''); + setReplicas('1'); + setCpuRequest('100m'); + setCpuLimit('500m'); + setMemoryRequest('128Mi'); + setMemoryLimit('256Mi'); setUpdateLauncherAppVersion(true); setDeployModalOpen(true); }; @@ -165,8 +176,22 @@ export function DeploymentManagementPage() { const deploy = async () => { if (deploying) return; setDeploying(true); + const requestedReplicas = Number.parseInt(replicas, 10); + const resources = { + ...(Number.isFinite(requestedReplicas) && requestedReplicas > 0 ? { replicas: requestedReplicas } : {}), + ...(cpuRequest.trim() ? { cpuRequest: cpuRequest.trim() } : {}), + ...(cpuLimit.trim() ? { cpuLimit: cpuLimit.trim() } : {}), + ...(memoryRequest.trim() ? { memoryRequest: memoryRequest.trim() } : {}), + ...(memoryLimit.trim() ? { memoryLimit: memoryLimit.trim() } : {}) + }; try { - const result = await createDeployment({ releaseId, environment: 'prod', namespace, updateLauncherAppVersion }); + const result = await createDeployment({ + releaseId, + environment: 'prod', + namespace, + updateLauncherAppVersion, + resources: Object.keys(resources).length ? resources : undefined + }); toast({ type: 'success', message: '배포 작업이 실행되었습니다.' }); setSelectedDeployment(result.deploymentJob); setDeployModalOpen(false); @@ -357,6 +382,60 @@ export function DeploymentManagementPage() { {deployableReleases.map((release) => )} setNamespace(event.target.value)} placeholder="stdo-lms" /> +
+ + +
+
+ + +
+