From 6e4e0bc0a45d6dbbfa708264785251ce381d7929 Mon Sep 17 00:00:00 2001 From: Matthew Penner Date: Wed, 17 Nov 2021 14:28:19 -0700 Subject: [PATCH] ui(admin): update server image when switching eggs --- .../scripts/components/admin/servers/ServerStartupContainer.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/resources/scripts/components/admin/servers/ServerStartupContainer.tsx b/resources/scripts/components/admin/servers/ServerStartupContainer.tsx index 702b21c04..f7fae7beb 100644 --- a/resources/scripts/components/admin/servers/ServerStartupContainer.tsx +++ b/resources/scripts/components/admin/servers/ServerStartupContainer.tsx @@ -27,11 +27,13 @@ function ServerStartupLineContainer ({ egg, server }: { egg: Egg | null; server: } if (server.eggId === egg.id) { + setFieldValue('image', server.container.image); setFieldValue('startup', server.container.startup || ''); return; } // Whenever the egg is changed, set the server's startup command to the egg's default. + setFieldValue('image', egg.dockerImages.length > 0 ? egg.dockerImages[0] : ''); setFieldValue('startup', ''); }, [ egg ]);