feat: add stage management UI, fix null stages
- Add Stage button with inline form (name, tag pattern, max instances, auto deploy) - Delete stage button per stage header - Add createStage/updateStage/deleteStage to API client - Fix null stages crash on env page - Fix null slices globally in respondJSON via reflection
This commit is contained in:
@@ -9,6 +9,7 @@ import type {
|
||||
Registry,
|
||||
RegistryImage,
|
||||
Settings,
|
||||
Stage,
|
||||
StageEnv,
|
||||
Volume
|
||||
} from './types';
|
||||
@@ -115,6 +116,20 @@ export function deleteProject(id: string): Promise<{ deleted: string }> {
|
||||
return del<{ deleted: string }>(`/api/projects/${id}`);
|
||||
}
|
||||
|
||||
// ── Stages ─────────────────────────────────────────────────────────
|
||||
|
||||
export function createStage(projectId: string, data: Partial<Stage>): Promise<Stage> {
|
||||
return post<Stage>(`/api/projects/${projectId}/stages`, data);
|
||||
}
|
||||
|
||||
export function updateStage(projectId: string, stageId: string, data: Partial<Stage>): Promise<Stage> {
|
||||
return put<Stage>(`/api/projects/${projectId}/stages/${stageId}`, data);
|
||||
}
|
||||
|
||||
export function deleteStage(projectId: string, stageId: string): Promise<void> {
|
||||
return del<void>(`/api/projects/${projectId}/stages/${stageId}`);
|
||||
}
|
||||
|
||||
// ── Instances ───────────────────────────────────────────────────────
|
||||
|
||||
export function listInstances(projectId: string, stageId: string): Promise<Instance[]> {
|
||||
|
||||
Reference in New Issue
Block a user