mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-19 14:53:45 +02:00
Basic implemention of multiple selectable images for an egg
The admin side of this is quite ugly when creating/editing a server, but I'm not putting effort into that right now with React Admin soon™
This commit is contained in:
@@ -82,7 +82,13 @@ $('#pEggId').on('change', function (event) {
|
||||
let parentChain = _.get(Pterodactyl.nests, $('#pNestId').val(), null);
|
||||
let objectChain = _.get(parentChain, 'eggs.' + $(this).val(), null);
|
||||
|
||||
$('#pDefaultContainer').val(_.get(objectChain, 'docker_image', 'not defined!'));
|
||||
const images = _.get(objectChain, 'docker_images', [])
|
||||
for (let i = 0; i < images.length; i++) {
|
||||
let opt = document.createElement('option');
|
||||
opt.value = images[i];
|
||||
opt.innerHTML = images[i];
|
||||
$('#pDefaultContainer').append(opt);
|
||||
}
|
||||
|
||||
if (!_.get(objectChain, 'startup', false)) {
|
||||
$('#pStartup').val(_.get(parentChain, 'startup', 'ERROR: Startup Not Defined!'));
|
||||
|
||||
Reference in New Issue
Block a user