Skip to content

Commit 5218c7f

Browse files
committed
Merge branch 'release/v0.7.4.h1'
2 parents 166812b + 58e0dac commit 5218c7f

File tree

5 files changed

+40
-1
lines changed

5 files changed

+40
-1
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ This file is a running track of new features and fixes to each version of the pa
33

44
This project follows [Semantic Versioning](http://semver.org) guidelines.
55

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+
610
## v0.7.4 (Derelict Dermodactylus)
711
### Fixed
812
* 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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@ public function rules(): array
5050
'limits.io' => $rules['io'],
5151
'limits.cpu' => $rules['cpu'],
5252

53+
// Application Resource Limits
54+
'feature_limits' => 'required|array',
55+
'feature_limits.databases' => $rules['database_limit'],
56+
'feature_limits.allocations' => $rules['allocation_limit'],
57+
5358
// Placeholders for rules added in withValidator() function.
5459
'allocation.default' => '',
5560
'allocation.additional.*' => '',
@@ -94,6 +99,8 @@ public function validated()
9499
'allocation_id' => array_get($data, 'allocation.default'),
95100
'allocation_additional' => array_get($data, 'allocation.additional'),
96101
'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'),
97104
];
98105
}
99106

app/Services/Servers/ServerCreationService.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,8 @@ private function createModel(array $data): Server
233233
'startup' => array_get($data, 'startup'),
234234
'daemonSecret' => str_random(Node::DAEMON_SECRET_LENGTH),
235235
'image' => array_get($data, 'image'),
236+
'database_limit' => array_get($data, 'database_limit'),
237+
'allocation_limit' => array_get($data, 'allocation_limit'),
236238
]);
237239
}
238240

config/app.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
| change this value if you are not maintaining your own internal versions.
1010
*/
1111

12-
'version' => '0.7.4',
12+
'version' => '0.7.4.1',
1313

1414
/*
1515
|--------------------------------------------------------------------------

resources/themes/pterodactyl/admin/servers/new.blade.php

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,32 @@
9494
</div>
9595
</div>
9696
</div>
97+
<div class="row">
98+
<div class="col-xs-12">
99+
<div class="box">
100+
<div class="overlay" id="allocationLoader" style="display:none;"><i class="fa fa-refresh fa-spin"></i></div>
101+
<div class="box-header with-border">
102+
<h3 class="box-title">Application Feature Limits</h3>
103+
</div>
104+
<div class="box-body row">
105+
<div class="form-group col-xs-6">
106+
<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+
</div>
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+
</div>
112+
<div class="form-group col-xs-6">
113+
<label for="cpu" class="control-label">Allocation Limit</label>
114+
<div>
115+
<input type="text" name="allocation_limit" class="form-control" value="{{ old('allocation_limit', 0) }}"/>
116+
</div>
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+
</div>
119+
</div>
120+
</div>
121+
</div>
122+
</div>
97123
<div class="row">
98124
<div class="col-xs-12">
99125
<div class="box">

0 commit comments

Comments
 (0)