|
201 | 201 | <p class="text-muted"><small>Select the type of service that this server will be running.</small></p> |
202 | 202 | </div> |
203 | 203 | </div> |
| 204 | + <div class="form-group col-md-12 hidden"> |
| 205 | + <label for="option" class="control-label">Service Pack</label> |
| 206 | + <div> |
| 207 | + <select name="pack" id="getPack" class="form-control"> |
| 208 | + <option disabled selected> -- Select a Service Pack</option> |
| 209 | + </select> |
| 210 | + <p class="text-muted"><small>Select the service pack that should be used for this server. This option can be changed later.</small></p> |
| 211 | + </div> |
| 212 | + </div> |
204 | 213 | </div> |
205 | 214 | </div> |
206 | 215 | </div> |
|
392 | 401 | handleLoader('#load_services', true); |
393 | 402 | $('#serviceOptions').slideUp(); |
394 | 403 | $('#getOption').html('<option disabled selected> -- Select a Service Option</option>'); |
| 404 | + $('#getPack').html('<option disabled selected> -- Select a Service Pack</option>'); |
395 | 405 |
|
396 | 406 | $.ajax({ |
397 | 407 | method: 'POST', |
|
423 | 433 | handleLoader('#serviceOptions', true); |
424 | 434 | $('#serverVariables').html(''); |
425 | 435 | $('input[name="custom_image_name"]').val($(this).find(':selected').data('image')); |
| 436 | + $('#getPack').html('<option disabled selected> -- Select a Service Pack</option>'); |
426 | 437 |
|
427 | 438 | $.ajax({ |
428 | 439 | method: 'POST', |
429 | | - url: '/admin/servers/new/service-variables', |
| 440 | + url: '/admin/servers/new/option-details', |
430 | 441 | headers: { |
431 | 442 | 'X-CSRF-TOKEN': '{{ csrf_token() }}' |
432 | 443 | }, |
|
436 | 447 | }).done(function (data) { |
437 | 448 | $('#startupExec').html(data.exec); |
438 | 449 | $('input[name="startup"]').val(data.startup); |
| 450 | +
|
| 451 | + $.each(data.packs, function (i, item) { |
| 452 | + $('#getPack').append('<option value="' + item.uuid + '">' + item.name + ' (' + item.version + ')</option>'); |
| 453 | + }); |
| 454 | + $('#getPack').append('<option value="none">No Service Pack</option>').parent().parent().removeClass('hidden'); |
| 455 | +
|
439 | 456 | $.each(data.variables, function (i, item) { |
440 | 457 | var isRequired = (item.required === 1) ? '<span class="label label-primary">Required</span> ' : ''; |
441 | 458 | var dataAppend = ' \ |
|
0 commit comments