Implement Panel changes to support internal SFTP subsystem on Daemon (#703)
This commit is contained in:
parent
57db949a9c
commit
058e490ec4
23 changed files with 484 additions and 247 deletions
|
@ -144,13 +144,23 @@ class Node extends Model implements CleansAttributes, ValidableContract
|
|||
],
|
||||
],
|
||||
'docker' => [
|
||||
'container' => [
|
||||
'user' => null,
|
||||
],
|
||||
'network' => [
|
||||
'name' => 'pterodactyl_nw',
|
||||
],
|
||||
'socket' => '/var/run/docker.sock',
|
||||
'autoupdate_images' => true,
|
||||
],
|
||||
'sftp' => [
|
||||
'path' => $this->daemonBase,
|
||||
'ip' => '0.0.0.0',
|
||||
'port' => $this->daemonSFTP,
|
||||
'container' => 'ptdl-sftp',
|
||||
'keypair' => [
|
||||
'bits' => 2048,
|
||||
'e' => 65537,
|
||||
],
|
||||
],
|
||||
'logger' => [
|
||||
'path' => 'logs/',
|
||||
|
|
|
@ -29,19 +29,12 @@ class Server extends Model implements CleansAttributes, ValidableContract
|
|||
*/
|
||||
protected $table = 'servers';
|
||||
|
||||
/**
|
||||
* The attributes excluded from the model's JSON form.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $hidden = ['sftp_password'];
|
||||
|
||||
/**
|
||||
* The attributes that should be mutated to dates.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $dates = ['deleted_at'];
|
||||
protected $dates = [self::CREATED_AT, self::UPDATED_AT, 'deleted_at'];
|
||||
|
||||
/**
|
||||
* Always eager load these relationships on the model.
|
||||
|
@ -55,7 +48,7 @@ class Server extends Model implements CleansAttributes, ValidableContract
|
|||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $guarded = ['id', 'installed', 'created_at', 'updated_at', 'deleted_at'];
|
||||
protected $guarded = ['id', 'installed', self::CREATED_AT, self::UPDATED_AT, 'deleted_at'];
|
||||
|
||||
/**
|
||||
* @var array
|
||||
|
@ -73,8 +66,6 @@ class Server extends Model implements CleansAttributes, ValidableContract
|
|||
'node_id' => 'required',
|
||||
'allocation_id' => 'required',
|
||||
'pack_id' => 'sometimes',
|
||||
'auto_deploy' => 'sometimes',
|
||||
'custom_id' => 'sometimes',
|
||||
'skip_scripts' => 'sometimes',
|
||||
];
|
||||
|
||||
|
@ -95,10 +86,7 @@ class Server extends Model implements CleansAttributes, ValidableContract
|
|||
'nest_id' => 'exists:nests,id',
|
||||
'egg_id' => 'exists:eggs,id',
|
||||
'pack_id' => 'nullable|numeric|min:0',
|
||||
'custom_container' => 'nullable|string',
|
||||
'startup' => 'nullable|string',
|
||||
'auto_deploy' => 'accepted',
|
||||
'custom_id' => 'numeric|unique:servers,id',
|
||||
'skip_scripts' => 'boolean',
|
||||
];
|
||||
|
||||
|
@ -132,7 +120,6 @@ class Server extends Model implements CleansAttributes, ValidableContract
|
|||
*/
|
||||
protected $searchableColumns = [
|
||||
'name' => 10,
|
||||
'username' => 10,
|
||||
'uuidShort' => 9,
|
||||
'uuid' => 8,
|
||||
'pack.name' => 7,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue