1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-25 08:19:40 +02:00

refactor(containers): migrate restart policy tab to react [EE-5213] (#10347)

This commit is contained in:
Chaim Lev-Ari 2023-09-25 20:40:26 +03:00 committed by GitHub
parent 3d19c46326
commit 2dfa4a7c45
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 122 additions and 15 deletions

View file

@ -0,0 +1,27 @@
import { ButtonSelector } from '@@/form-components/ButtonSelector/ButtonSelector';
import { FormControl } from '@@/form-components/FormControl';
import { RestartPolicy } from './types';
export function RestartPolicyTab({
values,
onChange,
}: {
values: RestartPolicy;
onChange: (values: RestartPolicy) => void;
}) {
return (
<FormControl label="Restart Policy">
<ButtonSelector
options={[
{ label: 'Never', value: RestartPolicy.No },
{ label: 'Always', value: RestartPolicy.Always },
{ label: 'On failure', value: RestartPolicy.OnFailure },
{ label: 'Unless stopped', value: RestartPolicy.UnlessStopped },
]}
value={values}
onChange={onChange}
/>
</FormControl>
);
}