Fix pack selector
This commit is contained in:
parent
c4a4b84bd3
commit
75de060a55
|
@ -276,7 +276,7 @@ class ServersController extends Controller
|
|||
->first();
|
||||
|
||||
return response()->json([
|
||||
'packs' => Models\ServicePack::select('uuid', 'name', 'version')->where('option', $request->input('option'))->where('selectable', true)->get(),
|
||||
'packs' => Models\ServicePack::select('id', 'name', 'version')->where('option', $request->input('option'))->where('selectable', true)->get(),
|
||||
'variables' => Models\ServiceVariables::where('option_id', $request->input('option'))->get(),
|
||||
'exec' => $option->executable,
|
||||
'startup' => $option->startup
|
||||
|
|
|
@ -86,7 +86,7 @@ class ServerRepository
|
|||
'disk' => 'required|numeric|min:0',
|
||||
'service' => 'bail|required|numeric|min:1|exists:services,id',
|
||||
'option' => 'bail|required|numeric|min:1|exists:service_options,id',
|
||||
'pack' => 'bail|required|numeric|min:0'
|
||||
'pack' => 'bail|required|numeric|min:0',
|
||||
'startup' => 'string',
|
||||
'custom_image_name' => 'required_if:use_custom_image,on',
|
||||
'auto_deploy' => 'sometimes|boolean'
|
||||
|
|
|
@ -449,7 +449,7 @@ $(document).ready(function () {
|
|||
$('input[name="startup"]').val(data.startup);
|
||||
|
||||
$.each(data.packs, function (i, item) {
|
||||
$('#getPack').append('<option value="' + item.uuid + '">' + item.name + ' (' + item.version + ')</option>');
|
||||
$('#getPack').append('<option value="' + item.id + '">' + item.name + ' (' + item.version + ')</option>');
|
||||
});
|
||||
$('#getPack').append('<option value="0">No Service Pack</option>').parent().parent().removeClass('hidden');
|
||||
|
||||
|
|
Loading…
Reference in New Issue