Fix new server page display

This commit is contained in:
Dane Everitt 2017-03-16 20:29:48 -04:00
parent 48e261bb91
commit 34d5e81b7a
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
2 changed files with 5 additions and 13 deletions

View file

@ -162,11 +162,6 @@ $('#pOptionId').on('change', function (event) {
$('#pStartup').val(_.get(objectChain, 'startup')); $('#pStartup').val(_.get(objectChain, 'startup'));
} }
if (!_.get(objectChain, 'executable', false)) {
$('#pStartupExecutable').html(_.get(parentChain, 'executable', 'ERROR: Exec Not Defined!'));
} else {
$('#pStartupExecutable').html(_.get(objectChain, 'executable'));
}
$('#pPackId').html('').select2({ $('#pPackId').html('').select2({
data: [{ id: 0, text: 'No Service Pack' }].concat( data: [{ id: 0, text: 'No Service Pack' }].concat(
$.map(_.get(objectChain, 'packs', []), function (item, i) { $.map(_.get(objectChain, 'packs', []), function (item, i) {
@ -186,8 +181,8 @@ $('#pOptionId').on('change', function (event) {
<label for="var_ref_' + item.id + '" class="control-label">' + isRequired + item.name + '</label> \ <label for="var_ref_' + item.id + '" class="control-label">' + isRequired + item.name + '</label> \
<input type="text" id="var_ref_' + item.id + '" autocomplete="off" name="env_' + item.env_variable + '" class="form-control" value="' + item.default_value + '" /> \ <input type="text" id="var_ref_' + item.id + '" autocomplete="off" name="env_' + item.env_variable + '" class="form-control" value="' + item.default_value + '" /> \
<p class="text-muted small">' + item.description + '<br /> \ <p class="text-muted small">' + item.description + '<br /> \
<strong>Access in Startup:</strong> <code>@{{' + item.env_variable + '}}</code><br /> \ <strong>Access in Startup:</strong> <code>{{' + item.env_variable + '}}</code><br /> \
<strong>Validation Regex:</strong> <code>' + item.regex + '</code></small></p> \ <strong>Validation Rules:</strong> <code>' + item.rules + '</code></small></p> \
</div> \ </div> \
'; ';
$('#appendVariablesTo').append(dataAppend); $('#appendVariablesTo').append(dataAppend);

View file

@ -147,14 +147,14 @@
<div class="form-group col-sm-4"> <div class="form-group col-sm-4">
<label for="pCPU">CPU Limit</label> <label for="pCPU">CPU Limit</label>
<div class="input-group"> <div class="input-group">
<input type="text" class="form-control" value="{{ old('cpu') }}" name="cpu" id="pCPU" /> <input type="text" class="form-control" value="{{ old('cpu', 0) }}" name="cpu" id="pCPU" />
<span class="input-group-addon">%</span> <span class="input-group-addon">%</span>
</div> </div>
</div> </div>
<div class="form-group col-sm-4"> <div class="form-group col-sm-4">
<label for="pIO">Block IO Weight</label> <label for="pIO">Block IO Weight</label>
<div class="input-group"> <div class="input-group">
<input type="text" class="form-control" value="{{ old('io') }}" value="500" name="io" id="pIO" /> <input type="text" class="form-control" value="{{ old('io', 500) }}" name="io" id="pIO" />
<span class="input-group-addon">I/O</span> <span class="input-group-addon">I/O</span>
</div> </div>
</div> </div>
@ -229,10 +229,7 @@
<div class="box-body row"> <div class="box-body row">
<div class="form-group col-xs-12"> <div class="form-group col-xs-12">
<label for="pStartup">Startup Command</label> <label for="pStartup">Startup Command</label>
<div class="input-group"> <input type="text" id="pStartup" value="{{ old('startup') }}" class="form-control" name="startup" />
<span class="input-group-addon bg-gray" id="pStartupExecutable"></span>
<input type="text" id="pStartup" value="{{ old('startup') }}" class="form-control" name="startup" />
</div>
<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> <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>
</div> </div>
</div> </div>