mirror of
https://github.com/portainer/portainer.git
synced 2025-07-25 08:19:40 +02:00
fix(edge/templates): fix issues with git templates [EE-6357] (#10679)
This commit is contained in:
parent
974378c9b5
commit
2a18c9f215
16 changed files with 201 additions and 116 deletions
|
@ -42,7 +42,7 @@ export function InnerForm({ isLoading }: { isLoading: boolean }) {
|
|||
usePreventExit(
|
||||
initialValues.FileContent,
|
||||
values.FileContent,
|
||||
values.Method === editor.value && !isSubmitting
|
||||
values.Method === editor.value && !isSubmitting && !isLoading
|
||||
);
|
||||
|
||||
const isGit = values.Method === git.value;
|
||||
|
@ -108,16 +108,7 @@ export function InnerForm({ isLoading }: { isLoading: boolean }) {
|
|||
/>
|
||||
)}
|
||||
|
||||
{isTemplateVariablesEnabled && (
|
||||
<CustomTemplatesVariablesDefinitionField
|
||||
value={values.Variables}
|
||||
onChange={(values) => setFieldValue('Variables', values)}
|
||||
isVariablesNamesFromParent={values.Method === editor.value}
|
||||
errors={errors.Variables}
|
||||
/>
|
||||
)}
|
||||
|
||||
{values.Method === git.value && (
|
||||
{isGit && (
|
||||
<GitForm
|
||||
value={values.Git}
|
||||
onChange={(newValues) =>
|
||||
|
@ -130,6 +121,15 @@ export function InnerForm({ isLoading }: { isLoading: boolean }) {
|
|||
/>
|
||||
)}
|
||||
|
||||
{isTemplateVariablesEnabled && (
|
||||
<CustomTemplatesVariablesDefinitionField
|
||||
value={values.Variables}
|
||||
onChange={(values) => setFieldValue('Variables', values)}
|
||||
isVariablesNamesFromParent={values.Method === editor.value}
|
||||
errors={errors.Variables}
|
||||
/>
|
||||
)}
|
||||
|
||||
{values.EdgeSettings && (
|
||||
<EdgeSettingsFieldset
|
||||
setValues={(edgeSetValues) =>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue