diff --git a/app/portainer/components/forms/git-form/index.ts b/app/portainer/components/forms/git-form/index.ts index e478b62ca..26793f584 100644 --- a/app/portainer/components/forms/git-form/index.ts +++ b/app/portainer/components/forms/git-form/index.ts @@ -7,7 +7,7 @@ import { gitFormRefField } from './git-form-ref-field'; export const gitFormModule = angular .module('portainer.app.components.git-form', []) - .component('gitForm', gitForm) + .component('gitForm', gitForm) // kube deploy + docker stack create .component('gitFormAuthFieldset', gitFormAuthFieldset) .component('gitFormAutoUpdateFieldset', gitFormAutoUpdate) .component('gitFormRefField', gitFormRefField).name; diff --git a/app/portainer/react/components/git-form.ts b/app/portainer/react/components/git-form.ts index bc74e3715..af0c7d460 100644 --- a/app/portainer/react/components/git-form.ts +++ b/app/portainer/react/components/git-form.ts @@ -29,6 +29,7 @@ export const gitFormModule = angular 'webhookId', 'webhooksDocs', 'createdFromCustomTemplateId', + 'isAutoUpdateVisible', ]) ) .component( diff --git a/app/react/edge/edge-stacks/CreateView/DockerComposeForm.tsx b/app/react/edge/edge-stacks/CreateView/DockerComposeForm.tsx index 2f4c29f83..608e97500 100644 --- a/app/react/edge/edge-stacks/CreateView/DockerComposeForm.tsx +++ b/app/react/edge/edge-stacks/CreateView/DockerComposeForm.tsx @@ -139,6 +139,7 @@ export function DockerComposeForm({ webhookId, onChangeTemplate }: Props) { } baseWebhookUrl={baseEdgeStackWebhookUrl()} webhookId={webhookId} + isAutoUpdateVisible={isBE} /> {isBE && ( diff --git a/app/react/edge/edge-stacks/CreateView/KubeManifestForm.tsx b/app/react/edge/edge-stacks/CreateView/KubeManifestForm.tsx index 0428f5859..1c516d86e 100644 --- a/app/react/edge/edge-stacks/CreateView/KubeManifestForm.tsx +++ b/app/react/edge/edge-stacks/CreateView/KubeManifestForm.tsx @@ -4,6 +4,7 @@ import { FormikErrors } from 'formik'; import { GitForm } from '@/react/portainer/gitops/GitForm'; import { GitFormModel } from '@/react/portainer/gitops/types'; import { baseEdgeStackWebhookUrl } from '@/portainer/helpers/webhookHelper'; +import { isBE } from '@/react/portainer/feature-flags/feature-flags.service'; import { BoxSelector } from '@@/BoxSelector'; import { WebEditorForm } from '@@/WebEditorForm'; @@ -109,6 +110,7 @@ export function KubeManifestForm({ } baseWebhookUrl={baseEdgeStackWebhookUrl()} webhookId={webhookId} + isAutoUpdateVisible={isBE} /> )} diff --git a/app/react/portainer/gitops/GitForm.tsx b/app/react/portainer/gitops/GitForm.tsx index 834de6e82..89cb062bf 100644 --- a/app/react/portainer/gitops/GitForm.tsx +++ b/app/react/portainer/gitops/GitForm.tsx @@ -7,7 +7,6 @@ import { RefField } from '@/react/portainer/gitops/RefField'; import { GitFormUrlField } from '@/react/portainer/gitops/GitFormUrlField'; import { DeployMethod, GitFormModel } from '@/react/portainer/gitops/types'; import { TimeWindowDisplay } from '@/react/portainer/gitops/TimeWindowDisplay'; -import { isBE } from '@/react/portainer/feature-flags/feature-flags.service'; import { FormSection } from '@@/form-components/FormSection'; import { validateForm } from '@@/form-components/validate-form'; @@ -35,6 +34,7 @@ interface Props { webhookId?: string; webhooksDocs?: string; createdFromCustomTemplateId?: number; + isAutoUpdateVisible?: boolean; } export function GitForm({ @@ -51,6 +51,7 @@ export function GitForm({ webhookId, webhooksDocs, createdFromCustomTemplateId, + isAutoUpdateVisible = true, }: Props) { const [value, setValue] = useState(initialValue); // TODO: remove this state when form is not inside angularjs @@ -117,7 +118,7 @@ export function GitForm({ /> )} - {isBE && value.AutoUpdate && ( + {isAutoUpdateVisible && value.AutoUpdate && (