From a92f3648b2c6af5b23d18696a73852dd968feee8 Mon Sep 17 00:00:00 2001 From: Matthew Penner Date: Mon, 13 Sep 2021 00:07:09 -0600 Subject: [PATCH] ui(admin): start work on egg install settings --- resources/scripts/api/admin/eggs/getEgg.ts | 8 ++++---- .../admin/nests/eggs/EggInstallContainer.tsx | 11 +++-------- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/resources/scripts/api/admin/eggs/getEgg.ts b/resources/scripts/api/admin/eggs/getEgg.ts index c30faf42..12d4146a 100644 --- a/resources/scripts/api/admin/eggs/getEgg.ts +++ b/resources/scripts/api/admin/eggs/getEgg.ts @@ -39,11 +39,11 @@ export const rawDataToEgg = ({ attributes }: FractalResponseData): Egg => ({ configStop: attributes.config_stop, configFrom: attributes.config_from, startup: attributes.startup, - scriptContainer: attributes.script_container, copyScriptFrom: attributes.copy_script_from, - scriptEntry: attributes.script_entry, - scriptIsPrivileged: attributes.script_is_privileged, - scriptInstall: attributes.script_install, + scriptContainer: attributes.script?.container, + scriptEntry: attributes.script?.entry, + scriptIsPrivileged: attributes.script?.privileged, + scriptInstall: attributes.script?.install, createdAt: new Date(attributes.created_at), updatedAt: new Date(attributes.updated_at), }); diff --git a/resources/scripts/components/admin/nests/eggs/EggInstallContainer.tsx b/resources/scripts/components/admin/nests/eggs/EggInstallContainer.tsx index a4b2d9ea..c26ffdb3 100644 --- a/resources/scripts/components/admin/nests/eggs/EggInstallContainer.tsx +++ b/resources/scripts/components/admin/nests/eggs/EggInstallContainer.tsx @@ -9,11 +9,6 @@ import Input from '@/components/elements/Input'; import Label from '@/components/elements/Label'; import SpinnerOverlay from '@/components/elements/SpinnerOverlay'; -const initialContent = `#!/bin/ash - -curl -s https://cdn.pterodactyl.io/releases/latest.json | jq -`; - export default () => { const egg = Context.useStoreState(state => state.egg); @@ -28,19 +23,19 @@ export default () => {
- +
- +

The Docker image to use for running this installation script.

- +

The command that should be used to run this script inside of the installation container.