1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-22 23:09:41 +02:00

fix(app/edge-stack): edge stack create form validation (#343)

This commit is contained in:
LP B 2025-01-24 17:02:52 +01:00 committed by GitHub
parent 3ca5ab180f
commit b753371700
6 changed files with 38 additions and 43 deletions

View file

@ -28,8 +28,8 @@ const buildMethods = [editor, upload, git, edgeStackTemplate] as const;
interface Props {
webhookId: string;
onChangeTemplate: (change: {
type: 'app' | 'custom' | undefined;
id: number | undefined;
templateType: 'app' | 'custom' | undefined;
templateId: number | undefined;
}) => void;
}
@ -76,8 +76,8 @@ export function DockerComposeForm({ webhookId, onChangeTemplate }: Props) {
values.templateValues
);
onChangeTemplate({
id: templateValues.templateId,
type: templateValues.type,
templateId: templateValues.templateId,
templateType: templateValues.type,
});
setValues((values) => ({
...values,
@ -145,6 +145,7 @@ export function DockerComposeForm({ webhookId, onChangeTemplate }: Props) {
<FormSection title="Advanced configurations">
<RelativePathFieldset
values={values.relativePath}
errors={errors.relativePath}
gitModel={values.git}
onChange={(relativePath) =>
setValues((values) => ({