ui(admin): fix oom killer setting toggle
This commit is contained in:
parent
f6cf4a1236
commit
450fba00bc
10 changed files with 18 additions and 23 deletions
|
@ -195,9 +195,7 @@ export default () => {
|
|||
io: 500,
|
||||
cpu: 0,
|
||||
threads: '',
|
||||
// This value is inverted to have the switch be on when the
|
||||
// OOM Killer is enabled, rather than when disabled.
|
||||
oomDisabled: false,
|
||||
oomKiller: true,
|
||||
},
|
||||
featureLimits: {
|
||||
allocations: 1,
|
||||
|
|
|
@ -23,10 +23,6 @@ export default () => {
|
|||
const submit = (values: Values, { setSubmitting, setFieldValue }: FormikHelpers<Values>) => {
|
||||
clearFlashes('server');
|
||||
|
||||
// This value is inverted to have the switch be on when the
|
||||
// OOM Killer is enabled, rather than when disabled.
|
||||
values.limits.oomDisabled = !values.limits.oomDisabled;
|
||||
|
||||
updateServer(server.id, values)
|
||||
.then(() => {
|
||||
// setServer({ ...server, ...s });
|
||||
|
@ -58,7 +54,7 @@ export default () => {
|
|||
threads: server.limits.threads || '',
|
||||
// This value is inverted to have the switch be on when the
|
||||
// OOM Killer is enabled, rather than when disabled.
|
||||
oomDisabled: !server.limits.oomDisabled,
|
||||
oomKiller: server.limits.oomKiller,
|
||||
},
|
||||
featureLimits: {
|
||||
allocations: server.featureLimits.allocations,
|
||||
|
|
|
@ -60,7 +60,7 @@ export default () => {
|
|||
/>
|
||||
<div css={tw`xl:col-span-2 bg-neutral-800 border border-neutral-900 shadow-inner p-4 rounded`}>
|
||||
<FormikSwitch
|
||||
name={'limits.oomDisabled'}
|
||||
name={'limits.oomKiller'}
|
||||
label={'Out of Memory Killer'}
|
||||
description={
|
||||
'Enabling the Out of Memory Killer may cause server processes to exit unexpectedly.'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue