diff --git a/app/Models/Server.php b/app/Models/Server.php index b31a89a7c..2dd37c5f9 100644 --- a/app/Models/Server.php +++ b/app/Models/Server.php @@ -81,6 +81,8 @@ class Server extends Model implements CleansAttributes, ValidableContract 'disk' => 'required', 'service_id' => 'required', 'option_id' => 'required', + 'node_id' => 'required', + 'allocation_id' => 'required', 'pack_id' => 'sometimes', 'auto_deploy' => 'sometimes', 'custom_id' => 'sometimes', diff --git a/public/themes/pterodactyl/js/admin/new-server.js b/public/themes/pterodactyl/js/admin/new-server.js index ecc0b9fb7..2501a4cc9 100644 --- a/public/themes/pterodactyl/js/admin/new-server.js +++ b/public/themes/pterodactyl/js/admin/new-server.js @@ -27,9 +27,6 @@ $(document).ready(function() { $('#pPackId').select2({ placeholder: 'Select a Service Pack', }); - $('#pLocationId').select2({ - placeholder: 'Select a Location', - }).change(); $('#pNodeId').select2({ placeholder: 'Select a Node', }); @@ -100,29 +97,9 @@ $(document).on('click', function (event) { lastActiveBox.addClass('box-primary'); }); -var currentLocation = null; var curentNode = null; var NodeData = []; -$('#pLocationId').on('change', function (event) { - showLoader(); - currentLocation = $(this).val(); - currentNode = null; - - $.ajax({ - method: 'POST', - url: Router.route('admin.servers.new.nodes'), - headers: { 'X-CSRF-TOKEN': $('meta[name="_token"]').attr('content') }, - data: { location: currentLocation }, - }).done(function (data) { - NodeData = data; - $('#pNodeId').html('').select2({data: data}).change(); - }).fail(function (jqXHR) { - cosole.error(jqXHR); - currentLocation = null; - }).always(hideLoader); -}); - $('#pNodeId').on('change', function (event) { currentNode = $(this).val(); $.each(NodeData, function (i, v) { diff --git a/resources/themes/pterodactyl/admin/servers/new.blade.php b/resources/themes/pterodactyl/admin/servers/new.blade.php index 1fafa0e0f..fce6f538a 100644 --- a/resources/themes/pterodactyl/admin/servers/new.blade.php +++ b/resources/themes/pterodactyl/admin/servers/new.blade.php @@ -78,21 +78,20 @@
The node which this server will be deployed to.
The main allocation that will be assigned to this server.
Additional allocations to assign to this server on creation.