We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 166812b + 58e0dac commit 5218c7fCopy full SHA for 5218c7f
5 files changed
CHANGELOG.md
@@ -3,6 +3,10 @@ This file is a running track of new features and fixes to each version of the pa
3
4
This project follows [Semantic Versioning](http://semver.org) guidelines.
5
6
+## v0.7.4-h1 (Derelict Dermodactylus)
7
+### Fixed
8
+* Being able to create servers is kind of a core aspect of the software, pushing releases late at night is not a great idea.
9
+
10
## v0.7.4 (Derelict Dermodactylus)
11
### Fixed
12
* Fixes a bug when reinstalling a server that would not mark the server as installing, resulting in some UI issues.
app/Http/Requests/Api/Application/Servers/StoreServerRequest.php
@@ -50,6 +50,11 @@ public function rules(): array
50
'limits.io' => $rules['io'],
51
'limits.cpu' => $rules['cpu'],
52
53
+ // Application Resource Limits
54
+ 'feature_limits' => 'required|array',
55
+ 'feature_limits.databases' => $rules['database_limit'],
56
+ 'feature_limits.allocations' => $rules['allocation_limit'],
57
58
// Placeholders for rules added in withValidator() function.
59
'allocation.default' => '',
60
'allocation.additional.*' => '',
@@ -94,6 +99,8 @@ public function validated()
94
99
'allocation_id' => array_get($data, 'allocation.default'),
95
100
'allocation_additional' => array_get($data, 'allocation.additional'),
96
101
'start_on_completion' => array_get($data, 'start_on_completion', false),
102
+ 'database_limit' => array_get($data, 'feature_limits.databases'),
103
+ 'allocation_limit' => array_get($data, 'feature_limits.allocations'),
97
104
];
98
105
}
106
app/Services/Servers/ServerCreationService.php
@@ -233,6 +233,8 @@ private function createModel(array $data): Server
233
'startup' => array_get($data, 'startup'),
234
'daemonSecret' => str_random(Node::DAEMON_SECRET_LENGTH),
235
'image' => array_get($data, 'image'),
236
+ 'database_limit' => array_get($data, 'database_limit'),
237
+ 'allocation_limit' => array_get($data, 'allocation_limit'),
238
]);
239
240
config/app.php
@@ -9,7 +9,7 @@
| change this value if you are not maintaining your own internal versions.
*/
- 'version' => '0.7.4',
+ 'version' => '0.7.4.1',
13
14
/*
15
|--------------------------------------------------------------------------
resources/themes/pterodactyl/admin/servers/new.blade.php
@@ -94,6 +94,32 @@
</div>
+ <div class="row">
+ <div class="col-xs-12">
+ <div class="box">
+ <div class="overlay" id="allocationLoader" style="display:none;"><i class="fa fa-refresh fa-spin"></i></div>
+ <div class="box-header with-border">
+ <h3 class="box-title">Application Feature Limits</h3>
+ </div>
+ <div class="box-body row">
+ <div class="form-group col-xs-6">
+ <label for="cpu" class="control-label">Database Limit</label>
107
+ <div>
108
+ <input type="text" name="database_limit" class="form-control" value="{{ old('database_limit', 0) }}"/>
109
110
+ <p class="text-muted small">The total number of databases a user is allowed to create for this server. Leave blank to allow unlimmited.</p>
111
112
113
+ <label for="cpu" class="control-label">Allocation Limit</label>
114
115
+ <input type="text" name="allocation_limit" class="form-control" value="{{ old('allocation_limit', 0) }}"/>
116
117
+ <p class="text-muted small">The total number of allocations a user is allowed to create for this server. Leave blank to allow unlimited.</p>
118
119
120
121
122
123
<div class="row">
124
<div class="col-xs-12">
125
<div class="box">
0 commit comments