This commit is contained in:
@@ -92,7 +92,6 @@ export function LauncherBuildPage() {
|
||||
const clientSource = source?.client;
|
||||
const artifactName = `autonomy-studio-launcher-${version || activeVersion?.version || '0.0.0'}.deb`;
|
||||
const backendImageName = backendSource?.image || 'localhost:5000/studio-launcher-be';
|
||||
const backendImageTag = `${backendImageName.replace(/\/$/, '')}:${version || '0.1.0'}`;
|
||||
const backendDockerfile = backendSource?.dockerfile || 'Dockerfile';
|
||||
const uploadPath = launcherArtifactKey(version || activeVersion?.version || '0.0.0', branch, commitSha, artifactName);
|
||||
const downloadUrl = r2PublicBaseUrl ? `${r2PublicBaseUrl.replace(/\/$/, '')}/${encodeObjectKey(uploadPath)}` : '백엔드 R2 설정 기준으로 생성됩니다.';
|
||||
@@ -165,10 +164,10 @@ export function LauncherBuildPage() {
|
||||
repository: isBackend ? backendSource?.repository ?? undefined : clientSource?.repository ?? activeVersion?.repository ?? undefined,
|
||||
branch,
|
||||
commitSha: commitSha.trim() || undefined,
|
||||
version: isBackend ? version.trim() : undefined,
|
||||
version: undefined,
|
||||
uploadPath: isBackend ? backendDockerfile : uploadPath,
|
||||
artifact: isBackend ? backendImageName.replace(/^localhost:5000\//, '') : undefined,
|
||||
downloadUrl: isBackend ? backendImageTag : r2PublicBaseUrl ? downloadUrl : undefined
|
||||
downloadUrl: isBackend ? undefined : r2PublicBaseUrl ? downloadUrl : undefined
|
||||
})
|
||||
.then(({ job }) => {
|
||||
setJobs((prev) => [job, ...prev]);
|
||||
@@ -189,7 +188,7 @@ export function LauncherBuildPage() {
|
||||
title="빌드 관리"
|
||||
description="런처 클라이언트 설치 파일과 백엔드 컨테이너 이미지를 구성요소별로 빌드합니다."
|
||||
actions={
|
||||
<Button className="h-8 px-3 text-[13px]" onClick={() => setConfirmOpen(true)} disabled={isBackend && !version.trim()}>
|
||||
<Button className="h-8 px-3 text-[13px]" onClick={() => setConfirmOpen(true)}>
|
||||
<Play className="size-4" />
|
||||
실행
|
||||
</Button>
|
||||
@@ -209,17 +208,10 @@ export function LauncherBuildPage() {
|
||||
<Card className="min-w-0 overflow-hidden">
|
||||
<CardHeader title="빌드 요청" description={isBackend ? '브랜치와 커밋 기준으로 런처 백엔드 이미지를 빌드하고 레지스트리에 푸시합니다.' : '브랜치와 커밋 기준으로 런처 설치 파일을 생성합니다.'} />
|
||||
<div className="space-y-4 p-5">
|
||||
{isBackend ? (
|
||||
<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 text-foreground outline-none focus:ring-2 focus:ring-ring" value={version} onChange={(event) => setVersion(event.target.value)} />
|
||||
</label>
|
||||
) : (
|
||||
<div className="rounded-md border border-border bg-muted/20 px-3 py-2">
|
||||
<p className="text-xs font-medium text-muted-foreground">버전</p>
|
||||
<p className="mt-1 text-sm font-medium text-foreground">빌드 후 package.json 기준으로 자동 확정</p>
|
||||
</div>
|
||||
)}
|
||||
<div className="rounded-md border border-border bg-muted/20 px-3 py-2">
|
||||
<p className="text-xs font-medium text-muted-foreground">버전</p>
|
||||
<p className="mt-1 text-sm font-medium text-foreground">빌드 후 package.json 기준으로 자동 확정</p>
|
||||
</div>
|
||||
<label className="block">
|
||||
<span className="text-xs font-medium text-muted-foreground">브랜치</span>
|
||||
<select className="mt-2 h-9 w-full rounded-md border border-input bg-background px-3 text-sm text-foreground outline-none focus:ring-2 focus:ring-ring" value={branch} onChange={(event) => setBranch(event.target.value)}>
|
||||
@@ -234,8 +226,9 @@ export function LauncherBuildPage() {
|
||||
</label>
|
||||
{isBackend ? (
|
||||
<div className="rounded-md border border-border bg-background p-3">
|
||||
<p className="text-xs text-muted-foreground">이미지</p>
|
||||
<p className="mt-2 break-all font-mono text-xs text-foreground">{backendImageTag}</p>
|
||||
<p className="text-xs text-muted-foreground">이미지 이름</p>
|
||||
<p className="mt-2 break-all font-mono text-xs text-foreground">{backendImageName}</p>
|
||||
<p className="mt-1 text-xs leading-5 text-muted-foreground">태그는 빌드 후 package.json 버전으로 자동 확정됩니다.</p>
|
||||
<p className="mt-2 text-xs text-muted-foreground">Repository</p>
|
||||
<p className="mt-1 break-all font-mono text-xs text-foreground">{backendSource?.repository || '-'}</p>
|
||||
</div>
|
||||
@@ -339,7 +332,7 @@ export function LauncherBuildPage() {
|
||||
footer={
|
||||
<>
|
||||
<Button variant="outline" onClick={() => setConfirmOpen(false)}>취소</Button>
|
||||
<Button onClick={createJob} disabled={loading || (isBackend && !version.trim())}>
|
||||
<Button onClick={createJob} disabled={loading}>
|
||||
<Play className="size-4" />
|
||||
실행
|
||||
</Button>
|
||||
@@ -374,8 +367,8 @@ export function LauncherBuildPage() {
|
||||
</div>
|
||||
{isBackend ? (
|
||||
<div className="flex items-center justify-between gap-4">
|
||||
<span className="text-muted-foreground">이미지</span>
|
||||
<span className="truncate font-mono text-xs font-medium">{backendImageTag}</span>
|
||||
<span className="text-muted-foreground">이미지 이름</span>
|
||||
<span className="truncate font-mono text-xs font-medium">{backendImageName}</span>
|
||||
</div>
|
||||
) : null}
|
||||
</div>
|
||||
|
||||
@@ -11,7 +11,6 @@ import {
|
||||
listGiteaCommits,
|
||||
listLauncherVersions,
|
||||
listPlatformRepos,
|
||||
listStudioRepos,
|
||||
updateLauncherSource,
|
||||
type GiteaCommit,
|
||||
type LauncherVersion
|
||||
@@ -37,7 +36,7 @@ const targetLabels: Record<SourceTarget, { title: string; description: string; d
|
||||
'launcher-backend': {
|
||||
title: '백엔드',
|
||||
description: 'portal-api 런처 백엔드 컨테이너 이미지 빌드 소스입니다.',
|
||||
defaultOrg: 'studio'
|
||||
defaultOrg: 'platform'
|
||||
}
|
||||
};
|
||||
|
||||
@@ -119,7 +118,6 @@ export function LauncherSourcePage() {
|
||||
const [activeTarget, setActiveTarget] = useState<SourceTarget>('launcher-client');
|
||||
const [versions, setVersions] = useState<LauncherVersion[]>([]);
|
||||
const [platformRepos, setPlatformRepos] = useState<GiteaRepo[]>([]);
|
||||
const [studioRepos, setStudioRepos] = useState<GiteaRepo[]>([]);
|
||||
const [repos, setRepos] = useState<GiteaRepo[]>([]);
|
||||
const [forms, setForms] = useState<Record<SourceTarget, SourceForm>>({
|
||||
'launcher-client': emptyForm(),
|
||||
@@ -149,16 +147,15 @@ export function LauncherSourcePage() {
|
||||
|
||||
const refresh = () => {
|
||||
setLoading(true);
|
||||
Promise.all([listLauncherVersions(), listPlatformRepos(), listStudioRepos(), getLauncherSource()])
|
||||
.then(([nextVersions, platformRepos, studioRepos, sourceResult]) => {
|
||||
Promise.all([listLauncherVersions(), listPlatformRepos(), getLauncherSource()])
|
||||
.then(([nextVersions, platformRepos, sourceResult]) => {
|
||||
const nextVersion = nextVersions.find((version) => version.isActive) ?? nextVersions[0];
|
||||
const clientRepository = sourceResult.source.client?.repository ?? sourceResult.source.repository ?? nextVersion?.repository ?? (platformRepos[0] ? repoFullName(platformRepos[0]) : '');
|
||||
const backendRepository = sourceResult.source.backend?.repository ?? (studioRepos[0] ? repoFullName(studioRepos[0]) : '');
|
||||
const backendRepository = sourceResult.source.backend?.repository ?? (platformRepos[0] ? repoFullName(platformRepos[0]) : '');
|
||||
|
||||
setVersions(nextVersions);
|
||||
setPlatformRepos(platformRepos);
|
||||
setStudioRepos(studioRepos);
|
||||
setRepos(activeTarget === 'launcher-client' ? platformRepos : studioRepos);
|
||||
setRepos(platformRepos);
|
||||
setForms({
|
||||
'launcher-client': {
|
||||
repository: clientRepository,
|
||||
@@ -181,8 +178,8 @@ export function LauncherSourcePage() {
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
setRepos(activeTarget === 'launcher-client' ? platformRepos : studioRepos);
|
||||
}, [activeTarget, platformRepos, studioRepos]);
|
||||
setRepos(platformRepos);
|
||||
}, [platformRepos]);
|
||||
|
||||
useEffect(() => {
|
||||
const repository = splitRepository(activeForm.repository, activeTargetMeta.defaultOrg);
|
||||
|
||||
@@ -52,7 +52,17 @@ export function UserSessionsPage() {
|
||||
const columns = useMemo<Array<DataTableColumn<UserSession>>>(
|
||||
() => [
|
||||
{ key: 'no', header: 'No.', className: 'w-20 px-5 py-3 font-medium', cell: (row) => <span className="font-semibold">{row.no}</span> },
|
||||
{ key: 'user', header: '사용자', className: 'w-[220px] px-5 py-3 font-medium', cell: (row) => <span className="font-semibold">{row.user}</span> },
|
||||
{
|
||||
key: 'user',
|
||||
header: '사용자',
|
||||
className: 'w-[240px] px-5 py-3 font-medium',
|
||||
cell: (row) => (
|
||||
<div className="min-w-0">
|
||||
<p className="truncate font-semibold">{row.user}</p>
|
||||
{row.email ? <p className="mt-1 truncate text-xs font-medium text-muted-foreground">{row.email}</p> : null}
|
||||
</div>
|
||||
)
|
||||
},
|
||||
{ key: 'role', header: '권한', cell: (row) => <span className="text-muted-foreground">{row.role}</span> },
|
||||
{ key: 'session', header: '세션', cell: (row) => <span className="font-mono text-xs text-muted-foreground">{row.session}</span> },
|
||||
{ key: 'expiresAt', header: '만료', cell: (row) => <span className="text-muted-foreground">{formatDateTime(row.expiresAt)}</span> },
|
||||
|
||||
Reference in New Issue
Block a user