1
0
Fork 0
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:
Oscar Zhou 2024-06-27 08:48:03 +12:00 committed by GitHub
parent e828615467
commit 39bdfa4512
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 22 additions and 7 deletions

View file

@ -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 || ''}

View file

@ -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,
};
}