diff --git a/CHANGELOG.md b/CHANGELOG.md index 947098b6a..31c1cef28 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,10 @@ This file is a running track of new features and fixes to each version of the pa This project follows [Semantic Versioning](http://semver.org) guidelines. +## v0.7.4-h1 (Derelict Dermodactylus) +### Fixed +* Being able to create servers is kind of a core aspect of the software, pushing releases late at night is not a great idea. + ## v0.7.4 (Derelict Dermodactylus) ### Fixed * Fixes a bug when reinstalling a server that would not mark the server as installing, resulting in some UI issues. diff --git a/app/Http/Requests/Api/Application/Servers/StoreServerRequest.php b/app/Http/Requests/Api/Application/Servers/StoreServerRequest.php index d12b738e6..e504d7549 100644 --- a/app/Http/Requests/Api/Application/Servers/StoreServerRequest.php +++ b/app/Http/Requests/Api/Application/Servers/StoreServerRequest.php @@ -50,6 +50,11 @@ class StoreServerRequest extends ApplicationApiRequest 'limits.io' => $rules['io'], 'limits.cpu' => $rules['cpu'], + // Application Resource Limits + 'feature_limits' => 'required|array', + 'feature_limits.databases' => $rules['database_limit'], + 'feature_limits.allocations' => $rules['allocation_limit'], + // Placeholders for rules added in withValidator() function. 'allocation.default' => '', 'allocation.additional.*' => '', @@ -94,6 +99,8 @@ class StoreServerRequest extends ApplicationApiRequest 'allocation_id' => array_get($data, 'allocation.default'), 'allocation_additional' => array_get($data, 'allocation.additional'), 'start_on_completion' => array_get($data, 'start_on_completion', false), + 'database_limit' => array_get($data, 'feature_limits.databases'), + 'allocation_limit' => array_get($data, 'feature_limits.allocations'), ]; } diff --git a/app/Services/Servers/ServerCreationService.php b/app/Services/Servers/ServerCreationService.php index 0c5ecd0d4..36144241f 100644 --- a/app/Services/Servers/ServerCreationService.php +++ b/app/Services/Servers/ServerCreationService.php @@ -233,6 +233,8 @@ class ServerCreationService 'startup' => array_get($data, 'startup'), 'daemonSecret' => str_random(Node::DAEMON_SECRET_LENGTH), 'image' => array_get($data, 'image'), + 'database_limit' => array_get($data, 'database_limit'), + 'allocation_limit' => array_get($data, 'allocation_limit'), ]); } diff --git a/config/app.php b/config/app.php index f95d7162d..74c1b0266 100644 --- a/config/app.php +++ b/config/app.php @@ -9,7 +9,7 @@ return [ | change this value if you are not maintaining your own internal versions. */ - 'version' => '0.7.4', + 'version' => '0.7.4.1', /* |-------------------------------------------------------------------------- diff --git a/resources/themes/pterodactyl/admin/servers/new.blade.php b/resources/themes/pterodactyl/admin/servers/new.blade.php index bad452312..50d67d59d 100644 --- a/resources/themes/pterodactyl/admin/servers/new.blade.php +++ b/resources/themes/pterodactyl/admin/servers/new.blade.php @@ -94,6 +94,32 @@ +
+
+
+ +
+

Application Feature Limits

+
+
+
+ +
+ +
+

The total number of databases a user is allowed to create for this server. Leave blank to allow unlimmited.

+
+
+ +
+ +
+

The total number of allocations a user is allowed to create for this server. Leave blank to allow unlimited.

+
+
+
+
+