Singularize model names.

This commit is contained in:
Dane Everitt 2017-02-12 16:02:23 -05:00
parent 7c916ad38f
commit 8ba479e51f
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
25 changed files with 73 additions and 73 deletions

View file

@ -49,7 +49,7 @@ class PackController extends Controller
public function listByOption(Request $request, $id)
{
return view('admin.services.packs.byoption', [
'option' => Models\ServiceOptions::with('service', 'packs')->findOrFail($id),
'option' => Models\ServiceOption::with('service', 'packs')->findOrFail($id),
]);
}

View file

@ -152,7 +152,7 @@ class ServersController extends Controller
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Contracts\View\View
*/
public function postNewServerServiceOptions(Request $request)
public function postNewServerServiceOption(Request $request)
{
if (! $request->input('service')) {
return response()->json([
@ -162,7 +162,7 @@ class ServersController extends Controller
$service = Models\Service::select('executable', 'startup')->where('id', $request->input('service'))->first();
return response()->json(Models\ServiceOptions::select('id', 'name', 'docker_image')->where('service_id', $request->input('service'))->orderBy('name', 'asc')->get());
return response()->json(Models\ServiceOption::select('id', 'name', 'docker_image')->where('service_id', $request->input('service'))->orderBy('name', 'asc')->get());
}
/**
@ -179,7 +179,7 @@ class ServersController extends Controller
], 500);
}
$option = Models\ServiceOptions::with('variables')->with(['packs' => function ($query) {
$option = Models\ServiceOption::with('variables')->with(['packs' => function ($query) {
$query->where('selectable', true);
}])->findOrFail($request->input('option'));

View file

@ -124,7 +124,7 @@ class ServiceController extends Controller
public function getOption(Request $request, $service, $option)
{
$option = Models\ServiceOptions::with('service', 'variables')->findOrFail($option);
$option = Models\ServiceOption::with('service', 'variables')->findOrFail($option);
$option->setRelation('servers', $option->servers()->with('user')->paginate(25));
return view('admin.services.options.view', ['option' => $option]);
@ -205,7 +205,7 @@ class ServiceController extends Controller
public function getNewVariable(Request $request, $service, $option)
{
return view('admin.services.options.variable', [
'option' => Models\ServiceOptions::with('service')->findOrFail($option),
'option' => Models\ServiceOption::with('service')->findOrFail($option),
]);
}

View file

@ -214,7 +214,7 @@ class ServerController extends Controller
}]);
$this->authorize('view-startup', $server);
$variables = Models\ServiceVariables::select(
$variables = Models\ServiceVariable::select(
'service_variables.*',
DB::raw('COALESCE(server_variables.variable_value, service_variables.default_value) as a_serverValue')
)->leftJoin('server_variables', 'server_variables.variable_id', '=', 'service_variables.id')

View file

@ -144,7 +144,7 @@ class AdminRoutes
]);
$router->post('/new/service-options', [
'uses' => 'Admin\ServersController@postNewServerServiceOptions',
'uses' => 'Admin\ServersController@postNewServerServiceOption',
]);
$router->post('/new/option-details', [

View file

@ -253,7 +253,7 @@ class Server extends Model
*/
public function option()
{
return $this->belongsTo(ServiceOptions::class);
return $this->belongsTo(ServiceOption::class);
}
/**

View file

@ -59,6 +59,6 @@ class ServerVariables extends Model
*/
public function variable()
{
return $this->belongsTo(ServiceVariables::class, 'variable_id');
return $this->belongsTo(ServiceVariable::class, 'variable_id');
}
}

View file

@ -49,7 +49,7 @@ class Service extends Model
*/
public function options()
{
return $this->hasMany(ServiceOptions::class);
return $this->hasMany(ServiceOption::class);
}
/**
@ -60,7 +60,7 @@ class Service extends Model
public function packs()
{
return $this->hasManyThrough(
'Pterodactyl\Models\ServicePack', 'Pterodactyl\Models\ServiceOptions',
'Pterodactyl\Models\ServicePack', 'Pterodactyl\Models\ServiceOption',
'service_id', 'option_id'
);
}

View file

@ -26,7 +26,7 @@ namespace Pterodactyl\Models;
use Illuminate\Database\Eloquent\Model;
class ServiceOptions extends Model
class ServiceOption extends Model
{
/**
* The table associated with the model.
@ -100,7 +100,7 @@ class ServiceOptions extends Model
*/
public function variables()
{
return $this->hasMany(ServiceVariables::class, 'option_id');
return $this->hasMany(ServiceVariable::class, 'option_id');
}
/**

View file

@ -64,6 +64,6 @@ class ServicePack extends Model
*/
public function option()
{
return $this->belongsTo(ServiceOptions::class);
return $this->belongsTo(ServiceOption::class);
}
}

View file

@ -26,7 +26,7 @@ namespace Pterodactyl\Models;
use Illuminate\Database\Eloquent\Model;
class ServiceVariables extends Model
class ServiceVariable extends Model
{
/**
* The table associated with the model.

View file

@ -159,7 +159,7 @@ class ServerRepository
// We know the service and option exists because of the validation.
// We need to verify that the option exists for the service, and then check for
// any required variable fields. (fields are labeled env_<env_variable>)
$option = Models\ServiceOptions::where('id', $data['option'])->where('service_id', $data['service'])->first();
$option = Models\ServiceOption::where('id', $data['option'])->where('service_id', $data['service'])->first();
if (! $option) {
throw new DisplayException('The requested service option does not exist for the specified service.');
}
@ -180,7 +180,7 @@ class ServerRepository
$service = Models\Service::find($option->service_id);
// Check those Variables
$variables = Models\ServiceVariables::where('option_id', $data['option_id'])->get();
$variables = Models\ServiceVariable::where('option_id', $data['option_id'])->get();
$variableList = [];
if ($variables) {
foreach ($variables as $variable) {

View file

@ -62,7 +62,7 @@ class Option
$data['startup'] = null;
}
$option = new Models\ServiceOptions;
$option = new Models\ServiceOption;
$option->service_id = $service->id;
$option->fill($data);
$option->save();
@ -72,7 +72,7 @@ class Option
public function delete($id)
{
$option = Models\ServiceOptions::findOrFail($id);
$option = Models\ServiceOption::findOrFail($id);
$servers = Models\Server::where('option', $option->id)->get();
if (count($servers) !== 0) {
@ -82,7 +82,7 @@ class Option
DB::beginTransaction();
try {
Models\ServiceVariables::where('option_id', $option->id)->delete();
Models\ServiceVariable::where('option_id', $option->id)->delete();
$option->delete();
DB::commit();
@ -94,7 +94,7 @@ class Option
public function update($id, array $data)
{
$option = Models\ServiceOptions::findOrFail($id);
$option = Models\ServiceOption::findOrFail($id);
$validator = Validator::make($data, [
'name' => 'sometimes|required|string|max:255',

View file

@ -94,7 +94,7 @@ class Service
{
$service = Models\Service::findOrFail($id);
$servers = Models\Server::where('service', $service->id)->get();
$options = Models\ServiceOptions::select('id')->where('service_id', $service->id);
$options = Models\ServiceOption::select('id')->where('service_id', $service->id);
if (count($servers) !== 0) {
throw new DisplayException('You cannot delete a service that has servers associated with it.');
@ -102,7 +102,7 @@ class Service
DB::beginTransaction();
try {
Models\ServiceVariables::whereIn('option_id', $options->get()->toArray())->delete();
Models\ServiceVariable::whereIn('option_id', $options->get()->toArray())->delete();
$options->delete();
$service->delete();

View file

@ -39,7 +39,7 @@ class Variable
public function create($id, array $data)
{
$option = Models\ServiceOptions::select('id')->findOrFail($id);
$option = Models\ServiceOption::select('id')->findOrFail($id);
$validator = Validator::make($data, [
'name' => 'required|string|min:1|max:255',
@ -60,7 +60,7 @@ class Variable
throw new DisplayException('The default value you entered cannot violate the regex requirements.');
}
if (Models\ServiceVariables::where('env_variable', $data['env_variable'])->where('option_id', $option->id)->first()) {
if (Models\ServiceVariable::where('env_variable', $data['env_variable'])->where('option_id', $option->id)->first()) {
throw new DisplayException('An environment variable with that name already exists for this option.');
}
@ -69,14 +69,14 @@ class Variable
$data['required'] = (isset($data['required']) && in_array((int) $data['required'], [0, 1])) ? $data['required'] : 0;
$data['option_id'] = $option->id;
$variable = Models\ServiceVariables::create($data);
$variable = Models\ServiceVariable::create($data);
return $variable;
}
public function delete($id)
{
$variable = Models\ServiceVariables::with('serverVariables')->findOrFail($id);
$variable = Models\ServiceVariable::with('serverVariables')->findOrFail($id);
DB::beginTransaction();
try {
@ -94,7 +94,7 @@ class Variable
public function update($id, array $data)
{
$variable = Models\ServiceVariables::findOrFail($id);
$variable = Models\ServiceVariable::findOrFail($id);
$validator = Validator::make($data, [
'name' => 'sometimes|required|string|min:1|max:255',
@ -118,7 +118,7 @@ class Variable
throw new DisplayException('The default value you entered cannot violate the regex requirements.');
}
if (Models\ServiceVariables::where('id', '!=', $variable->id)->where('env_variable', $data['env_variable'])->where('option_id', $variable->option_id)->first()) {
if (Models\ServiceVariable::where('id', '!=', $variable->id)->where('env_variable', $data['env_variable'])->where('option_id', $variable->option_id)->first()) {
throw new DisplayException('An environment variable with that name already exists for this option.');
}

View file

@ -3,7 +3,7 @@
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class AddServiceOptions extends Migration
class AddServiceOption extends Migration
{
/**
* Run the migrations.

View file

@ -4,7 +4,7 @@ use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class AddForeignServiceOptions extends Migration
class AddForeignServiceOption extends Migration
{
/**
* Run the migrations.

View file

@ -4,7 +4,7 @@ use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class AddForeignServiceVariables extends Migration
class AddForeignServiceVariable extends Migration
{
/**
* Run the migrations.

View file

@ -2,7 +2,7 @@
use Illuminate\Database\Migrations\Migration;
class CorrectServiceVariables extends Migration
class CorrectServiceVariable extends Migration
{
/**
* Run the migrations.

View file

@ -66,7 +66,7 @@ class MinecraftServiceTableSeeder extends Seeder
private function addCoreOptions()
{
$this->option['vanilla'] = Models\ServiceOptions::create([
$this->option['vanilla'] = Models\ServiceOption::create([
'parent_service' => $this->service->id,
'name' => 'Vanilla Minecraft',
'description' => 'Minecraft is a game about placing blocks and going on adventures. Explore randomly generated worlds and build amazing things from the simplest of homes to the grandest of castles. Play in Creative Mode with unlimited resources or mine deep in Survival Mode, crafting weapons and armor to fend off dangerous mobs. Do all this alone or with friends.',
@ -76,7 +76,7 @@ class MinecraftServiceTableSeeder extends Seeder
'startup' => null,
]);
$this->option['spigot'] = Models\ServiceOptions::create([
$this->option['spigot'] = Models\ServiceOption::create([
'parent_service' => $this->service->id,
'name' => 'Spigot',
'description' => 'Spigot is the most widely-used modded Minecraft server software in the world. It powers many of the top Minecraft server networks around to ensure they can cope with their huge player base and ensure the satisfaction of their players. Spigot works by reducing and eliminating many causes of lag, as well as adding in handy features and settings that help make your job of server administration easier.',
@ -86,7 +86,7 @@ class MinecraftServiceTableSeeder extends Seeder
'startup' => '-Xms128M -Xmx{{SERVER_MEMORY}}M -jar {{SERVER_JARFILE}}',
]);
$this->option['sponge'] = Models\ServiceOptions::create([
$this->option['sponge'] = Models\ServiceOption::create([
'parent_service' => $this->service->id,
'name' => 'Sponge (SpongeVanilla)',
'description' => 'SpongeVanilla is the SpongeAPI implementation for Vanilla Minecraft.',
@ -96,7 +96,7 @@ class MinecraftServiceTableSeeder extends Seeder
'startup' => null,
]);
$this->option['bungeecord'] = Models\ServiceOptions::create([
$this->option['bungeecord'] = Models\ServiceOption::create([
'parent_service' => $this->service->id,
'name' => 'Bungeecord',
'description' => 'For a long time, Minecraft server owners have had a dream that encompasses a free, easy, and reliable way to connect multiple Minecraft servers together. BungeeCord is the answer to said dream. Whether you are a small server wishing to string multiple game-modes together, or the owner of the ShotBow Network, BungeeCord is the ideal solution for you. With the help of BungeeCord, you will be able to unlock your community\'s full potential.',
@ -117,7 +117,7 @@ class MinecraftServiceTableSeeder extends Seeder
private function addVanillaVariables()
{
Models\ServiceVariables::create([
Models\ServiceVariable::create([
'option_id' => $this->option['vanilla']->id,
'name' => 'Server Jar File',
'description' => 'The name of the server jarfile to run the server with.',
@ -129,7 +129,7 @@ class MinecraftServiceTableSeeder extends Seeder
'regex' => '/^([\w\d._-]+)(\.jar)$/',
]);
Models\ServiceVariables::create([
Models\ServiceVariable::create([
'option_id' => $this->option['vanilla']->id,
'name' => 'Server Version',
'description' => 'The version of Minecraft Vanilla to install. Use "latest" to install the latest version.',
@ -144,7 +144,7 @@ class MinecraftServiceTableSeeder extends Seeder
private function addSpigotVariables()
{
Models\ServiceVariables::create([
Models\ServiceVariable::create([
'option_id' => $this->option['spigot']->id,
'name' => 'Server Jar File',
'description' => 'The name of the server jarfile to run the server with.',
@ -156,7 +156,7 @@ class MinecraftServiceTableSeeder extends Seeder
'regex' => '/^([\w\d._-]+)(\.jar)$/',
]);
Models\ServiceVariables::create([
Models\ServiceVariable::create([
'option_id' => $this->option['spigot']->id,
'name' => 'Spigot Version',
'description' => 'The version of Spigot to download (using the --rev tag). Use "latest" for latest.',
@ -168,7 +168,7 @@ class MinecraftServiceTableSeeder extends Seeder
'regex' => '/^(latest|[a-zA-Z0-9_\.-]{3,7})$/',
]);
Models\ServiceVariables::create([
Models\ServiceVariable::create([
'option_id' => $this->option['spigot']->id,
'name' => 'Download Path',
'description' => 'A URL to use to download Spigot rather than building it on the server. This is not user viewable. Use <code>{{DL_VERSION}}</code> in the URL to automatically insert the assigned version into the URL. If you do not enter a URL Spigot will build directly in the container (this will fail on low memory containers).',
@ -183,7 +183,7 @@ class MinecraftServiceTableSeeder extends Seeder
private function addSpongeVariables()
{
Models\ServiceVariables::create([
Models\ServiceVariable::create([
'option_id' => $this->option['sponge']->id,
'name' => 'Sponge Version',
'description' => 'The version of SpongeVanilla to download and use.',
@ -195,7 +195,7 @@ class MinecraftServiceTableSeeder extends Seeder
'regex' => '/^([a-zA-Z0-9.\-_]+)$/',
]);
Models\ServiceVariables::create([
Models\ServiceVariable::create([
'option_id' => $this->option['sponge']->id,
'name' => 'Server Jar File',
'description' => 'The name of the Jarfile to use when running SpongeVanilla.',
@ -210,7 +210,7 @@ class MinecraftServiceTableSeeder extends Seeder
private function addBungeecordVariables()
{
Models\ServiceVariables::create([
Models\ServiceVariable::create([
'option_id' => $this->option['bungeecord']->id,
'name' => 'Bungeecord Version',
'description' => 'The version of Bungeecord to download and use.',
@ -222,7 +222,7 @@ class MinecraftServiceTableSeeder extends Seeder
'regex' => '/^(latest|[\d]{1,6})$/',
]);
Models\ServiceVariables::create([
Models\ServiceVariable::create([
'option_id' => $this->option['bungeecord']->id,
'name' => 'Bungeecord Jar File',
'description' => 'The name of the Jarfile to use when running Bungeecord.',

View file

@ -66,7 +66,7 @@ class SourceServiceTableSeeder extends Seeder
private function addCoreOptions()
{
$this->option['insurgency'] = Models\ServiceOptions::create([
$this->option['insurgency'] = Models\ServiceOption::create([
'parent_service' => $this->service->id,
'name' => 'Insurgency',
'description' => 'Take to the streets for intense close quarters combat, where a team\'s survival depends upon securing crucial strongholds and destroying enemy supply in this multiplayer and cooperative Source Engine based experience.',
@ -76,7 +76,7 @@ class SourceServiceTableSeeder extends Seeder
'startup' => '-game {{SRCDS_GAME}} -console -port {{SERVER_PORT}} +map {{SRCDS_MAP}} -strictportbind -norestart',
]);
$this->option['tf2'] = Models\ServiceOptions::create([
$this->option['tf2'] = Models\ServiceOption::create([
'parent_service' => $this->service->id,
'name' => 'Team Fortress 2',
'description' => 'Team Fortress 2 is a team-based first-person shooter multiplayer video game developed and published by Valve Corporation. It is the sequel to the 1996 mod Team Fortress for Quake and its 1999 remake.',
@ -86,7 +86,7 @@ class SourceServiceTableSeeder extends Seeder
'startup' => '-game {{SRCDS_GAME}} -console -port {{SERVER_PORT}} +map {{SRCDS_MAP}} -strictportbind -norestart',
]);
$this->option['ark'] = Models\ServiceOptions::create([
$this->option['ark'] = Models\ServiceOption::create([
'parent_service' => $this->service->id,
'name' => 'Ark: Survival Evolved',
'description' => 'As a man or woman stranded, naked, freezing, and starving on the unforgiving shores of a mysterious island called ARK, use your skill and cunning to kill or tame and ride the plethora of leviathan dinosaurs and other primeval creatures roaming the land. Hunt, harvest resources, craft items, grow crops, research technologies, and build shelters to withstand the elements and store valuables, all while teaming up with (or preying upon) hundreds of other players to survive, dominate... and escape! — Gamepedia: ARK',
@ -96,7 +96,7 @@ class SourceServiceTableSeeder extends Seeder
'startup' => 'TheIsland?listen?ServerPassword={{ARK_PASSWORD}}?ServerAdminPassword={{ARK_ADMIN_PASSWORD}}?Port={{SERVER_PORT}}?MaxPlayers={{SERVER_MAX_PLAYERS}}',
]);
$this->option['custom'] = Models\ServiceOptions::create([
$this->option['custom'] = Models\ServiceOption::create([
'parent_service' => $this->service->id,
'name' => 'Custom Source Engine Game',
'description' => 'This option allows modifying the startup arguments and other details to run a custo SRCDS based game on the panel.',
@ -117,7 +117,7 @@ class SourceServiceTableSeeder extends Seeder
private function addInsurgencyVariables()
{
Models\ServiceVariables::create([
Models\ServiceVariable::create([
'option_id' => $this->option['insurgency']->id,
'name' => 'Game ID',
'description' => 'The ID corresponding to the game to download and run using SRCDS.',
@ -129,7 +129,7 @@ class SourceServiceTableSeeder extends Seeder
'regex' => '/^(17705)$/',
]);
Models\ServiceVariables::create([
Models\ServiceVariable::create([
'option_id' => $this->option['insurgency']->id,
'name' => 'Game Name',
'description' => 'The name corresponding to the game to download and run using SRCDS.',
@ -141,7 +141,7 @@ class SourceServiceTableSeeder extends Seeder
'regex' => '/^(insurgency)$/',
]);
Models\ServiceVariables::create([
Models\ServiceVariable::create([
'option_id' => $this->option['insurgency']->id,
'name' => 'Default Map',
'description' => 'The default map to use when starting the server.',
@ -156,7 +156,7 @@ class SourceServiceTableSeeder extends Seeder
private function addTF2Variables()
{
Models\ServiceVariables::create([
Models\ServiceVariable::create([
'option_id' => $this->option['tf2']->id,
'name' => 'Game ID',
'description' => 'The ID corresponding to the game to download and run using SRCDS.',
@ -168,7 +168,7 @@ class SourceServiceTableSeeder extends Seeder
'regex' => '/^(232250)$/',
]);
Models\ServiceVariables::create([
Models\ServiceVariable::create([
'option_id' => $this->option['tf2']->id,
'name' => 'Game Name',
'description' => 'The name corresponding to the game to download and run using SRCDS.',
@ -180,7 +180,7 @@ class SourceServiceTableSeeder extends Seeder
'regex' => '/^(tf)$/',
]);
Models\ServiceVariables::create([
Models\ServiceVariable::create([
'option_id' => $this->option['tf2']->id,
'name' => 'Default Map',
'description' => 'The default map to use when starting the server.',
@ -234,7 +234,7 @@ class SourceServiceTableSeeder extends Seeder
private function addCustomVariables()
{
Models\ServiceVariables::create([
Models\ServiceVariable::create([
'option_id' => $this->option['custom']->id,
'name' => 'Game ID',
'description' => 'The ID corresponding to the game to download and run using SRCDS.',
@ -246,7 +246,7 @@ class SourceServiceTableSeeder extends Seeder
'regex' => '/^(\d){1,6}$/',
]);
Models\ServiceVariables::create([
Models\ServiceVariable::create([
'option_id' => $this->option['custom']->id,
'name' => 'Game Name',
'description' => 'The name corresponding to the game to download and run using SRCDS.',

View file

@ -66,7 +66,7 @@ class TerrariaServiceTableSeeder extends Seeder
private function addCoreOptions()
{
$this->option['tshock'] = Models\ServiceOptions::create([
$this->option['tshock'] = Models\ServiceOption::create([
'parent_service' => $this->service->id,
'name' => 'Terraria Server (TShock)',
'description' => 'TShock is a server modification for Terraria, written in C#, and based upon the Terraria Server API. It uses JSON for configuration management, and offers several features not present in the Terraria Server normally.',
@ -79,7 +79,7 @@ class TerrariaServiceTableSeeder extends Seeder
private function addVariables()
{
Models\ServiceVariables::create([
Models\ServiceVariable::create([
'option_id' => $this->option['tshock']->id,
'name' => 'TShock Version',
'description' => 'Which version of TShock to install and use.',
@ -91,7 +91,7 @@ class TerrariaServiceTableSeeder extends Seeder
'regex' => '/^([0-9_\.-]{5,10})$/',
]);
Models\ServiceVariables::create([
Models\ServiceVariable::create([
'option_id' => $this->option['tshock']->id,
'name' => 'Maximum Slots',
'description' => 'Total number of slots to allow on the server.',

View file

@ -66,7 +66,7 @@ class VoiceServiceTableSeeder extends Seeder
private function addCoreOptions()
{
$this->option['mumble'] = Models\ServiceOptions::create([
$this->option['mumble'] = Models\ServiceOption::create([
'parent_service' => $this->service->id,
'name' => 'Mumble Server',
'description' => 'Mumble is an open source, low-latency, high quality voice chat software primarily intended for use while gaming.',
@ -76,7 +76,7 @@ class VoiceServiceTableSeeder extends Seeder
'startup' => '-fg',
]);
$this->option['ts3'] = Models\ServiceOptions::create([
$this->option['ts3'] = Models\ServiceOption::create([
'parent_service' => $this->service->id,
'name' => 'Teamspeak3 Server',
'description' => 'VoIP software designed with security in mind, featuring crystal clear voice quality, endless customization options, and scalabilty up to thousands of simultaneous users.',
@ -89,7 +89,7 @@ class VoiceServiceTableSeeder extends Seeder
private function addVariables()
{
Models\ServiceVariables::create([
Models\ServiceVariable::create([
'option_id' => $this->option['mumble']->id,
'name' => 'Maximum Users',
'description' => 'Maximum concurrent users on the mumble server.',
@ -101,7 +101,7 @@ class VoiceServiceTableSeeder extends Seeder
'regex' => '/^(\d){1,6}$/',
]);
Models\ServiceVariables::create([
Models\ServiceVariable::create([
'option_id' => $this->option['mumble']->id,
'name' => 'Server Version',
'description' => 'Version of Mumble Server to download and use.',
@ -113,7 +113,7 @@ class VoiceServiceTableSeeder extends Seeder
'regex' => '/^([0-9_\.-]{5,8})$/',
]);
Models\ServiceVariables::create([
Models\ServiceVariable::create([
'option_id' => $this->option['ts3']->id,
'name' => 'Server Version',
'description' => 'The version of Teamspeak 3 to use when running the server.',

File diff suppressed because one or more lines are too long

View file

@ -230,7 +230,7 @@
</div>
</div>
</div>
<div class="well" id="serviceOptions" style="display:none;">
<div class="well" id="ServiceOption" style="display:none;">
<div class="row">
<div class="form-group col-md-12">
<h3 class="nopad">Service Setup &amp; Options</h3>
@ -399,7 +399,7 @@ $(document).ready(function () {
currentService = $('#getService').val();
handleLoader('#load_services', true);
$('#serviceOptions').slideUp();
$('#ServiceOption').slideUp();
$('#getOption').html('<option disabled selected> -- Select a Service Option</option>');
$('#getPack').html('<option disabled selected> -- Select a Service Pack</option>');
@ -430,7 +430,7 @@ $(document).ready(function () {
$('#getOption').on('change', function (event) {
handleLoader('#load_services', true);
handleLoader('#serviceOptions', true);
handleLoader('#ServiceOption', true);
$('#serverVariables').html('');
$('input[name="custom_image_name"]').val($(this).find(':selected').data('image'));
$('#getPack').html('<option disabled selected> -- Select a Service Pack</option>');
@ -468,12 +468,12 @@ $(document).ready(function () {
';
$('#serverVariables').append(dataAppend);
});
$('#serviceOptions').slideDown();
$('#ServiceOption').slideDown();
}).fail(function (jqXHR) {
console.error(jqXHR);
}).always(function () {
handleLoader('#load_services');
handleLoader('#serviceOptions');
handleLoader('#ServiceOption');
});
});