mirror of
https://github.com/portainer/portainer.git
synced 2025-07-24 07:49:41 +02:00
refactor(containers): migrate restart policy tab to react [EE-5213] (#10347)
This commit is contained in:
parent
3d19c46326
commit
2dfa4a7c45
9 changed files with 122 additions and 15 deletions
|
@ -0,0 +1,9 @@
|
|||
import { mixed, SchemaOf } from 'yup';
|
||||
|
||||
import { RestartPolicy } from './types';
|
||||
|
||||
export function validation(): SchemaOf<RestartPolicy> {
|
||||
return mixed<RestartPolicy>()
|
||||
.oneOf(Object.values(RestartPolicy))
|
||||
.default(RestartPolicy.No) as SchemaOf<RestartPolicy>;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue