modify nav..
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
2026-07-13 16:55:40 +09:00
parent 09480540ec
commit be6509a4f6
8 changed files with 184 additions and 60 deletions
@@ -77,6 +77,11 @@ export function DeploymentManagementPage() {
const [releases, setReleases] = useState<AppRelease[]>([]);
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<DeploymentJob | null>(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) => <option key={release.id} value={release.id}>{release.app.name} {release.version}</option>)}
</select>
<input className="h-9 w-full rounded-md border border-input bg-background px-3 text-sm outline-none" value={namespace} disabled={deploying} onChange={(event) => setNamespace(event.target.value)} placeholder="stdo-lms" />
<div className="grid gap-3 md:grid-cols-2">
<label className="block">
<span className="text-xs font-medium text-muted-foreground">Replicas</span>
<input
className="mt-2 h-9 w-full rounded-md border border-input bg-background px-3 text-sm outline-none"
value={replicas}
disabled={deploying}
onChange={(event) => setReplicas(event.target.value)}
placeholder="1"
/>
</label>
<label className="block">
<span className="text-xs font-medium text-muted-foreground">CPU 요청</span>
<input
className="mt-2 h-9 w-full rounded-md border border-input bg-background px-3 text-sm outline-none"
value={cpuRequest}
disabled={deploying}
onChange={(event) => setCpuRequest(event.target.value)}
placeholder="예: 100m"
/>
</label>
</div>
<div className="grid gap-3 md:grid-cols-2">
<label className="block">
<span className="text-xs font-medium text-muted-foreground">CPU 상한</span>
<input
className="mt-2 h-9 w-full rounded-md border border-input bg-background px-3 text-sm outline-none"
value={cpuLimit}
disabled={deploying}
onChange={(event) => setCpuLimit(event.target.value)}
placeholder="예: 500m"
/>
</label>
<label className="block">
<span className="text-xs font-medium text-muted-foreground">메모리 요청</span>
<input
className="mt-2 h-9 w-full rounded-md border border-input bg-background px-3 text-sm outline-none"
value={memoryRequest}
disabled={deploying}
onChange={(event) => setMemoryRequest(event.target.value)}
placeholder="예: 256Mi"
/>
</label>
</div>
<label className="block">
<span className="text-xs font-medium text-muted-foreground">메모리 상한</span>
<input
className="mt-2 h-9 w-full rounded-md border border-input bg-background px-3 text-sm outline-none"
value={memoryLimit}
disabled={deploying}
onChange={(event) => setMemoryLimit(event.target.value)}
placeholder="예: 512Mi"
/>
</label>
<label className="flex items-center gap-2 rounded-md border border-border bg-muted/20 px-3 py-2 text-sm text-foreground">
<input
type="checkbox"