ui(admin): fix egg creation
This commit is contained in:
parent
6f5fb09c13
commit
3721b2007b
9 changed files with 1224 additions and 1142 deletions
|
@ -14,13 +14,13 @@ export default (egg: Partial<Egg2>): Promise<Egg> => {
|
|||
config_files: egg.configFiles,
|
||||
config_startup: egg.configStartup,
|
||||
config_stop: egg.configStop,
|
||||
config_from: egg.configFrom,
|
||||
startup: egg.startup,
|
||||
script_container: egg.scriptContainer,
|
||||
copy_script_from: egg.copyScriptFrom,
|
||||
script_entry: egg.scriptEntry,
|
||||
script_is_privileged: egg.scriptIsPrivileged,
|
||||
script_install: egg.scriptInstall,
|
||||
// config_from: egg.configFrom,
|
||||
// copy_script_from: egg.copyScriptFrom,
|
||||
// script_is_privileged: egg.scriptIsPrivileged,
|
||||
})
|
||||
.then(({ data }) => resolve(rawDataToEgg(data)))
|
||||
.catch(reject);
|
||||
|
|
|
@ -43,15 +43,15 @@ export interface Egg {
|
|||
configFiles: Record<string, any> | null;
|
||||
configStartup: Record<string, any> | null;
|
||||
configStop: string | null;
|
||||
configFrom: number | null;
|
||||
startup: string;
|
||||
scriptContainer: string;
|
||||
copyScriptFrom: number | null;
|
||||
scriptEntry: string;
|
||||
scriptIsPrivileged: boolean;
|
||||
scriptInstall: string | null;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
// configFrom: number | null;
|
||||
// copyScriptFrom: number | null;
|
||||
// scriptIsPrivileged: boolean;
|
||||
|
||||
relations: {
|
||||
nest?: Nest;
|
||||
|
|
|
@ -64,11 +64,11 @@ function InternalForm() {
|
|||
|
||||
return (
|
||||
<Form>
|
||||
<div css={tw`grid grid-cols-2 gap-y-6 gap-x-8 mb-16`}>
|
||||
<div css={tw`grid grid-cols-1 gap-y-6 col-span-2 md:col-span-1`}>
|
||||
<div className="grid grid-cols-2 gap-y-6 gap-x-8 mb-16">
|
||||
<div className="grid grid-cols-1 gap-y-6 col-span-2 md:col-span-1">
|
||||
<BaseSettingsBox>
|
||||
<NodeSelect node={node} setNode={setNode} />
|
||||
<div css={tw`xl:col-span-2 bg-neutral-800 border border-neutral-900 shadow-inner p-4 rounded`}>
|
||||
<div className="xl:col-span-2 bg-neutral-800 border border-neutral-900 shadow-inner p-4 rounded">
|
||||
<FormikSwitch
|
||||
name={'startOnCompletion'}
|
||||
label={'Start after installation'}
|
||||
|
|
|
@ -82,14 +82,14 @@ export function ServerServiceContainer({
|
|||
const [nestId, setNestId] = useState<number>(_nestId);
|
||||
|
||||
return (
|
||||
<AdminBox title={'Service Configuration'} isLoading={isSubmitting} css={tw`w-full`}>
|
||||
<div css={tw`mb-6`}>
|
||||
<AdminBox title={'Service Configuration'} isLoading={isSubmitting} className="w-full">
|
||||
<div className="mb-6">
|
||||
<NestSelector selectedNestId={nestId} onNestSelect={setNestId} />
|
||||
</div>
|
||||
<div css={tw`mb-6`}>
|
||||
<div className="mb-6">
|
||||
<EggSelect nestId={nestId} selectedEggId={egg?.id} onEggSelect={setEgg} />
|
||||
</div>
|
||||
<div css={tw`bg-neutral-800 border border-neutral-900 shadow-inner p-4 rounded`}>
|
||||
<div className="bg-neutral-800 border border-neutral-900 shadow-inner p-4 rounded">
|
||||
<FormikSwitch name={'skipScripts'} label={'Skip Egg Install Script'} description={'Soon™'} />
|
||||
</div>
|
||||
</AdminBox>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue