1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-24 15:59:41 +02:00

fix(app): ensure placement errors surface per node [EE-7065] (#11820)

Co-authored-by: testa113 <testa113>
This commit is contained in:
Ali 2024-05-14 13:39:53 +12:00 committed by GitHub
parent 9dd9ffdb3b
commit a80aa2b45c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 106 additions and 79 deletions

View file

@ -17,7 +17,7 @@ import { useCurrentUser } from '@/react/hooks/useUser';
import { relativePathValidation } from '@/react/portainer/gitops/RelativePathFieldset/validation';
import { CustomTemplate } from '@/react/portainer/templates/custom-templates/types';
import { TemplateViewModel } from '@/react/portainer/templates/app-templates/view-model';
import { GitFormModel } from '@/react/portainer/gitops/types';
import { DeployMethod, GitFormModel } from '@/react/portainer/gitops/types';
import { envVarValidation } from '@@/form-components/EnvironmentVariablesFieldset';
import { file } from '@@/form-components/yup-file-validation';
@ -76,10 +76,17 @@ export function useValidation({
}),
git: mixed().when('method', {
is: 'repository',
then: buildGitValidationSchema(
gitCredentialsQuery.data || [],
!!customTemplate
),
then: () => {
const deploymentMethod: DeployMethod =
values.deploymentType === DeploymentType.Compose
? 'compose'
: 'manifest';
return buildGitValidationSchema(
gitCredentialsQuery.data || [],
!!customTemplate,
deploymentMethod
);
},
}) as SchemaOf<GitFormModel>,
relativePath: relativePathValidation(),
useManifestNamespaces: boolean().default(false),

View file

@ -95,6 +95,7 @@ export function KubeManifestForm({
{method === git.value && (
<GitForm
deployMethod="manifest"
errors={errors?.git}
value={values.git}
onChange={(gitValues) =>