Add Daemon Base Directory field (#2151)

Co-authored-by: Boy132 <mail@boy132.de>
This commit is contained in:
Frogperson
2026-02-05 08:00:25 -05:00
committed by GitHub
parent 7a9deba0e1
commit a34bf9fd49
3 changed files with 30 additions and 8 deletions

View File

@@ -278,6 +278,14 @@ class CreateNode extends CreateRecord
->default(256)
->minValue(1)
->suffix(config('panel.use_binary_prefix') ? 'MiB' : 'MB'),
TextInput::make('daemon_base')
->label(trans('admin/node.daemon_base'))
->placeholder('/var/lib/pelican/volumes')
->hintIcon(TablerIcon::QuestionMark, trans('admin/node.daemon_base_help'))
->columnSpan(1)
->required()
->default('/var/lib/pelican/volumes')
->rule('regex:/^([\/][\d\w.\-\/]+)$/'),
TextInput::make('daemon_sftp')
->columnSpan(1)
->label(trans('admin/node.sftp_port'))
@@ -287,7 +295,7 @@ class CreateNode extends CreateRecord
->required()
->integer(),
TextInput::make('daemon_sftp_alias')
->columnSpan(2)
->columnSpan(1)
->label(trans('admin/node.sftp_alias'))
->helperText(trans('admin/node.sftp_alias_help')),
Grid::make()

View File

@@ -314,7 +314,7 @@ class EditNode extends EditRecord
'default' => 1,
'sm' => 1,
'md' => 2,
'lg' => 2,
'lg' => 3,
]),
TextInput::make('upload_size')
->columnSpan([
@@ -329,12 +329,24 @@ class EditNode extends EditRecord
->required()
->minValue(1)
->suffix(config('panel.use_binary_prefix') ? 'MiB' : 'MB'),
TextInput::make('daemon_base')
->label(trans('admin/node.daemon_base'))
->placeholder('/var/lib/pelican/volumes')
->hintIcon(TablerIcon::QuestionMark, trans('admin/node.daemon_base_help'))
->columnSpan([
'default' => 1,
'sm' => 1,
'md' => 2,
'lg' => 2,
])
->required()
->rule('regex:/^([\/][\d\w.\-\/]+)$/'),
TextInput::make('daemon_sftp')
->columnSpan([
'default' => 1,
'sm' => 1,
'md' => 1,
'lg' => 3,
'md' => 2,
'lg' => 1,
])
->label(trans('admin/node.sftp_port'))
->minValue(1)
@@ -346,8 +358,8 @@ class EditNode extends EditRecord
->columnSpan([
'default' => 1,
'sm' => 1,
'md' => 1,
'lg' => 3,
'md' => 2,
'lg' => 2,
])
->label(trans('admin/node.sftp_alias'))
->helperText(trans('admin/node.sftp_alias_help')),
@@ -356,7 +368,7 @@ class EditNode extends EditRecord
'default' => 1,
'sm' => 1,
'md' => 1,
'lg' => 3,
'lg' => 2,
])
->label(trans('admin/node.use_for_deploy'))
->inline()
@@ -374,7 +386,7 @@ class EditNode extends EditRecord
'default' => 1,
'sm' => 1,
'md' => 1,
'lg' => 3,
'lg' => 2,
])
->label(trans('admin/node.maintenance_mode'))
->inline()

View File

@@ -65,6 +65,8 @@ return [
'sftp_port' => 'SFTP Port',
'sftp_alias' => 'SFTP Alias',
'sftp_alias_help' => 'Display alias for the SFTP address. Leave empty to use the Node FQDN.',
'daemon_base' => 'Daemon Base Directory',
'daemon_base_help' => 'The directory where server data will be stored.',
'use_for_deploy' => 'Use for Deployments?',
'maintenance_mode' => 'Maintenance Mode',
'maintenance_mode_help' => 'If the node is marked \'Under Maintenance\' users won\'t be able to access servers that are on that node',