ui(admin): add allocation table, implement allocation creator

This commit is contained in:
Matthew Penner 2021-09-12 19:40:10 -06:00
parent 6b746440fc
commit 3c01dbbcc5
No known key found for this signature in database
GPG key ID: 030E4AB751DC756F
14 changed files with 397 additions and 87 deletions

View file

@ -1,14 +1,27 @@
import AllocationTable from '@/components/admin/nodes/allocations/AllocationTable';
import { faNetworkWired } from '@fortawesome/free-solid-svg-icons';
import React from 'react';
import { useRouteMatch } from 'react-router-dom';
import AdminBox from '@/components/admin/AdminBox';
import CreateAllocationForm from '@/components/admin/nodes/CreateAllocationForm';
import CreateAllocationForm from '@/components/admin/nodes/allocations/CreateAllocationForm';
import tw from 'twin.macro';
export default () => {
const match = useRouteMatch<{ id: string }>();
return (
<AdminBox title={'Allocations'}>
<CreateAllocationForm nodeId={match.params.id}/>
</AdminBox>
<>
<div css={tw`w-full grid grid-cols-12 gap-x-8`}>
<div css={tw`w-full flex col-span-8`}>
<AllocationTable nodeId={match.params.id}/>
</div>
<div css={tw`w-full flex col-span-4`}>
<AdminBox icon={faNetworkWired} title={'Allocations'} css={tw`h-auto w-full`}>
<CreateAllocationForm nodeId={match.params.id}/>
</AdminBox>
</div>
</div>
</>
);
};