feat: implement build arg ui

This commit is contained in:
2024-11-30 23:52:36 +00:00
parent 39469230a3
commit a064f86b88
4 changed files with 273 additions and 81 deletions

View File

@@ -129,15 +129,17 @@ function useUpdateTemplateFile(name: string) {
async function buildTemplate({
imageTag,
templateName,
buildArgs,
onBuildOutput,
}: {
imageTag: string;
templateName: string;
buildArgs: Record<string, string>;
onBuildOutput: (chunk: string) => void;
}) {
const res = await fetchApi(`/templates/${templateName}`, {
method: "POST",
body: JSON.stringify({ imageTag }),
body: JSON.stringify({ imageTag, buildArgs }),
headers: {
Accept: "text/event-stream",
},