Fix server startup dropdown for egg being incorrect, fixes #778

This commit is contained in:
Dane Everitt 2017-11-25 12:27:08 -06:00
parent 34db4102b9
commit 0bb44a4972
4 changed files with 12 additions and 10 deletions

View file

@ -16,7 +16,7 @@ return [
'default_allocation_not_found' => 'The requested default allocation was not found in this server\'s allocations.',
],
'alerts' => [
'startup_changed' => 'The startup configuration for this server has been updated. If this server\'s service or option was changed a reinstall will be occuring now.',
'startup_changed' => 'The startup configuration for this server has been updated. If this server\'s nest or egg was changed a reinstall will be occuring now.',
'server_deleted' => 'Server has successfully been deleted from the system.',
'server_created' => 'Server was successfully created on the panel. Please allow the daemon a few minutes to completely install this server.',
'build_updated' => 'The build details for this server have been updated. Some changes may require a restart to take effect.',

View file

@ -148,7 +148,7 @@
text: item.name,
};
}),
}).change();
}).val(Pterodactyl.server.egg_id).change();
});
$('#pEggId').on('change', function (event) {
@ -157,8 +157,8 @@
$('#setDefaultImage').html(_.get(objectChain, 'docker_image', 'undefined'));
$('#pDockerImage').val(_.get(objectChain, 'docker_image', 'undefined'));
if (objectChain.id === parseInt('{{ $server->egg_id }}')) {
$('#pDockerImage').val('{{ $server->image }}');
if (objectChain.id === parseInt(Pterodactyl.server.egg_id)) {
$('#pDockerImage').val(Pterodactyl.server.image);
}
if (!_.get(objectChain, 'startup', false)) {
@ -178,9 +178,9 @@
),
});
@if(! is_null($server->pack_id))
$('#pPackId').val({{ $server->pack_id }});
@endif
if (Pterodactyl.server.pack_id !== null) {
$('#pPackId').val(Pterodactyl.server.pack_id);
}
$('#appendVariablesTo').html('');
$.each(_.get(objectChain, 'variables', []), function (i, item) {