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:
parent
3ca5ab180f
commit
b753371700
6 changed files with 38 additions and 43 deletions
|
@ -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) => ({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue