mirror of
https://github.com/portainer/portainer.git
synced 2025-07-30 10:49:40 +02:00
feat(edge/templates): introduce edge specific settings [EE-6276] (#10609)
This commit is contained in:
parent
68950fbb24
commit
e43d076269
42 changed files with 885 additions and 319 deletions
|
@ -0,0 +1,19 @@
|
|||
import { SchemaOf, boolean, mixed, number, object } from 'yup';
|
||||
|
||||
import { relativePathValidation } from '@/react/portainer/gitops/RelativePathFieldset/validation';
|
||||
import { EdgeTemplateSettings } from '@/react/portainer/templates/custom-templates/types';
|
||||
import { isBE } from '@/react/portainer/feature-flags/feature-flags.service';
|
||||
|
||||
export function edgeFieldsetValidation(): SchemaOf<EdgeTemplateSettings> {
|
||||
if (!isBE) {
|
||||
return mixed().default(undefined) as SchemaOf<EdgeTemplateSettings>;
|
||||
}
|
||||
|
||||
return object({
|
||||
RelativePathSettings: relativePathValidation(),
|
||||
PrePullImage: boolean().default(false),
|
||||
RetryDeploy: boolean().default(false),
|
||||
PrivateRegistryId: number().default(undefined),
|
||||
StaggerConfig: mixed(),
|
||||
});
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue