@@ -92,6 +92,7 @@ export function BuildManagementPage() {
|
||||
const [branch, setBranch] = useState('develop');
|
||||
const [commitSha, setCommitSha] = useState('');
|
||||
const [selectedJob, setSelectedJob] = useState<BuildJob | null>(null);
|
||||
const [confirmOpen, setConfirmOpen] = useState(false);
|
||||
const [loading, setLoading] = useState(false);
|
||||
const [page, setPage] = useState(1);
|
||||
const [range, setRange] = useState<BuildRange>('week');
|
||||
@@ -199,6 +200,7 @@ export function BuildManagementPage() {
|
||||
const startBuild = async () => {
|
||||
if (!selectedComponent) return;
|
||||
try {
|
||||
setConfirmOpen(false);
|
||||
const result = await createBuildJob({ componentId: selectedComponent.id, branch, commitSha });
|
||||
toast({ type: 'success', message: '빌드 작업이 생성되었습니다.' });
|
||||
setSelectedJob(result.buildJob);
|
||||
@@ -300,7 +302,7 @@ export function BuildManagementPage() {
|
||||
<span className="text-muted-foreground">예상 결과물</span>
|
||||
<span className="truncate font-medium">{predicted}</span>
|
||||
</div>
|
||||
<Button className="mt-1 h-8 px-3 text-[13px]" onClick={startBuild} disabled={!selectedComponent || appsLoading || loading}>
|
||||
<Button className="mt-1 h-8 px-3 text-[13px]" onClick={() => setConfirmOpen(true)} disabled={!selectedComponent || appsLoading || loading}>
|
||||
<Play className="size-4" />
|
||||
빌드 실행
|
||||
</Button>
|
||||
@@ -441,6 +443,53 @@ export function BuildManagementPage() {
|
||||
</div>
|
||||
)}
|
||||
</Modal>
|
||||
<Modal
|
||||
open={confirmOpen}
|
||||
title="빌드 실행 확인"
|
||||
onClose={() => {
|
||||
if (!loading) setConfirmOpen(false);
|
||||
}}
|
||||
footer={
|
||||
<>
|
||||
<Button variant="outline" disabled={loading} onClick={() => setConfirmOpen(false)}>취소</Button>
|
||||
<Button disabled={!selectedComponent || appsLoading || loading} onClick={startBuild}>
|
||||
<Play className="size-4" />
|
||||
실행
|
||||
</Button>
|
||||
</>
|
||||
}
|
||||
>
|
||||
<div className="space-y-3 text-sm">
|
||||
<div className="rounded-md border border-border bg-muted/20 px-4 py-3">
|
||||
<p className="font-medium">{selectedComponent?.name ?? '-'} 구성요소 빌드를 실행합니다.</p>
|
||||
<p className="mt-1 text-xs leading-5 text-muted-foreground">
|
||||
실행 후 빌드 작업이 생성되고, 작업 목록에서 진행 상태와 로그를 확인할 수 있습니다.
|
||||
</p>
|
||||
</div>
|
||||
<div className="grid gap-2 rounded-md border border-border bg-background p-4">
|
||||
<div className="flex items-center justify-between gap-4">
|
||||
<span className="text-muted-foreground">앱</span>
|
||||
<span className="truncate font-medium">{selectedApp?.name ?? '-'}</span>
|
||||
</div>
|
||||
<div className="flex items-center justify-between gap-4">
|
||||
<span className="text-muted-foreground">저장소</span>
|
||||
<span className="truncate font-medium">{selectedComponent?.repository || '-'}</span>
|
||||
</div>
|
||||
<div className="flex items-center justify-between gap-4">
|
||||
<span className="text-muted-foreground">브랜치</span>
|
||||
<span className="font-medium">{branch}</span>
|
||||
</div>
|
||||
<div className="flex items-center justify-between gap-4">
|
||||
<span className="text-muted-foreground">커밋</span>
|
||||
<span className="font-mono text-xs font-medium">{commitSha.trim() || '브랜치 최신'}</span>
|
||||
</div>
|
||||
<div className="flex items-center justify-between gap-4">
|
||||
<span className="text-muted-foreground">빌드 대상</span>
|
||||
<span className="truncate font-medium">{selectedTarget}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</Modal>
|
||||
<LoadingModal open={loadingVisible} />
|
||||
</>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user