mirror of
https://github.com/portainer/portainer.git
synced 2025-07-19 13:29:41 +02:00
fix(app): restore gitops update options (#419)
This commit is contained in:
parent
798fa2396a
commit
0d25f3f430
6 changed files with 9 additions and 4 deletions
|
@ -7,7 +7,7 @@ import { gitFormRefField } from './git-form-ref-field';
|
||||||
|
|
||||||
export const gitFormModule = angular
|
export const gitFormModule = angular
|
||||||
.module('portainer.app.components.git-form', [])
|
.module('portainer.app.components.git-form', [])
|
||||||
.component('gitForm', gitForm)
|
.component('gitForm', gitForm) // kube deploy + docker stack create
|
||||||
.component('gitFormAuthFieldset', gitFormAuthFieldset)
|
.component('gitFormAuthFieldset', gitFormAuthFieldset)
|
||||||
.component('gitFormAutoUpdateFieldset', gitFormAutoUpdate)
|
.component('gitFormAutoUpdateFieldset', gitFormAutoUpdate)
|
||||||
.component('gitFormRefField', gitFormRefField).name;
|
.component('gitFormRefField', gitFormRefField).name;
|
||||||
|
|
|
@ -29,6 +29,7 @@ export const gitFormModule = angular
|
||||||
'webhookId',
|
'webhookId',
|
||||||
'webhooksDocs',
|
'webhooksDocs',
|
||||||
'createdFromCustomTemplateId',
|
'createdFromCustomTemplateId',
|
||||||
|
'isAutoUpdateVisible',
|
||||||
])
|
])
|
||||||
)
|
)
|
||||||
.component(
|
.component(
|
||||||
|
|
|
@ -139,6 +139,7 @@ export function DockerComposeForm({ webhookId, onChangeTemplate }: Props) {
|
||||||
}
|
}
|
||||||
baseWebhookUrl={baseEdgeStackWebhookUrl()}
|
baseWebhookUrl={baseEdgeStackWebhookUrl()}
|
||||||
webhookId={webhookId}
|
webhookId={webhookId}
|
||||||
|
isAutoUpdateVisible={isBE}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{isBE && (
|
{isBE && (
|
||||||
|
|
|
@ -4,6 +4,7 @@ import { FormikErrors } from 'formik';
|
||||||
import { GitForm } from '@/react/portainer/gitops/GitForm';
|
import { GitForm } from '@/react/portainer/gitops/GitForm';
|
||||||
import { GitFormModel } from '@/react/portainer/gitops/types';
|
import { GitFormModel } from '@/react/portainer/gitops/types';
|
||||||
import { baseEdgeStackWebhookUrl } from '@/portainer/helpers/webhookHelper';
|
import { baseEdgeStackWebhookUrl } from '@/portainer/helpers/webhookHelper';
|
||||||
|
import { isBE } from '@/react/portainer/feature-flags/feature-flags.service';
|
||||||
|
|
||||||
import { BoxSelector } from '@@/BoxSelector';
|
import { BoxSelector } from '@@/BoxSelector';
|
||||||
import { WebEditorForm } from '@@/WebEditorForm';
|
import { WebEditorForm } from '@@/WebEditorForm';
|
||||||
|
@ -109,6 +110,7 @@ export function KubeManifestForm({
|
||||||
}
|
}
|
||||||
baseWebhookUrl={baseEdgeStackWebhookUrl()}
|
baseWebhookUrl={baseEdgeStackWebhookUrl()}
|
||||||
webhookId={webhookId}
|
webhookId={webhookId}
|
||||||
|
isAutoUpdateVisible={isBE}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
|
|
|
@ -7,7 +7,6 @@ import { RefField } from '@/react/portainer/gitops/RefField';
|
||||||
import { GitFormUrlField } from '@/react/portainer/gitops/GitFormUrlField';
|
import { GitFormUrlField } from '@/react/portainer/gitops/GitFormUrlField';
|
||||||
import { DeployMethod, GitFormModel } from '@/react/portainer/gitops/types';
|
import { DeployMethod, GitFormModel } from '@/react/portainer/gitops/types';
|
||||||
import { TimeWindowDisplay } from '@/react/portainer/gitops/TimeWindowDisplay';
|
import { TimeWindowDisplay } from '@/react/portainer/gitops/TimeWindowDisplay';
|
||||||
import { isBE } from '@/react/portainer/feature-flags/feature-flags.service';
|
|
||||||
|
|
||||||
import { FormSection } from '@@/form-components/FormSection';
|
import { FormSection } from '@@/form-components/FormSection';
|
||||||
import { validateForm } from '@@/form-components/validate-form';
|
import { validateForm } from '@@/form-components/validate-form';
|
||||||
|
@ -35,6 +34,7 @@ interface Props {
|
||||||
webhookId?: string;
|
webhookId?: string;
|
||||||
webhooksDocs?: string;
|
webhooksDocs?: string;
|
||||||
createdFromCustomTemplateId?: number;
|
createdFromCustomTemplateId?: number;
|
||||||
|
isAutoUpdateVisible?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function GitForm({
|
export function GitForm({
|
||||||
|
@ -51,6 +51,7 @@ export function GitForm({
|
||||||
webhookId,
|
webhookId,
|
||||||
webhooksDocs,
|
webhooksDocs,
|
||||||
createdFromCustomTemplateId,
|
createdFromCustomTemplateId,
|
||||||
|
isAutoUpdateVisible = true,
|
||||||
}: Props) {
|
}: Props) {
|
||||||
const [value, setValue] = useState(initialValue); // TODO: remove this state when form is not inside angularjs
|
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 && (
|
||||||
<AutoUpdateFieldset
|
<AutoUpdateFieldset
|
||||||
environmentType={environmentType}
|
environmentType={environmentType}
|
||||||
webhookId={webhookId || ''}
|
webhookId={webhookId || ''}
|
||||||
|
|
2
go.mod
2
go.mod
|
@ -30,6 +30,7 @@ require (
|
||||||
github.com/gorilla/csrf v1.7.2
|
github.com/gorilla/csrf v1.7.2
|
||||||
github.com/gorilla/mux v1.8.1
|
github.com/gorilla/mux v1.8.1
|
||||||
github.com/gorilla/websocket v1.5.0
|
github.com/gorilla/websocket v1.5.0
|
||||||
|
github.com/hashicorp/go-version v1.7.0
|
||||||
github.com/hashicorp/golang-lru v0.5.4
|
github.com/hashicorp/golang-lru v0.5.4
|
||||||
github.com/joho/godotenv v1.4.0
|
github.com/joho/godotenv v1.4.0
|
||||||
github.com/jpillora/chisel v1.10.0
|
github.com/jpillora/chisel v1.10.0
|
||||||
|
@ -147,7 +148,6 @@ require (
|
||||||
github.com/hashicorp/errwrap v1.1.0 // indirect
|
github.com/hashicorp/errwrap v1.1.0 // indirect
|
||||||
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
|
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
|
||||||
github.com/hashicorp/go-multierror v1.1.1 // indirect
|
github.com/hashicorp/go-multierror v1.1.1 // indirect
|
||||||
github.com/hashicorp/go-version v1.7.0 // indirect
|
|
||||||
github.com/imdario/mergo v0.3.16 // indirect
|
github.com/imdario/mergo v0.3.16 // indirect
|
||||||
github.com/in-toto/in-toto-golang v0.9.0 // indirect
|
github.com/in-toto/in-toto-golang v0.9.0 // indirect
|
||||||
github.com/inconshreveable/mousetrap v1.1.0 // indirect
|
github.com/inconshreveable/mousetrap v1.1.0 // indirect
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue