Skip to content

Commit 147f473

Browse files
committed
Add back disk limiting!
1 parent 4928620 commit 147f473

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

app/Http/Controllers/Admin/ServersController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ public function updateBuild(Request $request, $id)
436436
try {
437437
$repo->changeBuild($id, $request->intersect([
438438
'allocation_id', 'add_allocations', 'remove_allocations',
439-
'memory', 'swap', 'io', 'cpu',
439+
'memory', 'swap', 'io', 'cpu', 'disk',
440440
]));
441441

442442
Alert::success('Server details were successfully updated.')->flash();

resources/themes/pterodactyl/admin/servers/view/build.blade.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,14 @@
9191
</div>
9292
<p class="text-muted small">Changing this value can have negative effects on all containers on the system. We strongly recommend leaving this value as <code>500</code>.</p>
9393
</div>
94-
94+
<div class="form-group">
95+
<label for="cpu" class="control-label">Disk Space Limit</label>
96+
<div class="input-group">
97+
<input type="text" name="disk" class="form-control" value="{{ old('disk', $server->disk) }}"/>
98+
<span class="input-group-addon">MB</span>
99+
</div>
100+
<p class="text-muted small">This server will not be allowed to boot if it is using more than this amount of space. If a server goes over this limit while running it will be safely stopped and locked until enough space is available.</p>
101+
</div>
95102
</div>
96103
</div>
97104
</div>

0 commit comments

Comments
 (0)