Skip to content

Commit 34d5e81

Browse files
committed
Fix new server page display
1 parent 48e261b commit 34d5e81

File tree

2 files changed

+5
-13
lines changed

2 files changed

+5
-13
lines changed

public/themes/pterodactyl/js/admin/new-server.js

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -162,11 +162,6 @@ $('#pOptionId').on('change', function (event) {
162162
$('#pStartup').val(_.get(objectChain, 'startup'));
163163
}
164164

165-
if (!_.get(objectChain, 'executable', false)) {
166-
$('#pStartupExecutable').html(_.get(parentChain, 'executable', 'ERROR: Exec Not Defined!'));
167-
} else {
168-
$('#pStartupExecutable').html(_.get(objectChain, 'executable'));
169-
}
170165
$('#pPackId').html('').select2({
171166
data: [{ id: 0, text: 'No Service Pack' }].concat(
172167
$.map(_.get(objectChain, 'packs', []), function (item, i) {
@@ -186,8 +181,8 @@ $('#pOptionId').on('change', function (event) {
186181
<label for="var_ref_' + item.id + '" class="control-label">' + isRequired + item.name + '</label> \
187182
<input type="text" id="var_ref_' + item.id + '" autocomplete="off" name="env_' + item.env_variable + '" class="form-control" value="' + item.default_value + '" /> \
188183
<p class="text-muted small">' + item.description + '<br /> \
189-
<strong>Access in Startup:</strong> <code>@{{' + item.env_variable + '}}</code><br /> \
190-
<strong>Validation Regex:</strong> <code>' + item.regex + '</code></small></p> \
184+
<strong>Access in Startup:</strong> <code>{{' + item.env_variable + '}}</code><br /> \
185+
<strong>Validation Rules:</strong> <code>' + item.rules + '</code></small></p> \
191186
</div> \
192187
';
193188
$('#appendVariablesTo').append(dataAppend);

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

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -147,14 +147,14 @@
147147
<div class="form-group col-sm-4">
148148
<label for="pCPU">CPU Limit</label>
149149
<div class="input-group">
150-
<input type="text" class="form-control" value="{{ old('cpu') }}" name="cpu" id="pCPU" />
150+
<input type="text" class="form-control" value="{{ old('cpu', 0) }}" name="cpu" id="pCPU" />
151151
<span class="input-group-addon">%</span>
152152
</div>
153153
</div>
154154
<div class="form-group col-sm-4">
155155
<label for="pIO">Block IO Weight</label>
156156
<div class="input-group">
157-
<input type="text" class="form-control" value="{{ old('io') }}" value="500" name="io" id="pIO" />
157+
<input type="text" class="form-control" value="{{ old('io', 500) }}" name="io" id="pIO" />
158158
<span class="input-group-addon">I/O</span>
159159
</div>
160160
</div>
@@ -229,10 +229,7 @@
229229
<div class="box-body row">
230230
<div class="form-group col-xs-12">
231231
<label for="pStartup">Startup Command</label>
232-
<div class="input-group">
233-
<span class="input-group-addon bg-gray" id="pStartupExecutable"></span>
234-
<input type="text" id="pStartup" value="{{ old('startup') }}" class="form-control" name="startup" />
235-
</div>
232+
<input type="text" id="pStartup" value="{{ old('startup') }}" class="form-control" name="startup" />
236233
<p class="small text-muted no-margin">The following data replacers are avaliable for the startup command: <code>@{{SERVER_MEMORY}}</code>, <code>@{{SERVER_IP}}</code>, and <code>@{{SERVER_PORT}}</code>. They will be replaced with the allocated memory, server ip, and server port respectively.</p>
237234
</div>
238235
</div>

0 commit comments

Comments
 (0)