Remove all references of packs from the Panel
This commit is contained in:
parent
f1978683cc
commit
3c7ffaaadb
60 changed files with 129 additions and 2517 deletions
|
@ -63,7 +63,6 @@ class ApiKey extends Model
|
|||
'r_' . AdminAcl::RESOURCE_LOCATIONS => 'int',
|
||||
'r_' . AdminAcl::RESOURCE_NESTS => 'int',
|
||||
'r_' . AdminAcl::RESOURCE_NODES => 'int',
|
||||
'r_' . AdminAcl::RESOURCE_PACKS => 'int',
|
||||
'r_' . AdminAcl::RESOURCE_SERVERS => 'int',
|
||||
];
|
||||
|
||||
|
@ -110,7 +109,6 @@ class ApiKey extends Model
|
|||
'r_' . AdminAcl::RESOURCE_LOCATIONS => 'integer|min:0|max:3',
|
||||
'r_' . AdminAcl::RESOURCE_NESTS => 'integer|min:0|max:3',
|
||||
'r_' . AdminAcl::RESOURCE_NODES => 'integer|min:0|max:3',
|
||||
'r_' . AdminAcl::RESOURCE_PACKS => 'integer|min:0|max:3',
|
||||
'r_' . AdminAcl::RESOURCE_SERVERS => 'integer|min:0|max:3',
|
||||
];
|
||||
|
||||
|
|
|
@ -35,7 +35,6 @@ namespace Pterodactyl\Models;
|
|||
* @property \Pterodactyl\Models\Nest $nest
|
||||
* @property \Illuminate\Database\Eloquent\Collection|\Pterodactyl\Models\Server[] $servers
|
||||
* @property \Illuminate\Database\Eloquent\Collection|\Pterodactyl\Models\EggVariable[] $variables
|
||||
* @property \Illuminate\Database\Eloquent\Collection|\Pterodactyl\Models\Pack[] $packs
|
||||
* @property \Pterodactyl\Models\Egg|null $scriptFrom
|
||||
* @property \Pterodactyl\Models\Egg|null $configFrom
|
||||
*/
|
||||
|
@ -247,16 +246,6 @@ class Egg extends Model
|
|||
return $this->hasMany(EggVariable::class, 'egg_id');
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets all packs associated with this egg.
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
*/
|
||||
public function packs()
|
||||
{
|
||||
return $this->hasMany(Pack::class, 'egg_id');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the parent egg from which to copy scripts.
|
||||
*
|
||||
|
|
|
@ -13,7 +13,6 @@ namespace Pterodactyl\Models;
|
|||
*
|
||||
* @property \Illuminate\Database\Eloquent\Collection|\Pterodactyl\Models\Server[] $servers
|
||||
* @property \Illuminate\Database\Eloquent\Collection|\Pterodactyl\Models\Egg[] $eggs
|
||||
* @property \Illuminate\Database\Eloquent\Collection|\Pterodactyl\Models\Pack[] $packs
|
||||
*/
|
||||
class Nest extends Model
|
||||
{
|
||||
|
@ -59,16 +58,6 @@ class Nest extends Model
|
|||
return $this->hasMany(Egg::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns all of the packs associated with a nest, regardless of the egg.
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasManyThrough
|
||||
*/
|
||||
public function packs()
|
||||
{
|
||||
return $this->hasManyThrough(Pack::class, Egg::class, 'nest_id', 'egg_id');
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets all servers associated with this nest.
|
||||
*
|
||||
|
|
|
@ -1,106 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace Pterodactyl\Models;
|
||||
|
||||
use Pterodactyl\Models\Traits\Searchable;
|
||||
|
||||
/**
|
||||
* @property int $id
|
||||
* @property int $egg_id
|
||||
* @property string $uuid
|
||||
* @property string $name
|
||||
* @property string $version
|
||||
* @property string $description
|
||||
* @property bool $selectable
|
||||
* @property bool $visible
|
||||
* @property bool $locked
|
||||
* @property \Carbon\Carbon $created_at
|
||||
* @property \Carbon\Carbon $updated_at
|
||||
*
|
||||
* @property \Pterodactyl\Models\Egg|null $egg
|
||||
* @property \Illuminate\Database\Eloquent\Collection|\Pterodactyl\Models\Server[] $servers
|
||||
*/
|
||||
class Pack extends Model
|
||||
{
|
||||
use Searchable;
|
||||
|
||||
/**
|
||||
* The resource name for this model when it is transformed into an
|
||||
* API representation using fractal.
|
||||
*/
|
||||
const RESOURCE_NAME = 'pack';
|
||||
|
||||
/**
|
||||
* The table associated with the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $table = 'packs';
|
||||
|
||||
/**
|
||||
* Fields that are mass assignable.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $fillable = [
|
||||
'egg_id', 'uuid', 'name', 'version', 'description', 'selectable', 'visible', 'locked',
|
||||
];
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
public static $validationRules = [
|
||||
'name' => 'required|string',
|
||||
'version' => 'required|string',
|
||||
'description' => 'sometimes|nullable|string',
|
||||
'selectable' => 'sometimes|required|boolean',
|
||||
'visible' => 'sometimes|required|boolean',
|
||||
'locked' => 'sometimes|required|boolean',
|
||||
'egg_id' => 'required|exists:eggs,id',
|
||||
];
|
||||
|
||||
/**
|
||||
* Cast values to correct type.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $casts = [
|
||||
'egg_id' => 'integer',
|
||||
'selectable' => 'boolean',
|
||||
'visible' => 'boolean',
|
||||
'locked' => 'boolean',
|
||||
];
|
||||
|
||||
/**
|
||||
* Parameters for search querying.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $searchableColumns = [
|
||||
'name' => 10,
|
||||
'uuid' => 8,
|
||||
'egg.name' => 6,
|
||||
'egg.docker_image' => 5,
|
||||
'version' => 2,
|
||||
];
|
||||
|
||||
/**
|
||||
* Gets egg associated with a service pack.
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||
*/
|
||||
public function egg()
|
||||
{
|
||||
return $this->belongsTo(Egg::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets servers associated with a pack.
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
*/
|
||||
public function servers()
|
||||
{
|
||||
return $this->hasMany(Server::class);
|
||||
}
|
||||
}
|
|
@ -28,7 +28,6 @@ use Znck\Eloquent\Traits\BelongsToThrough;
|
|||
* @property int $allocation_id
|
||||
* @property int $nest_id
|
||||
* @property int $egg_id
|
||||
* @property int|null $pack_id
|
||||
* @property string $startup
|
||||
* @property string $image
|
||||
* @property int $installed
|
||||
|
@ -42,7 +41,6 @@ use Znck\Eloquent\Traits\BelongsToThrough;
|
|||
* @property \Pterodactyl\Models\Subuser[]|\Illuminate\Database\Eloquent\Collection $subusers
|
||||
* @property \Pterodactyl\Models\Allocation $allocation
|
||||
* @property \Pterodactyl\Models\Allocation[]|\Illuminate\Database\Eloquent\Collection $allocations
|
||||
* @property \Pterodactyl\Models\Pack|null $pack
|
||||
* @property \Pterodactyl\Models\Node $node
|
||||
* @property \Pterodactyl\Models\Nest $nest
|
||||
* @property \Pterodactyl\Models\Egg $egg
|
||||
|
@ -122,7 +120,6 @@ class Server extends Model
|
|||
'allocation_id' => 'required|bail|unique:servers|exists:allocations,id',
|
||||
'nest_id' => 'required|exists:nests,id',
|
||||
'egg_id' => 'required|exists:eggs,id',
|
||||
'pack_id' => 'sometimes|nullable|numeric|min:0',
|
||||
'startup' => 'required|string',
|
||||
'skip_scripts' => 'sometimes|boolean',
|
||||
'image' => 'required|string|max:255',
|
||||
|
@ -151,7 +148,6 @@ class Server extends Model
|
|||
'allocation_id' => 'integer',
|
||||
'nest_id' => 'integer',
|
||||
'egg_id' => 'integer',
|
||||
'pack_id' => 'integer',
|
||||
'installed' => 'integer',
|
||||
'database_limit' => 'integer',
|
||||
'allocation_limit' => 'integer',
|
||||
|
@ -171,7 +167,6 @@ class Server extends Model
|
|||
'user.email' => 40,
|
||||
'user.username' => 30,
|
||||
'node.name' => 10,
|
||||
'pack.name' => 10,
|
||||
];
|
||||
|
||||
/**
|
||||
|
@ -234,16 +229,6 @@ class Server extends Model
|
|||
return $this->hasMany(Allocation::class, 'server_id');
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets information for the pack associated with this server.
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||
*/
|
||||
public function pack()
|
||||
{
|
||||
return $this->belongsTo(Pack::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets information for the nest associated with this server.
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue