1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-08-07 14:55:27 +02:00

fix(gitops): manifest validation warning [EE-6859] (#11664)

This commit is contained in:
Ali 2024-05-13 15:09:25 +12:00 committed by GitHub
parent a0ab82b866
commit 55667a878a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 62 additions and 16 deletions

View file

@ -1,7 +1,7 @@
import { IFormController } from 'angular';
import { FormikErrors } from 'formik';
import { GitFormModel } from '@/react/portainer/gitops/types';
import { DeployMethod, GitFormModel } from '@/react/portainer/gitops/types';
import { validateGitForm } from '@/react/portainer/gitops/GitForm';
import { notifyError } from '@/portainer/services/notifications';
import { IAuthenticationService } from '@/portainer/services/types';
@ -26,6 +26,8 @@ export default class GitFormController {
createdFromCustomTemplateId?: number;
deployMethod?: DeployMethod;
/* @ngInject */
constructor(
$async: <T>(fn: () => Promise<T>) => Promise<T>,
@ -67,7 +69,8 @@ export default class GitFormController {
this.errors = await validateGitForm(
this.gitCredentials,
value,
isCreatedFromCustomTemplate
isCreatedFromCustomTemplate,
this.deployMethod
);
if (this.errors && Object.keys(this.errors).length > 0) {
this.gitForm?.$setValidity('gitForm', false, this.gitForm);