Merge pull request #291 from Moonlight-Panel/FixInitialInstallConsole
Fixed initial install console and added a better redirect handling when creating a server
This commit is contained in:
commit
95ba81eab4
2 changed files with 12 additions and 2 deletions
|
@ -218,6 +218,16 @@ public class WingsConsole : IDisposable
|
|||
break;
|
||||
|
||||
case "install output":
|
||||
if (ServerState != ServerState.Installing)
|
||||
{
|
||||
// Because wings is sending "install output" events BEFORE
|
||||
// sending the "install started" event,
|
||||
// we need to set the install state here
|
||||
// See https://github.com/pterodactyl/panel/issues/4853
|
||||
// for more details
|
||||
await UpdateServerState(ServerState.Installing);
|
||||
}
|
||||
|
||||
foreach (var line in eventData.Args)
|
||||
{
|
||||
await SaveMessage(line);
|
||||
|
|
|
@ -229,7 +229,7 @@
|
|||
{
|
||||
try
|
||||
{
|
||||
await ServerService.Create(Model.Name, Model.Cpu, Model.Memory, Model.Disk, Model.Owner, Model.Image, Model.Node, server =>
|
||||
var newServer = await ServerService.Create(Model.Name, Model.Cpu, Model.Memory, Model.Disk, Model.Owner, Model.Image, Model.Node, server =>
|
||||
{
|
||||
server.OverrideStartup = Model.OverrideStartup;
|
||||
server.DockerImageIndex = Model.DockerImageIndex;
|
||||
|
@ -242,7 +242,7 @@
|
|||
});
|
||||
|
||||
await ToastService.Success(SmartTranslateService.Translate("Server successfully created"));
|
||||
NavigationManager.NavigateTo("/admin/servers");
|
||||
NavigationManager.NavigateTo($"/server/{newServer.Uuid}");
|
||||
}
|
||||
catch (DisplayException e)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue