Skip to content

Commit 4e2602e

Browse files
authored
Merge pull request pterodactyl#1898 from Sir3lit/fixformatting
New server formatting
2 parents 558f7ba + 7daf6e2 commit 4e2602e

File tree

3 files changed

+54
-54
lines changed

3 files changed

+54
-54
lines changed

resources/views/admin/servers/new.blade.php

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -127,14 +127,31 @@
127127
<h3 class="box-title">Resource Management</h3>
128128
</div>
129129
<div class="box-body row">
130-
<div class="form-group col-sm-4">
130+
<div class="form-group col-xs-6">
131+
<label for="pCPU">CPU Limit</label>
132+
<div class="input-group">
133+
<input type="text" class="form-control" value="{{ old('cpu', 0) }}" name="cpu" id="pCPU" />
134+
<span class="input-group-addon">%</span>
135+
</div>
136+
<p class="text-muted small">If you do not want to limit CPU usage, set the value to <code>0</code>. To determine a value, take the number of <em>physical</em> cores and multiply it by 100. For example, on a quad core system <code>(4 * 100 = 400)</code> there is <code>400%</code> available. To limit a server to using half of a single core, you would set the value to <code>50</code>. To allow a server to use up to two physical cores, set the value to <code>200</code>. BlockIO should be a value between <code>10</code> and <code>1000</code>. Please see <a href="https://docs.docker.com/engine/reference/run/#/block-io-bandwidth-blkio-constraint" target="_blank">this documentation</a> for more information about it.<p>
137+
</div>
138+
<div class="form-group col-xs-6">
139+
<label for="pThreads">CPU Threads</label>
140+
<div>
141+
<input type="text" class="form-control" value="{{ old('threads') }}" name="threads" id="pThreads" />
142+
</div>
143+
<p class="text-muted small"><strong>Advanced:</strong> Enter the specific CPU cores that this process can run on, or leave blank to allow all cores. This can be a single number, or a comma seperated list. Example: <code>0</code>, <code>0-1,3</code>, or <code>0,1,3,4</code>.</p>
144+
</div>
145+
</div>
146+
<div class="box-body row">
147+
<div class="form-group col-xs-6">
131148
<label for="pMemory">Memory</label>
132149
<div class="input-group">
133150
<input type="text" value="{{ old('memory') }}" class="form-control" name="memory" id="pMemory" />
134151
<span class="input-group-addon">MB</span>
135152
</div>
136153
</div>
137-
<div class="form-group col-sm-4">
154+
<div class="form-group col-xs-6">
138155
<label for="pSwap">Swap</label>
139156
<div class="input-group">
140157
<input type="text" value="{{ old('swap', 0) }}" class="form-control" name="swap" id="pSwap" />
@@ -146,38 +163,21 @@
146163
<p class="text-muted small">If you do not want to assign swap space to a server, simply put <code>0</code> for the value, or <code>-1</code> to allow unlimited swap space. If you want to disable memory limiting on a server, simply enter <code>0</code> into the memory field.<p>
147164
</div>
148165
<div class="box-body row">
149-
<div class="form-group col-sm-4">
166+
<div class="form-group col-xs-6">
150167
<label for="pDisk">Disk Space</label>
151168
<div class="input-group">
152-
<input type="text" class="form-control" value="{{ old('disk') }}" name="disk" id="pDisk" />
153-
<span class="input-group-addon">MB</span>
154-
</div>
155-
</div>
156-
<div class="form-group col-sm-4">
157-
<label for="pCPU">CPU Limit</label>
158-
<div class="input-group">
159-
<input type="text" class="form-control" value="{{ old('cpu', 0) }}" name="cpu" id="pCPU" />
160-
<span class="input-group-addon">%</span>
161-
</div>
162-
</div>
163-
<div class="form-group col-sm-4">
164-
<label for="pThreads">CPU Threads</label>
165-
<div>
166-
<input type="text" class="form-control" value="{{ old('threads') }}" name="threads" id="pThreads" />
169+
<input type="text" class="form-control" value="{{ old('disk') }}" name="disk" id="pDisk" />
170+
<span class="input-group-addon">MB</span>
167171
</div>
168-
<p class="text-muted small"><strong>Advanced:</strong> Enter the specific CPU cores that this process can run on, or leave blank to allow all cores. This can be a single number, or a comma seperated list. Example: <code>0</code>, <code>0-1,3</code>, or <code>0,1,3,4</code>.</p>
169172
</div>
170-
<div class="form-group col-sm-4">
173+
<div class="form-group col-xs-6">
171174
<label for="pIO">Block IO Weight</label>
172175
<div>
173176
<input type="text" class="form-control" value="{{ old('io', 500) }}" name="io" id="pIO" />
174177
</div>
175178
<p class="text-muted small"><strong>Advanced</strong>: The IO performance of this server relative to other <em>running</em> containers on the system. Value should be between <code>10</code> and <code>1000</code>.</code></p>
176179
</div>
177180
</div>
178-
<div class="box-footer no-border no-pad-top no-pad-bottom">
179-
<p class="text-muted small">If you do not want to limit CPU usage, set the value to <code>0</code>. To determine a value, take the number of <em>physical</em> cores and multiply it by 100. For example, on a quad core system <code>(4 * 100 = 400)</code> there is <code>400%</code> available. To limit a server to using half of a single core, you would set the value to <code>50</code>. To allow a server to use up to two physical cores, set the value to <code>200</code>. BlockIO should be a value between <code>10</code> and <code>1000</code>. Please see <a href="https://docs.docker.com/engine/reference/run/#/block-io-bandwidth-blkio-constraint" target="_blank">this documentation</a> for more information about it.<p>
180-
</div>
181181
</div>
182182
</div>
183183
</div>

resources/views/admin/servers/view/build.blade.php

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,21 @@
2929
<h3 class="box-title">Resource Management</h3>
3030
</div>
3131
<div class="box-body">
32+
<div class="form-group">
33+
<label for="cpu" class="control-label">CPU Limit</label>
34+
<div class="input-group">
35+
<input type="text" name="cpu" class="form-control" value="{{ old('cpu', $server->cpu) }}"/>
36+
<span class="input-group-addon">%</span>
37+
</div>
38+
<p class="text-muted small">Each <em>physical</em> core on the system is considered to be <code>100%</code>. Setting this value to <code>0</code> will allow a server to use CPU time without restrictions.</p>
39+
</div>
40+
<div class="form-group">
41+
<label for="threads" class="control-label">CPU Threads</label>
42+
<div>
43+
<input type="text" name="threads" class="form-control" value="{{ old('threads', $server->threads) }}"/>
44+
</div>
45+
<p class="text-muted small"><strong>Advanced:</strong> Enter the specific CPU cores that this process can run on, or leave blank to allow all cores. This can be a single number, or a comma seperated list. Example: <code>0</code>, <code>0-1,3</code>, or <code>0,1,3,4</code>.</p>
46+
</div>
3247
<div class="form-group">
3348
<label for="memory" class="control-label">Allocated Memory</label>
3449
<div class="input-group">
@@ -46,19 +61,12 @@
4661
<p class="text-muted small">Setting this to <code>0</code> will disable swap space on this server. Setting to <code>-1</code> will allow unlimited swap.</p>
4762
</div>
4863
<div class="form-group">
49-
<label for="cpu" class="control-label">CPU Limit</label>
64+
<label for="cpu" class="control-label">Disk Space Limit</label>
5065
<div class="input-group">
51-
<input type="text" name="cpu" class="form-control" value="{{ old('cpu', $server->cpu) }}"/>
52-
<span class="input-group-addon">%</span>
53-
</div>
54-
<p class="text-muted small">Each <em>physical</em> core on the system is considered to be <code>100%</code>. Setting this value to <code>0</code> will allow a server to use CPU time without restrictions.</p>
55-
</div>
56-
<div class="form-group">
57-
<label for="threads" class="control-label">CPU Threads</label>
58-
<div>
59-
<input type="text" name="threads" class="form-control" value="{{ old('threads', $server->threads) }}"/>
66+
<input type="text" name="disk" class="form-control" value="{{ old('disk', $server->disk) }}"/>
67+
<span class="input-group-addon">MB</span>
6068
</div>
61-
<p class="text-muted small"><strong>Advanced:</strong> Enter the specific CPU cores that this process can run on, or leave blank to allow all cores. This can be a single number, or a comma seperated list. Example: <code>0</code>, <code>0-1,3</code>, or <code>0,1,3,4</code>.</p>
69+
<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>
6270
</div>
6371
<div class="form-group">
6472
<label for="io" class="control-label">Block IO Proportion</label>
@@ -67,14 +75,6 @@
6775
</div>
6876
<p class="text-muted small"><strong>Advanced</strong>: The IO performance of this server relative to other <em>running</em> containers on the system. Value should be between <code>10</code> and <code>1000</code>.</code></p>
6977
</div>
70-
<div class="form-group">
71-
<label for="cpu" class="control-label">Disk Space Limit</label>
72-
<div class="input-group">
73-
<input type="text" name="disk" class="form-control" value="{{ old('disk', $server->disk) }}"/>
74-
<span class="input-group-addon">MB</span>
75-
</div>
76-
<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>
77-
</div>
7878
<div class="form-group">
7979
<label for="cpu" class="control-label">OOM Killer</label>
8080
<div>

resources/views/admin/servers/view/index.blade.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -57,18 +57,6 @@
5757
<td>Name</td>
5858
<td>{{ $server->name }}</td>
5959
</tr>
60-
<tr>
61-
<td>Memory</td>
62-
<td><code>{{ $server->memory }}MB</code> / <code data-toggle="tooltip" data-placement="top" title="Swap Space">{{ $server->swap }}MB</code></td>
63-
</tr>
64-
<tr>
65-
<td>Disk Space</td>
66-
<td><code>{{ $server->disk }}MB</code></td>
67-
</tr>
68-
<tr>
69-
<td>Block IO Weight</td>
70-
<td><code>{{ $server->io }}</code></td>
71-
</tr>
7260
<tr>
7361
<td>CPU Limit</td>
7462
<td><code>{{ $server->cpu }}%</code></td>
@@ -83,6 +71,18 @@
8371
@endif
8472
</td>
8573
</tr>
74+
<tr>
75+
<td>Memory</td>
76+
<td><code>{{ $server->memory }}MB</code> / <code data-toggle="tooltip" data-placement="top" title="Swap Space">{{ $server->swap }}MB</code></td>
77+
</tr>
78+
<tr>
79+
<td>Disk Space</td>
80+
<td><code>{{ $server->disk }}MB</code></td>
81+
</tr>
82+
<tr>
83+
<td>Block IO Weight</td>
84+
<td><code>{{ $server->io }}</code></td>
85+
</tr>
8686
<tr>
8787
<td>Default Connection</td>
8888
<td><code>{{ $server->allocation->ip }}:{{ $server->allocation->port }}</code></td>

0 commit comments

Comments
 (0)