mirror of
https://github.com/portainer/portainer.git
synced 2025-08-08 23:35:31 +02:00
fix(edgestack): gitops auto update issue [EE-7260] (#11965)
This commit is contained in:
parent
e828615467
commit
39bdfa4512
7 changed files with 22 additions and 7 deletions
|
@ -7,6 +7,7 @@ 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';
|
||||
|
@ -102,7 +103,7 @@ export function GitForm({
|
|||
/>
|
||||
)}
|
||||
|
||||
{value.AutoUpdate && (
|
||||
{isBE && value.AutoUpdate && (
|
||||
<AutoUpdateFieldset
|
||||
environmentType={environmentType}
|
||||
webhookId={webhookId || ''}
|
||||
|
|
|
@ -71,13 +71,17 @@ export interface GitFormModel extends GitAuthModel {
|
|||
AutoUpdate?: AutoUpdateModel;
|
||||
}
|
||||
|
||||
export function toGitFormModel(response?: RepoConfigResponse): GitFormModel {
|
||||
export function toGitFormModel(
|
||||
response?: RepoConfigResponse,
|
||||
autoUpdate?: AutoUpdateModel
|
||||
): GitFormModel {
|
||||
if (!response) {
|
||||
return {
|
||||
RepositoryURL: '',
|
||||
ComposeFilePathInRepository: '',
|
||||
RepositoryAuthentication: false,
|
||||
TLSSkipVerify: false,
|
||||
AutoUpdate: autoUpdate,
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -96,5 +100,6 @@ export function toGitFormModel(response?: RepoConfigResponse): GitFormModel {
|
|||
RepositoryPassword: Authentication?.Password,
|
||||
RepositoryGitCredentialID: Authentication?.GitCredentialID,
|
||||
TLSSkipVerify,
|
||||
AutoUpdate: autoUpdate,
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue