Canvas: Form to choose source repository
Change-Id: I48011d6374e036ead934815ed8e88dc0d1bb914e
diff --git a/apps/canvas/front/src/lib/config.ts b/apps/canvas/front/src/lib/config.ts
index 3eed93e..22353f8 100644
--- a/apps/canvas/front/src/lib/config.ts
+++ b/apps/canvas/front/src/lib/config.ts
@@ -54,7 +54,7 @@
ingress?: Ingress[];
expose?: PortDomain[];
volume?: string[];
- preBuildCommands?: string[];
+ preBuildCommands?: { bin: string }[];
};
export type Volume = {
@@ -124,7 +124,7 @@
auth: { enabled: false },
})),
expose: findExpose(n),
- preBuildCommands: [n.data.preBuildCommands.split("\n").map((cmd) => ({ bin: cmd }))],
+ preBuildCommands: n.data.preBuildCommands ? n.data.preBuildCommands.split("\n").map((cmd) => ({ bin: cmd })) : [],
};
}),
volume: nodes.filter((n) => n.type === "volume").map((n): Volume => ({
@@ -214,7 +214,7 @@
export function CreateValidators(): Validator {
return SortingValidator(
CombineValidators(
- EmptyValidator,
+ EmptyValidator,
GitRepositoryValidator,
ServiceValidator,
GatewayHTTPSValidator,
@@ -228,7 +228,7 @@
if (nodes.length > 0) {
return [];
}
- return [{
+ return [{
id: "no-nodes",
type: "FATAL",
message: "Start by importing application source code",
@@ -254,7 +254,7 @@
message: "Connect to service",
onHighlight: (store) => store.setHighlightCategory("Services", true),
onLooseHighlight: (store) => store.setHighlightCategory("Services", false),
-} satisfies Message));
+ } satisfies Message));
return noAddress.concat(noApp);
}
@@ -269,8 +269,8 @@
onLooseHighlight: (store) => store.updateNode(n.id, { selected: false }),
onClick: (store) => {
store.updateNode(n.id, { selected: true });
- store.updateNodeData<"app">(n.id, {
- activeField: "name" ,
+ store.updateNodeData<"app">(n.id, {
+ activeField: "name",
});
},
}));
@@ -291,8 +291,8 @@
onLooseHighlight: (store) => store.updateNode(n.id, { selected: false }),
onClick: (store) => {
store.updateNode(n.id, { selected: true });
- store.updateNodeData<"app">(n.id, {
- activeField: "type" ,
+ store.updateNodeData<"app">(n.id, {
+ activeField: "type",
});
},
}));
@@ -324,7 +324,7 @@
},
onLooseHighlight: (store) => {
store.updateNode(n.id, { selected: false });
- store.setHighlightCategory("gateways", false);
+ store.setHighlightCategory("gateways", false);
},
}));
});
@@ -339,7 +339,7 @@
nodeId: n.id,
message: `Can not expose same port using multiple ingresses: ${p.name} - ${p.value}`,
onHighlight: (store) => store.updateNode(n.id, { selected: true }),
- onLooseHighlight: (store) => store.updateNode(n.id, { selected: false }),
+ onLooseHighlight: (store) => store.updateNode(n.id, { selected: false }),
};
})).filter((m) => m !== undefined);
return noName.concat(noSource).concat(noRuntime).concat(noPorts).concat(noIngress).concat(multipleIngress);