2020-08-22 22:43:28 +00:00
|
|
|
import React from 'react';
|
|
|
|
import TitledGreyBox from '@/components/elements/TitledGreyBox';
|
|
|
|
import useServer from '@/plugins/useServer';
|
|
|
|
import tw from 'twin.macro';
|
2020-08-23 01:13:59 +00:00
|
|
|
import VariableBox from '@/components/server/startup/VariableBox';
|
2020-08-23 02:05:43 +00:00
|
|
|
import ServerContentBlock from '@/components/elements/ServerContentBlock';
|
2020-08-22 22:43:28 +00:00
|
|
|
|
|
|
|
const StartupContainer = () => {
|
2020-08-23 01:13:59 +00:00
|
|
|
const { invocation, variables } = useServer();
|
2020-08-22 22:43:28 +00:00
|
|
|
|
|
|
|
return (
|
2020-08-23 02:05:43 +00:00
|
|
|
<ServerContentBlock title={'Startup Settings'}>
|
2020-08-22 22:43:28 +00:00
|
|
|
<TitledGreyBox title={'Startup Command'}>
|
|
|
|
<div css={tw`px-1 py-2`}>
|
|
|
|
<p css={tw`font-mono bg-neutral-900 rounded py-2 px-4`}>
|
|
|
|
{invocation}
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
</TitledGreyBox>
|
2020-08-23 01:13:59 +00:00
|
|
|
<div css={tw`grid gap-8 grid-cols-2 mt-10`}>
|
|
|
|
{variables.map(variable => <VariableBox key={variable.envVariable} variable={variable}/>)}
|
|
|
|
</div>
|
2020-08-23 02:05:43 +00:00
|
|
|
</ServerContentBlock>
|
2020-08-22 22:43:28 +00:00
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
export default StartupContainer;
|