mirror of
https://github.com/pelican-dev/panel.git
synced 2025-05-31 08:24:45 +02:00
fix schedules
This commit is contained in:
parent
7c32cdcebb
commit
8359cc6f1c
@ -89,20 +89,21 @@ class ScheduleResource extends Resource
|
|||||||
->placeholder('A human readable identifier for this schedule.')
|
->placeholder('A human readable identifier for this schedule.')
|
||||||
->autocomplete(false)
|
->autocomplete(false)
|
||||||
->required(),
|
->required(),
|
||||||
ToggleButtons::make('Status')
|
// TODO conditional ->hiddenOn, ->visibleOn appear broken?
|
||||||
->visibleOn(Operation::Edit)
|
// ToggleButtons::make('Status')
|
||||||
->formatStateUsing(fn (Schedule $schedule) => !$schedule->is_active ? 'inactive' : ($schedule->is_processing ? 'processing' : 'active'))
|
// ->hiddenOn(Operation::Create)
|
||||||
->options(fn (Schedule $schedule) => !$schedule->is_active ? ['inactive' => 'Inactive'] : ($schedule->is_processing ? ['processing' => 'Processing'] : ['active' => 'Active']))
|
// ->formatStateUsing(fn (Schedule $schedule) => !$schedule->is_active ? 'inactive' : ($schedule->is_processing ? 'processing' : 'active'))
|
||||||
->colors([
|
// ->options(fn (Schedule $schedule) => !$schedule->is_active ? ['inactive' => 'Inactive'] : ($schedule->is_processing ? ['processing' => 'Processing'] : ['active' => 'Active']))
|
||||||
'inactive' => 'danger',
|
// ->colors([
|
||||||
'processing' => 'warning',
|
// 'inactive' => 'danger',
|
||||||
'active' => 'success',
|
// 'processing' => 'warning',
|
||||||
])
|
// 'active' => 'success',
|
||||||
->columnSpan([
|
// ])
|
||||||
'default' => 4,
|
// ->columnSpan([
|
||||||
'md' => 1,
|
// 'default' => 4,
|
||||||
'lg' => 1,
|
// 'md' => 1,
|
||||||
]),
|
// 'lg' => 1,
|
||||||
|
// ]),
|
||||||
Toggle::make('only_when_online')
|
Toggle::make('only_when_online')
|
||||||
->label('Only when Server is Online?')
|
->label('Only when Server is Online?')
|
||||||
->hintIconTooltip('Only execute this schedule when the server is in a running state.')
|
->hintIconTooltip('Only execute this schedule when the server is in a running state.')
|
||||||
@ -168,6 +169,7 @@ class ScheduleResource extends Resource
|
|||||||
Section::make('Presets')
|
Section::make('Presets')
|
||||||
->hiddenOn('view')
|
->hiddenOn('view')
|
||||||
->columns(1)
|
->columns(1)
|
||||||
|
->columnSpanFull()
|
||||||
->schema([
|
->schema([
|
||||||
Actions::make([
|
Actions::make([
|
||||||
Action::make('hourly')
|
Action::make('hourly')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user