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:
parent
9dd9ffdb3b
commit
a80aa2b45c
7 changed files with 106 additions and 79 deletions
|
@ -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),
|
||||
|
|
|
@ -95,6 +95,7 @@ export function KubeManifestForm({
|
|||
|
||||
{method === git.value && (
|
||||
<GitForm
|
||||
deployMethod="manifest"
|
||||
errors={errors?.git}
|
||||
value={values.git}
|
||||
onChange={(gitValues) =>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue