2021-09-13 03:22:33 +00:00
|
|
|
import { faMicrochip } from '@fortawesome/free-solid-svg-icons';
|
2021-02-11 17:21:49 +00:00
|
|
|
import React from 'react';
|
|
|
|
import AdminBox from '@/components/admin/AdminBox';
|
|
|
|
import tw from 'twin.macro';
|
|
|
|
import Field from '@/components/elements/Field';
|
|
|
|
import SpinnerOverlay from '@/components/elements/SpinnerOverlay';
|
2021-08-02 16:23:58 +00:00
|
|
|
import { useFormikContext } from 'formik';
|
2021-02-11 17:21:49 +00:00
|
|
|
|
|
|
|
export default () => {
|
2021-03-23 23:47:24 +00:00
|
|
|
const { isSubmitting } = useFormikContext();
|
2021-02-11 17:21:49 +00:00
|
|
|
|
|
|
|
return (
|
2021-09-13 03:22:33 +00:00
|
|
|
<AdminBox icon={faMicrochip} title={'Limits'} css={tw`w-full relative`}>
|
2021-03-23 23:47:24 +00:00
|
|
|
<SpinnerOverlay visible={isSubmitting}/>
|
2021-02-11 17:21:49 +00:00
|
|
|
|
2021-08-02 16:23:58 +00:00
|
|
|
<div css={tw`md:w-full md:flex md:flex-row mb-6`}>
|
|
|
|
<div css={tw`md:w-full md:flex md:flex-col md:mr-4 mb-6 md:mb-0`}>
|
|
|
|
<Field
|
|
|
|
id={'memory'}
|
|
|
|
name={'memory'}
|
|
|
|
label={'Memory'}
|
|
|
|
type={'number'}
|
|
|
|
/>
|
|
|
|
</div>
|
2021-02-11 17:21:49 +00:00
|
|
|
|
2021-08-02 16:23:58 +00:00
|
|
|
<div css={tw`md:w-full md:flex md:flex-col md:ml-4 mb-6 md:mb-0`}>
|
|
|
|
<Field
|
|
|
|
id={'memoryOverallocate'}
|
|
|
|
name={'memoryOverallocate'}
|
|
|
|
label={'Memory Overallocate'}
|
|
|
|
type={'number'}
|
|
|
|
/>
|
2021-03-23 23:47:24 +00:00
|
|
|
</div>
|
2021-08-02 16:23:58 +00:00
|
|
|
</div>
|
2021-02-11 17:21:49 +00:00
|
|
|
|
2021-08-02 16:23:58 +00:00
|
|
|
<div css={tw`md:w-full md:flex md:flex-row mb-6`}>
|
|
|
|
<div css={tw`md:w-full md:flex md:flex-col md:mr-4 mb-6 md:mb-0`}>
|
|
|
|
<Field
|
|
|
|
id={'disk'}
|
|
|
|
name={'disk'}
|
|
|
|
label={'Disk'}
|
|
|
|
type={'number'}
|
|
|
|
/>
|
|
|
|
</div>
|
2021-02-11 17:21:49 +00:00
|
|
|
|
2021-08-02 16:23:58 +00:00
|
|
|
<div css={tw`md:w-full md:flex md:flex-col md:ml-4 mb-6 md:mb-0`}>
|
|
|
|
<Field
|
|
|
|
id={'diskOverallocate'}
|
|
|
|
name={'diskOverallocate'}
|
|
|
|
label={'Disk Overallocate'}
|
|
|
|
type={'number'}
|
|
|
|
/>
|
2021-03-23 23:47:24 +00:00
|
|
|
</div>
|
2021-08-02 16:23:58 +00:00
|
|
|
</div>
|
2021-03-23 23:47:24 +00:00
|
|
|
</AdminBox>
|
2021-02-11 17:21:49 +00:00
|
|
|
);
|
|
|
|
};
|