ui(admin): start work on egg install settings
This commit is contained in:
parent
a615b7fa70
commit
a92f3648b2
2 changed files with 7 additions and 12 deletions
|
@ -39,11 +39,11 @@ export const rawDataToEgg = ({ attributes }: FractalResponseData): Egg => ({
|
||||||
configStop: attributes.config_stop,
|
configStop: attributes.config_stop,
|
||||||
configFrom: attributes.config_from,
|
configFrom: attributes.config_from,
|
||||||
startup: attributes.startup,
|
startup: attributes.startup,
|
||||||
scriptContainer: attributes.script_container,
|
|
||||||
copyScriptFrom: attributes.copy_script_from,
|
copyScriptFrom: attributes.copy_script_from,
|
||||||
scriptEntry: attributes.script_entry,
|
scriptContainer: attributes.script?.container,
|
||||||
scriptIsPrivileged: attributes.script_is_privileged,
|
scriptEntry: attributes.script?.entry,
|
||||||
scriptInstall: attributes.script_install,
|
scriptIsPrivileged: attributes.script?.privileged,
|
||||||
|
scriptInstall: attributes.script?.install,
|
||||||
createdAt: new Date(attributes.created_at),
|
createdAt: new Date(attributes.created_at),
|
||||||
updatedAt: new Date(attributes.updated_at),
|
updatedAt: new Date(attributes.updated_at),
|
||||||
});
|
});
|
||||||
|
|
|
@ -9,11 +9,6 @@ import Input from '@/components/elements/Input';
|
||||||
import Label from '@/components/elements/Label';
|
import Label from '@/components/elements/Label';
|
||||||
import SpinnerOverlay from '@/components/elements/SpinnerOverlay';
|
import SpinnerOverlay from '@/components/elements/SpinnerOverlay';
|
||||||
|
|
||||||
const initialContent = `#!/bin/ash
|
|
||||||
|
|
||||||
curl -s https://cdn.pterodactyl.io/releases/latest.json | jq
|
|
||||||
`;
|
|
||||||
|
|
||||||
export default () => {
|
export default () => {
|
||||||
const egg = Context.useStoreState(state => state.egg);
|
const egg = Context.useStoreState(state => state.egg);
|
||||||
|
|
||||||
|
@ -28,19 +23,19 @@ export default () => {
|
||||||
<div css={tw`relative pb-4`}>
|
<div css={tw`relative pb-4`}>
|
||||||
<SpinnerOverlay visible={false}/>
|
<SpinnerOverlay visible={false}/>
|
||||||
|
|
||||||
<Editor overrides={tw`h-96 mb-4`} initialContent={initialContent} mode={shell}/>
|
<Editor overrides={tw`h-96 mb-4`} initialContent={egg.scriptInstall || ''} mode={shell}/>
|
||||||
|
|
||||||
<div css={tw`mx-6 mb-4`}>
|
<div css={tw`mx-6 mb-4`}>
|
||||||
<div css={tw`grid grid-cols-3 gap-x-8 gap-y-6`}>
|
<div css={tw`grid grid-cols-3 gap-x-8 gap-y-6`}>
|
||||||
<div>
|
<div>
|
||||||
<Label>Install Container</Label>
|
<Label>Install Container</Label>
|
||||||
<Input type="text" defaultValue={'ghcr.io/pterodactyl/installers:alpine'}/>
|
<Input type="text" defaultValue={egg.scriptContainer}/>
|
||||||
<p className={'input-help'}>The Docker image to use for running this installation script.</p>
|
<p className={'input-help'}>The Docker image to use for running this installation script.</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<Label>Install Entrypoint</Label>
|
<Label>Install Entrypoint</Label>
|
||||||
<Input type="text" defaultValue={'/bin/ash'}/>
|
<Input type="text" defaultValue={egg.scriptEntry}/>
|
||||||
<p className={'input-help'}>The command that should be used to run this script inside of the installation container.</p>
|
<p className={'input-help'}>The command that should be used to run this script inside of the installation container.</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue