Merge branch 'main' into charles/rework-server
# Conflicts: # app/Filament/Resources/ServerResource/Pages/EditServer.php
This commit is contained in:
commit
44f5ea567f
1
.gitignore
vendored
1
.gitignore
vendored
@ -4,6 +4,7 @@
|
||||
/public/hot
|
||||
/public/storage
|
||||
/storage/*.key
|
||||
/storage/clockwork/*
|
||||
/vendor
|
||||
*.DS_Store*
|
||||
.env
|
||||
|
@ -23,6 +23,8 @@ class CreateServer extends CreateRecord
|
||||
protected static string $resource = ServerResource::class;
|
||||
protected static bool $canCreateAnother = false;
|
||||
|
||||
public ?Node $node = null;
|
||||
|
||||
public function form(Form $form): Form
|
||||
{
|
||||
return $form
|
||||
@ -77,13 +79,16 @@ class CreateServer extends CreateRecord
|
||||
Forms\Components\Select::make('node_id')
|
||||
->disabledOn('edit')
|
||||
->prefixIcon('tabler-server-2')
|
||||
->default(fn () => Node::query()->latest()->first()?->id)
|
||||
->default(fn () => ($this->node = Node::query()->latest()->first())?->id)
|
||||
->columnSpan(2)
|
||||
->live()
|
||||
->relationship('node', 'name')
|
||||
->searchable()
|
||||
->preload()
|
||||
->afterStateUpdated(fn (Forms\Set $set) => $set('allocation_id', null))
|
||||
->afterStateUpdated(function (Forms\Set $set, $state) {
|
||||
$set('allocation_id', null);
|
||||
$this->node = Node::find($state);
|
||||
})
|
||||
->required(),
|
||||
|
||||
Forms\Components\Select::make('allocation_id')
|
||||
@ -688,6 +693,15 @@ class CreateServer extends CreateRecord
|
||||
->keyLabel('Title')
|
||||
->valueLabel('Description')
|
||||
->columnSpan(3),
|
||||
|
||||
Forms\Components\CheckboxList::make('mounts')
|
||||
->live()
|
||||
->relationship('mounts')
|
||||
->options(fn () => $this->node?->mounts->mapWithKeys(fn ($mount) => [$mount->id => $mount->name]) ?? [])
|
||||
->descriptions(fn () => $this->node?->mounts->mapWithKeys(fn ($mount) => [$mount->id => "$mount->source -> $mount->target"]) ?? [])
|
||||
->label('Mounts')
|
||||
->helperText(fn () => $this->node?->mounts->isNotEmpty() ? '' : 'No Mounts exist for this Node')
|
||||
->columnSpanFull(),
|
||||
]),
|
||||
]),
|
||||
]);
|
||||
|
@ -27,13 +27,15 @@ class AllocationsRelationManager extends RelationManager
|
||||
{
|
||||
return $table
|
||||
->recordTitleAttribute('ip')
|
||||
->recordTitle(fn (Allocation $allocation) => "$allocation->ip:$allocation->port")
|
||||
->checkIfRecordIsSelectableUsing(fn (Allocation $record) => $record->id !== $this->getOwnerRecord()->allocation_id)
|
||||
// ->actions
|
||||
// ->groups
|
||||
->inverseRelationship('server')
|
||||
->columns([
|
||||
Tables\Columns\TextInputColumn::make('ip_alias')->label('Alias'),
|
||||
Tables\Columns\TextColumn::make('ip')->label('IP'),
|
||||
Tables\Columns\TextColumn::make('port')->label('Port'),
|
||||
Tables\Columns\TextInputColumn::make('ip_alias')->label('Alias'),
|
||||
Tables\Columns\IconColumn::make('primary')
|
||||
->icon(fn ($state) => match ($state) {
|
||||
false => 'tabler-star',
|
||||
@ -57,7 +59,11 @@ class AllocationsRelationManager extends RelationManager
|
||||
])
|
||||
->headerActions([
|
||||
//TODO Tables\Actions\CreateAction::make()->label('Create Allocation'),
|
||||
//TODO Tables\Actions\AssociateAction::make()->label('Add Allocation'),
|
||||
Tables\Actions\AssociateAction::make()
|
||||
->multiple()
|
||||
->preloadRecordSelect()
|
||||
->recordSelectOptionsQuery(fn ($query) => $query->whereBelongsTo($this->getOwnerRecord()->node))
|
||||
->label('Add Allocation'),
|
||||
])
|
||||
->bulkActions([
|
||||
Tables\Actions\BulkActionGroup::make([
|
||||
|
@ -10,7 +10,6 @@ use Illuminate\Http\Response;
|
||||
use App\Models\Mount;
|
||||
use App\Models\Server;
|
||||
use App\Models\Database;
|
||||
use App\Models\MountServer;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
use Prologue\Alerts\AlertsMessageBag;
|
||||
use App\Exceptions\DisplayException;
|
||||
@ -236,12 +235,7 @@ class ServersController extends Controller
|
||||
*/
|
||||
public function addMount(Request $request, Server $server): RedirectResponse
|
||||
{
|
||||
$mountServer = (new MountServer())->forceFill([
|
||||
'mount_id' => $request->input('mount_id'),
|
||||
'server_id' => $server->id,
|
||||
]);
|
||||
|
||||
$mountServer->saveOrFail();
|
||||
$server->mounts()->attach($request->input('mount_id'));
|
||||
|
||||
$this->alert->success('Mount was added successfully.')->flash();
|
||||
|
||||
@ -253,7 +247,7 @@ class ServersController extends Controller
|
||||
*/
|
||||
public function deleteMount(Server $server, Mount $mount): RedirectResponse
|
||||
{
|
||||
MountServer::where('mount_id', $mount->id)->where('server_id', $server->id)->delete();
|
||||
$server->mounts()->detach($mount);
|
||||
|
||||
$this->alert->success('Mount was removed successfully.')->flash();
|
||||
|
||||
|
@ -1,16 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class MountServer extends Model
|
||||
{
|
||||
protected $table = 'mount_server';
|
||||
|
||||
public $timestamps = false;
|
||||
|
||||
protected $primaryKey = null;
|
||||
|
||||
public $incrementing = false;
|
||||
}
|
@ -5,6 +5,7 @@ namespace App\Models;
|
||||
use App\Enums\ServerState;
|
||||
use App\Exceptions\Http\Connection\DaemonConnectionException;
|
||||
use GuzzleHttp\Exception\GuzzleException;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
|
||||
use Illuminate\Notifications\Notifiable;
|
||||
use Illuminate\Database\Query\JoinClause;
|
||||
use Illuminate\Support\Facades\Http;
|
||||
@ -13,7 +14,6 @@ use Illuminate\Database\Eloquent\Relations\HasOne;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\Relations\MorphToMany;
|
||||
use Illuminate\Database\Eloquent\Relations\HasManyThrough;
|
||||
use App\Exceptions\Http\Server\ServerStateConflictException;
|
||||
|
||||
/**
|
||||
@ -311,12 +311,9 @@ class Server extends Model
|
||||
return $this->hasMany(Backup::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns all mounts that have this server has mounted.
|
||||
*/
|
||||
public function mounts(): HasManyThrough
|
||||
public function mounts(): BelongsToMany
|
||||
{
|
||||
return $this->hasManyThrough(Mount::class, MountServer::class, 'server_id', 'id', 'id', 'mount_id');
|
||||
return $this->belongsToMany(Mount::class);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -40,7 +40,7 @@ class ServerConfigurationStructureService
|
||||
*/
|
||||
protected function returnFormat(Server $server): array
|
||||
{
|
||||
return [
|
||||
$response = [
|
||||
'uuid' => $server->uuid,
|
||||
'meta' => [
|
||||
'name' => $server->name,
|
||||
@ -62,7 +62,6 @@ class ServerConfigurationStructureService
|
||||
'container' => [
|
||||
'image' => $server->image,
|
||||
'requires_rebuild' => false,
|
||||
'labels' => $server->docker_labels,
|
||||
],
|
||||
'allocations' => [
|
||||
'force_outgoing_ip' => $server->egg->force_outgoing_ip,
|
||||
@ -72,17 +71,27 @@ class ServerConfigurationStructureService
|
||||
],
|
||||
'mappings' => $server->getAllocationMappings(),
|
||||
],
|
||||
'mounts' => $server->mounts->map(function (Mount $mount) {
|
||||
return [
|
||||
'source' => $mount->source,
|
||||
'target' => $mount->target,
|
||||
'read_only' => $mount->read_only,
|
||||
];
|
||||
}),
|
||||
'egg' => [
|
||||
'id' => $server->egg->uuid,
|
||||
'file_denylist' => $server->egg->inherit_file_denylist,
|
||||
],
|
||||
];
|
||||
|
||||
if (!empty($server->docker_labels)) {
|
||||
$response['labels'] = $server->docker_labels;
|
||||
}
|
||||
|
||||
if ($server->mounts->isNotEmpty()) {
|
||||
$response['mounts'] = $server->mounts->map(function (Mount $mount) {
|
||||
return [
|
||||
'source' => $mount->source,
|
||||
'target' => $mount->target,
|
||||
'read_only' => $mount->read_only,
|
||||
];
|
||||
})->toArray();
|
||||
}
|
||||
|
||||
return $response;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -43,7 +43,6 @@
|
||||
"require-dev": {
|
||||
"barryvdh/laravel-ide-helper": "^3.0",
|
||||
"fakerphp/faker": "^1.23.1",
|
||||
"itsgoingd/clockwork": "~5.1.12",
|
||||
"larastan/larastan": "^2.9.6",
|
||||
"laravel/pint": "^1.15.3",
|
||||
"laravel/sail": "^1.29.1",
|
||||
|
70
composer.lock
generated
70
composer.lock
generated
@ -4,7 +4,7 @@
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "328bdd29cb83793ec0a99b2210941740",
|
||||
"content-hash": "8feeafbeb16044bd6716510a73393fc0",
|
||||
"packages": [
|
||||
{
|
||||
"name": "abdelhamiderrahmouni/filament-monaco-editor",
|
||||
@ -10540,74 +10540,6 @@
|
||||
},
|
||||
"time": "2020-07-09T08:09:16+00:00"
|
||||
},
|
||||
{
|
||||
"name": "itsgoingd/clockwork",
|
||||
"version": "v5.1.12",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/itsgoingd/clockwork.git",
|
||||
"reference": "c9dbdbb1f0efd19bb80f1080ef63f1b9b1bc3b1b"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/itsgoingd/clockwork/zipball/c9dbdbb1f0efd19bb80f1080ef63f1b9b1bc3b1b",
|
||||
"reference": "c9dbdbb1f0efd19bb80f1080ef63f1b9b1bc3b1b",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-json": "*",
|
||||
"php": ">=5.6"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"laravel": {
|
||||
"providers": [
|
||||
"Clockwork\\Support\\Laravel\\ClockworkServiceProvider"
|
||||
],
|
||||
"aliases": {
|
||||
"Clockwork": "Clockwork\\Support\\Laravel\\Facade"
|
||||
}
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Clockwork\\": "Clockwork/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "itsgoingd",
|
||||
"email": "itsgoingd@luzer.sk",
|
||||
"homepage": "https://twitter.com/itsgoingd"
|
||||
}
|
||||
],
|
||||
"description": "php dev tools in your browser",
|
||||
"homepage": "https://underground.works/clockwork",
|
||||
"keywords": [
|
||||
"Devtools",
|
||||
"debugging",
|
||||
"laravel",
|
||||
"logging",
|
||||
"lumen",
|
||||
"profiling",
|
||||
"slim"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/itsgoingd/clockwork/issues",
|
||||
"source": "https://github.com/itsgoingd/clockwork/tree/v5.1.12"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://github.com/itsgoingd",
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2022-12-13T00:04:12+00:00"
|
||||
},
|
||||
{
|
||||
"name": "larastan/larastan",
|
||||
"version": "v2.9.6",
|
||||
|
@ -4,9 +4,10 @@
|
||||
"version": "PTDL_v2",
|
||||
"update_url": null
|
||||
},
|
||||
"exported_at": "2024-05-08T11:47:32+02:00",
|
||||
"exported_at": "2024-06-02T20:42:01+00:00",
|
||||
"name": "Bungeecord",
|
||||
"author": "panel@example.com",
|
||||
"uuid": "9e6b409e-4028-4947-aea8-50a2c404c271",
|
||||
"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.",
|
||||
"features": [
|
||||
"eula",
|
||||
@ -44,6 +45,7 @@
|
||||
"user_viewable": true,
|
||||
"user_editable": true,
|
||||
"rules": "required|alpha_num|between:1,6",
|
||||
"sort": null,
|
||||
"field_type": "text"
|
||||
},
|
||||
{
|
||||
@ -54,6 +56,7 @@
|
||||
"user_viewable": true,
|
||||
"user_editable": true,
|
||||
"rules": "required|regex:\/^([\\w\\d._-]+)(\\.jar)$\/",
|
||||
"sort": null,
|
||||
"field_type": "text"
|
||||
}
|
||||
]
|
||||
|
@ -4,9 +4,10 @@
|
||||
"version": "PTDL_v2",
|
||||
"update_url": null
|
||||
},
|
||||
"exported_at": "2024-05-08T11:47:58+02:00",
|
||||
"exported_at": "2024-06-02T20:42:02+00:00",
|
||||
"name": "Forge Minecraft",
|
||||
"author": "panel@example.com",
|
||||
"uuid": "ed072427-f209-4603-875c-f540c6dd5a65",
|
||||
"description": "Minecraft Forge Server. Minecraft Forge is a modding API (Application Programming Interface), which makes it easier to create mods, and also make sure mods are compatible with each other.",
|
||||
"features": [
|
||||
"eula",
|
||||
@ -44,6 +45,7 @@
|
||||
"user_viewable": true,
|
||||
"user_editable": true,
|
||||
"rules": "required|regex:\/^([\\w\\d._-]+)(\\.jar)$\/",
|
||||
"sort": null,
|
||||
"field_type": "text"
|
||||
},
|
||||
{
|
||||
@ -54,6 +56,7 @@
|
||||
"user_viewable": true,
|
||||
"user_editable": true,
|
||||
"rules": "required|string|max:9",
|
||||
"sort": null,
|
||||
"field_type": "text"
|
||||
},
|
||||
{
|
||||
@ -64,6 +67,7 @@
|
||||
"user_viewable": true,
|
||||
"user_editable": true,
|
||||
"rules": "required|string|in:recommended,latest",
|
||||
"sort": null,
|
||||
"field_type": "text"
|
||||
},
|
||||
{
|
||||
@ -74,6 +78,7 @@
|
||||
"user_viewable": true,
|
||||
"user_editable": true,
|
||||
"rules": "nullable|regex:\/^[0-9\\.\\-]+$\/",
|
||||
"sort": null,
|
||||
"field_type": "text"
|
||||
}
|
||||
]
|
||||
|
@ -4,9 +4,10 @@
|
||||
"version": "PTDL_v2",
|
||||
"update_url": null
|
||||
},
|
||||
"exported_at": "2024-05-08T11:48:34+02:00",
|
||||
"exported_at": "2024-06-02T20:42:02+00:00",
|
||||
"name": "Paper",
|
||||
"author": "parker@example.com",
|
||||
"uuid": "5da37ef6-58da-4169-90a6-e683e1721247",
|
||||
"description": "High performance Spigot fork that aims to fix gameplay and mechanics inconsistencies.",
|
||||
"features": [
|
||||
"eula",
|
||||
@ -44,6 +45,7 @@
|
||||
"user_viewable": true,
|
||||
"user_editable": true,
|
||||
"rules": "nullable|string|max:20",
|
||||
"sort": null,
|
||||
"field_type": "text"
|
||||
},
|
||||
{
|
||||
@ -54,6 +56,7 @@
|
||||
"user_viewable": true,
|
||||
"user_editable": true,
|
||||
"rules": "required|regex:\/^([\\w\\d._-]+)(\\.jar)$\/",
|
||||
"sort": null,
|
||||
"field_type": "text"
|
||||
},
|
||||
{
|
||||
@ -64,6 +67,7 @@
|
||||
"user_viewable": false,
|
||||
"user_editable": false,
|
||||
"rules": "nullable|string",
|
||||
"sort": null,
|
||||
"field_type": "text"
|
||||
},
|
||||
{
|
||||
@ -74,6 +78,7 @@
|
||||
"user_viewable": true,
|
||||
"user_editable": true,
|
||||
"rules": "required|string|max:20",
|
||||
"sort": null,
|
||||
"field_type": "text"
|
||||
}
|
||||
]
|
||||
|
@ -4,9 +4,10 @@
|
||||
"version": "PTDL_v2",
|
||||
"update_url": null
|
||||
},
|
||||
"exported_at": "2024-05-08T11:49:03+02:00",
|
||||
"exported_at": "2024-06-02T20:42:03+00:00",
|
||||
"name": "Sponge (SpongeVanilla)",
|
||||
"author": "panel@example.com",
|
||||
"uuid": "f0d2f88f-1ff3-42a0-b03f-ac44c5571e6d",
|
||||
"description": "SpongeVanilla is the SpongeAPI implementation for Vanilla Minecraft.",
|
||||
"features": [
|
||||
"eula",
|
||||
@ -44,6 +45,7 @@
|
||||
"user_viewable": true,
|
||||
"user_editable": true,
|
||||
"rules": "required|regex:\/^([a-zA-Z0-9.\\-_]+)$\/",
|
||||
"sort": null,
|
||||
"field_type": "text"
|
||||
},
|
||||
{
|
||||
@ -54,6 +56,7 @@
|
||||
"user_viewable": true,
|
||||
"user_editable": true,
|
||||
"rules": "required|regex:\/^([\\w\\d._-]+)(\\.jar)$\/",
|
||||
"sort": null,
|
||||
"field_type": "text"
|
||||
}
|
||||
]
|
||||
|
@ -4,9 +4,10 @@
|
||||
"version": "PTDL_v2",
|
||||
"update_url": null
|
||||
},
|
||||
"exported_at": "2024-05-08T11:49:32+02:00",
|
||||
"exported_at": "2024-06-02T20:42:03+00:00",
|
||||
"name": "Vanilla Minecraft",
|
||||
"author": "panel@example.com",
|
||||
"uuid": "9ac39f3d-0c34-4d93-8174-c52ab9e6c57b",
|
||||
"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.",
|
||||
"features": [
|
||||
"eula",
|
||||
@ -44,6 +45,7 @@
|
||||
"user_viewable": true,
|
||||
"user_editable": true,
|
||||
"rules": "required|regex:\/^([\\w\\d._-]+)(\\.jar)$\/",
|
||||
"sort": null,
|
||||
"field_type": "text"
|
||||
},
|
||||
{
|
||||
@ -54,6 +56,7 @@
|
||||
"user_viewable": true,
|
||||
"user_editable": true,
|
||||
"rules": "required|string|between:3,15",
|
||||
"sort": null,
|
||||
"field_type": "text"
|
||||
}
|
||||
]
|
||||
|
@ -4,9 +4,10 @@
|
||||
"version": "PTDL_v2",
|
||||
"update_url": null
|
||||
},
|
||||
"exported_at": "2024-05-08T11:57:56+02:00",
|
||||
"exported_at": "2024-06-02T20:42:09+00:00",
|
||||
"name": "Rust",
|
||||
"author": "panel@example.com",
|
||||
"uuid": "bace2dfb-209c-452a-9459-7d6f340b07ae",
|
||||
"description": "The only aim in Rust is to survive. To do this you will need to overcome struggles such as hunger, thirst and cold. Build a fire. Build a shelter. Kill animals for meat. Protect yourself from other players, and kill them for meat. Create alliances with other players and form a town. Do whatever it takes to survive.",
|
||||
"features": [
|
||||
"steam_disk_space"
|
||||
@ -38,6 +39,7 @@
|
||||
"user_viewable": true,
|
||||
"user_editable": true,
|
||||
"rules": "required|string|max:60",
|
||||
"sort": null,
|
||||
"field_type": "text"
|
||||
},
|
||||
{
|
||||
@ -48,6 +50,7 @@
|
||||
"user_viewable": true,
|
||||
"user_editable": true,
|
||||
"rules": "required|in:vanilla,oxide,carbon",
|
||||
"sort": null,
|
||||
"field_type": "text"
|
||||
},
|
||||
{
|
||||
@ -58,6 +61,7 @@
|
||||
"user_viewable": true,
|
||||
"user_editable": true,
|
||||
"rules": "required|string|max:20",
|
||||
"sort": null,
|
||||
"field_type": "text"
|
||||
},
|
||||
{
|
||||
@ -68,6 +72,7 @@
|
||||
"user_viewable": true,
|
||||
"user_editable": true,
|
||||
"rules": "required|string",
|
||||
"sort": null,
|
||||
"field_type": "text"
|
||||
},
|
||||
{
|
||||
@ -78,6 +83,7 @@
|
||||
"user_viewable": true,
|
||||
"user_editable": true,
|
||||
"rules": "nullable|url",
|
||||
"sort": null,
|
||||
"field_type": "text"
|
||||
},
|
||||
{
|
||||
@ -88,6 +94,7 @@
|
||||
"user_viewable": true,
|
||||
"user_editable": true,
|
||||
"rules": "required|integer",
|
||||
"sort": null,
|
||||
"field_type": "text"
|
||||
},
|
||||
{
|
||||
@ -98,6 +105,7 @@
|
||||
"user_viewable": true,
|
||||
"user_editable": true,
|
||||
"rules": "nullable|string",
|
||||
"sort": null,
|
||||
"field_type": "text"
|
||||
},
|
||||
{
|
||||
@ -108,6 +116,7 @@
|
||||
"user_viewable": true,
|
||||
"user_editable": true,
|
||||
"rules": "required|integer",
|
||||
"sort": null,
|
||||
"field_type": "text"
|
||||
},
|
||||
{
|
||||
@ -118,6 +127,7 @@
|
||||
"user_viewable": true,
|
||||
"user_editable": true,
|
||||
"rules": "nullable|url",
|
||||
"sort": null,
|
||||
"field_type": "text"
|
||||
},
|
||||
{
|
||||
@ -128,6 +138,7 @@
|
||||
"user_viewable": true,
|
||||
"user_editable": false,
|
||||
"rules": "required|integer",
|
||||
"sort": null,
|
||||
"field_type": "text"
|
||||
},
|
||||
{
|
||||
@ -138,6 +149,7 @@
|
||||
"user_viewable": true,
|
||||
"user_editable": false,
|
||||
"rules": "required|integer",
|
||||
"sort": null,
|
||||
"field_type": "text"
|
||||
},
|
||||
{
|
||||
@ -148,6 +160,7 @@
|
||||
"user_viewable": true,
|
||||
"user_editable": true,
|
||||
"rules": "required|regex:\/^[\\w.-]*$\/|max:64",
|
||||
"sort": null,
|
||||
"field_type": "text"
|
||||
},
|
||||
{
|
||||
@ -158,6 +171,7 @@
|
||||
"user_viewable": true,
|
||||
"user_editable": true,
|
||||
"rules": "required|integer",
|
||||
"sort": null,
|
||||
"field_type": "text"
|
||||
},
|
||||
{
|
||||
@ -168,6 +182,7 @@
|
||||
"user_viewable": true,
|
||||
"user_editable": true,
|
||||
"rules": "nullable|string",
|
||||
"sort": null,
|
||||
"field_type": "text"
|
||||
},
|
||||
{
|
||||
@ -178,6 +193,7 @@
|
||||
"user_viewable": true,
|
||||
"user_editable": false,
|
||||
"rules": "required|integer",
|
||||
"sort": null,
|
||||
"field_type": "text"
|
||||
},
|
||||
{
|
||||
@ -188,6 +204,7 @@
|
||||
"user_viewable": true,
|
||||
"user_editable": true,
|
||||
"rules": "nullable|url",
|
||||
"sort": null,
|
||||
"field_type": "text"
|
||||
},
|
||||
{
|
||||
@ -198,6 +215,7 @@
|
||||
"user_viewable": true,
|
||||
"user_editable": true,
|
||||
"rules": "nullable|url",
|
||||
"sort": null,
|
||||
"field_type": "text"
|
||||
},
|
||||
{
|
||||
@ -208,6 +226,7 @@
|
||||
"user_viewable": false,
|
||||
"user_editable": false,
|
||||
"rules": "required|string|in:258550",
|
||||
"sort": null,
|
||||
"field_type": "text"
|
||||
}
|
||||
]
|
||||
|
@ -4,9 +4,10 @@
|
||||
"version": "PTDL_v2",
|
||||
"update_url": null
|
||||
},
|
||||
"exported_at": "2024-05-08T12:03:19+02:00",
|
||||
"exported_at": "2024-06-02T20:42:04+00:00",
|
||||
"name": "Counter-Strike: Global Offensive",
|
||||
"author": "panel@example.com",
|
||||
"uuid": "437c367d-06be-498f-a604-fdad135504d7",
|
||||
"description": "Counter-Strike: Global Offensive is a multiplayer first-person shooter video game developed by Hidden Path Entertainment and Valve Corporation.",
|
||||
"features": [
|
||||
"gsl_token",
|
||||
@ -39,6 +40,7 @@
|
||||
"user_viewable": true,
|
||||
"user_editable": true,
|
||||
"rules": "required|string|alpha_dash",
|
||||
"sort": null,
|
||||
"field_type": "text"
|
||||
},
|
||||
{
|
||||
@ -49,6 +51,7 @@
|
||||
"user_viewable": true,
|
||||
"user_editable": true,
|
||||
"rules": "required|string|alpha_num|size:32",
|
||||
"sort": null,
|
||||
"field_type": "text"
|
||||
},
|
||||
{
|
||||
@ -59,6 +62,7 @@
|
||||
"user_viewable": false,
|
||||
"user_editable": false,
|
||||
"rules": "required|string|max:20",
|
||||
"sort": null,
|
||||
"field_type": "text"
|
||||
}
|
||||
]
|
||||
|
@ -4,9 +4,10 @@
|
||||
"version": "PTDL_v2",
|
||||
"update_url": null
|
||||
},
|
||||
"exported_at": "2024-05-08T12:02:53+02:00",
|
||||
"exported_at": "2024-06-02T20:42:04+00:00",
|
||||
"name": "Custom Source Engine Game",
|
||||
"author": "panel@example.com",
|
||||
"uuid": "2a42d0c2-c0ba-4067-9a0a-9b95d77a3490",
|
||||
"description": "This option allows modifying the startup arguments and other details to run a custom SRCDS based game on the panel.",
|
||||
"features": [
|
||||
"steam_disk_space"
|
||||
@ -38,6 +39,7 @@
|
||||
"user_viewable": true,
|
||||
"user_editable": false,
|
||||
"rules": "required|numeric|digits_between:1,6",
|
||||
"sort": null,
|
||||
"field_type": "text"
|
||||
},
|
||||
{
|
||||
@ -48,6 +50,7 @@
|
||||
"user_viewable": true,
|
||||
"user_editable": false,
|
||||
"rules": "required|alpha_dash|between:1,100",
|
||||
"sort": null,
|
||||
"field_type": "text"
|
||||
},
|
||||
{
|
||||
@ -58,6 +61,7 @@
|
||||
"user_viewable": true,
|
||||
"user_editable": true,
|
||||
"rules": "required|string|alpha_dash",
|
||||
"sort": null,
|
||||
"field_type": "text"
|
||||
},
|
||||
{
|
||||
@ -68,6 +72,7 @@
|
||||
"user_viewable": true,
|
||||
"user_editable": true,
|
||||
"rules": "nullable|string",
|
||||
"sort": null,
|
||||
"field_type": "text"
|
||||
},
|
||||
{
|
||||
@ -78,6 +83,7 @@
|
||||
"user_viewable": true,
|
||||
"user_editable": true,
|
||||
"rules": "nullable|string",
|
||||
"sort": null,
|
||||
"field_type": "text"
|
||||
},
|
||||
{
|
||||
@ -88,6 +94,7 @@
|
||||
"user_viewable": true,
|
||||
"user_editable": true,
|
||||
"rules": "nullable|string",
|
||||
"sort": null,
|
||||
"field_type": "text"
|
||||
}
|
||||
]
|
||||
|
@ -4,9 +4,10 @@
|
||||
"version": "PTDL_v2",
|
||||
"update_url": null
|
||||
},
|
||||
"exported_at": "2024-05-08T12:02:26+02:00",
|
||||
"exported_at": "2024-06-02T20:42:05+00:00",
|
||||
"name": "Garrys Mod",
|
||||
"author": "panel@example.com",
|
||||
"uuid": "60ef81d4-30a2-4d98-ab64-f59c69e2f915",
|
||||
"description": "Garrys Mod, is a sandbox physics game created by Garry Newman, and developed by his company, Facepunch Studios.",
|
||||
"features": [
|
||||
"gsl_token",
|
||||
@ -39,6 +40,7 @@
|
||||
"user_viewable": true,
|
||||
"user_editable": true,
|
||||
"rules": "required|string|alpha_dash",
|
||||
"sort": null,
|
||||
"field_type": "text"
|
||||
},
|
||||
{
|
||||
@ -49,6 +51,7 @@
|
||||
"user_viewable": true,
|
||||
"user_editable": true,
|
||||
"rules": "nullable|string|alpha_num|size:32",
|
||||
"sort": null,
|
||||
"field_type": "text"
|
||||
},
|
||||
{
|
||||
@ -59,6 +62,7 @@
|
||||
"user_viewable": false,
|
||||
"user_editable": false,
|
||||
"rules": "required|string|max:20",
|
||||
"sort": null,
|
||||
"field_type": "text"
|
||||
},
|
||||
{
|
||||
@ -69,6 +73,7 @@
|
||||
"user_viewable": true,
|
||||
"user_editable": true,
|
||||
"rules": "nullable|integer",
|
||||
"sort": null,
|
||||
"field_type": "text"
|
||||
},
|
||||
{
|
||||
@ -79,6 +84,7 @@
|
||||
"user_viewable": true,
|
||||
"user_editable": true,
|
||||
"rules": "required|string",
|
||||
"sort": null,
|
||||
"field_type": "text"
|
||||
},
|
||||
{
|
||||
@ -89,6 +95,7 @@
|
||||
"user_viewable": true,
|
||||
"user_editable": true,
|
||||
"rules": "required|integer|max:128",
|
||||
"sort": null,
|
||||
"field_type": "text"
|
||||
},
|
||||
{
|
||||
@ -99,6 +106,7 @@
|
||||
"user_viewable": true,
|
||||
"user_editable": true,
|
||||
"rules": "required|integer|max:100",
|
||||
"sort": null,
|
||||
"field_type": "text"
|
||||
},
|
||||
{
|
||||
@ -109,6 +117,7 @@
|
||||
"user_viewable": true,
|
||||
"user_editable": true,
|
||||
"rules": "required|boolean",
|
||||
"sort": null,
|
||||
"field_type": "text"
|
||||
}
|
||||
]
|
||||
|
@ -4,9 +4,10 @@
|
||||
"version": "PTDL_v2",
|
||||
"update_url": null
|
||||
},
|
||||
"exported_at": "2024-05-08T12:01:57+02:00",
|
||||
"exported_at": "2024-06-02T20:42:06+00:00",
|
||||
"name": "Insurgency",
|
||||
"author": "panel@example.com",
|
||||
"uuid": "a5702286-655b-4069-bf1e-925c7300b61a",
|
||||
"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.",
|
||||
"features": [
|
||||
"steam_disk_space"
|
||||
@ -38,6 +39,7 @@
|
||||
"user_viewable": true,
|
||||
"user_editable": false,
|
||||
"rules": "required|regex:\/^(237410)$\/",
|
||||
"sort": null,
|
||||
"field_type": "text"
|
||||
},
|
||||
{
|
||||
@ -48,6 +50,7 @@
|
||||
"user_viewable": true,
|
||||
"user_editable": true,
|
||||
"rules": "required|regex:\/^(\\w{1,20})$\/",
|
||||
"sort": null,
|
||||
"field_type": "text"
|
||||
}
|
||||
]
|
||||
|
@ -4,9 +4,10 @@
|
||||
"version": "PTDL_v2",
|
||||
"update_url": null
|
||||
},
|
||||
"exported_at": "2024-05-08T11:59:56+02:00",
|
||||
"exported_at": "2024-06-02T20:42:07+00:00",
|
||||
"name": "Team Fortress 2",
|
||||
"author": "panel@example.com",
|
||||
"uuid": "7f8eb681-b2c8-4bf8-b9f4-d79ff70b6e5d",
|
||||
"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.",
|
||||
"features": [
|
||||
"gsl_token",
|
||||
@ -39,6 +40,7 @@
|
||||
"user_viewable": true,
|
||||
"user_editable": false,
|
||||
"rules": "required|in:232250",
|
||||
"sort": null,
|
||||
"field_type": "text"
|
||||
},
|
||||
{
|
||||
@ -49,6 +51,7 @@
|
||||
"user_viewable": true,
|
||||
"user_editable": true,
|
||||
"rules": "required|regex:\/^(\\w{1,20})$\/",
|
||||
"sort": null,
|
||||
"field_type": "text"
|
||||
},
|
||||
{
|
||||
@ -59,6 +62,7 @@
|
||||
"user_viewable": true,
|
||||
"user_editable": true,
|
||||
"rules": "required|string|alpha_num|size:32",
|
||||
"sort": null,
|
||||
"field_type": "text"
|
||||
}
|
||||
]
|
||||
|
@ -4,9 +4,10 @@
|
||||
"version": "PTDL_v2",
|
||||
"update_url": null
|
||||
},
|
||||
"exported_at": "2024-05-21T21:40:24-04:00",
|
||||
"exported_at": "2024-06-02T20:42:08+00:00",
|
||||
"name": "Mumble Server",
|
||||
"author": "panel@example.com",
|
||||
"uuid": "727ee758-7fb2-4979-972b-d3eba4e1e9f0",
|
||||
"description": "Mumble is an open source, low-latency, high quality voice chat software primarily intended for use while gaming.",
|
||||
"features": null,
|
||||
"docker_images": {
|
||||
@ -36,7 +37,8 @@
|
||||
"user_viewable": true,
|
||||
"user_editable": false,
|
||||
"rules": "required|numeric|digits_between:1,5",
|
||||
"sort": null,
|
||||
"field_type": "text"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
@ -4,9 +4,10 @@
|
||||
"version": "PTDL_v2",
|
||||
"update_url": null
|
||||
},
|
||||
"exported_at": "2024-05-08T11:53:32+02:00",
|
||||
"exported_at": "2024-06-02T20:42:08+00:00",
|
||||
"name": "Teamspeak3 Server",
|
||||
"author": "panel@example.com",
|
||||
"uuid": "983b1fac-d322-4d5f-a636-436127326b37",
|
||||
"description": "VoIP software designed with security in mind, featuring crystal clear voice quality, endless customization options, and scalabilty up to thousands of simultaneous users.",
|
||||
"features": null,
|
||||
"docker_images": {
|
||||
@ -36,6 +37,7 @@
|
||||
"user_viewable": true,
|
||||
"user_editable": true,
|
||||
"rules": "required|string|max:6",
|
||||
"sort": null,
|
||||
"field_type": "text"
|
||||
},
|
||||
{
|
||||
@ -46,6 +48,7 @@
|
||||
"user_viewable": true,
|
||||
"user_editable": false,
|
||||
"rules": "required|integer|between:1025,65535",
|
||||
"sort": null,
|
||||
"field_type": "text"
|
||||
},
|
||||
{
|
||||
@ -56,6 +59,7 @@
|
||||
"user_viewable": true,
|
||||
"user_editable": false,
|
||||
"rules": "required|integer|between:1025,65535",
|
||||
"sort": null,
|
||||
"field_type": "text"
|
||||
},
|
||||
{
|
||||
@ -66,6 +70,7 @@
|
||||
"user_viewable": true,
|
||||
"user_editable": true,
|
||||
"rules": "required|string|max:12",
|
||||
"sort": null,
|
||||
"field_type": "text"
|
||||
},
|
||||
{
|
||||
@ -76,6 +81,7 @@
|
||||
"user_viewable": true,
|
||||
"user_editable": false,
|
||||
"rules": "required|integer|between:1025,65535",
|
||||
"sort": null,
|
||||
"field_type": "text"
|
||||
},
|
||||
{
|
||||
@ -86,6 +92,7 @@
|
||||
"user_viewable": true,
|
||||
"user_editable": false,
|
||||
"rules": "required|integer|between:1025,65535",
|
||||
"sort": null,
|
||||
"field_type": "text"
|
||||
}
|
||||
]
|
||||
|
@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
$nameToUuidMapping = [
|
||||
'Bungeecord' => '9e6b409e-4028-4947-aea8-50a2c404c271',
|
||||
'Forge Minecraft' => 'ed072427-f209-4603-875c-f540c6dd5a65',
|
||||
'Paper' => '5da37ef6-58da-4169-90a6-e683e1721247',
|
||||
'Sponge (SpongeVanilla)' => 'f0d2f88f-1ff3-42a0-b03f-ac44c5571e6d',
|
||||
'Vanilla Minecraft' => '9ac39f3d-0c34-4d93-8174-c52ab9e6c57b',
|
||||
'Counter-Strike: Global Offensive' => '437c367d-06be-498f-a604-fdad135504d7',
|
||||
'Custom Source Engine Game' => '2a42d0c2-c0ba-4067-9a0a-9b95d77a3490',
|
||||
'Garrys Mod' => '60ef81d4-30a2-4d98-ab64-f59c69e2f915',
|
||||
'Insurgency' => 'a5702286-655b-4069-bf1e-925c7300b61a',
|
||||
'Team Fortress 2' => '7f8eb681-b2c8-4bf8-b9f4-d79ff70b6e5d',
|
||||
'Mumble Server' => '727ee758-7fb2-4979-972b-d3eba4e1e9f0',
|
||||
'Teamspeak3 Server' => '983b1fac-d322-4d5f-a636-436127326b37',
|
||||
'Rust' => 'bace2dfb-209c-452a-9459-7d6f340b07ae',
|
||||
];
|
||||
|
||||
foreach ($nameToUuidMapping as $name => $uuid) {
|
||||
DB::table('eggs')
|
||||
->where('name', $name)
|
||||
->update(['uuid' => $uuid]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
//
|
||||
}
|
||||
};
|
@ -14,7 +14,9 @@ Fly High, Game On: Pelican's pledge for unrivaled game servers.
|
||||
|
||||
## Links
|
||||
|
||||
* [Official Discord](https://discord.gg/pelican-panel)
|
||||
* [Website](https://pelican.dev)
|
||||
* [Docs](https://pelican.dev/docs)
|
||||
* [Discord](https://discord.gg/pelican-panel)
|
||||
* [Wings](https://github.com/pelican-dev/wings)
|
||||
|
||||
### Supported Games and Servers
|
||||
|
2
storage/clockwork/.gitignore
vendored
2
storage/clockwork/.gitignore
vendored
@ -1,2 +0,0 @@
|
||||
*
|
||||
!.gitignore
|
Loading…
x
Reference in New Issue
Block a user