mirror of
https://github.com/pelican-dev/panel.git
synced 2025-05-20 05:14:46 +02:00
Add Kill button to console (#791)
* Add Kill button to console * Add confirm, and warning
This commit is contained in:
parent
23246eb134
commit
feadaa2caf
@ -71,6 +71,15 @@ class Console extends Page
|
|||||||
->size(ActionSize::ExtraLarge)
|
->size(ActionSize::ExtraLarge)
|
||||||
->action(fn () => $this->dispatch('setServerState', state: 'stop'))
|
->action(fn () => $this->dispatch('setServerState', state: 'stop'))
|
||||||
->disabled(fn () => $server->isInConflictState() || $server->retrieveStatus() == 'offline'),
|
->disabled(fn () => $server->isInConflictState() || $server->retrieveStatus() == 'offline'),
|
||||||
|
Action::make('kill')
|
||||||
|
->color('danger')
|
||||||
|
->requiresConfirmation()
|
||||||
|
->modalHeading('Do you wish to kill this server?')
|
||||||
|
->modalDescription('This can result in data corruption and/or data loss!')
|
||||||
|
->modalSubmitActionLabel('Kill Server')
|
||||||
|
->size(ActionSize::ExtraLarge)
|
||||||
|
->action(fn () => $this->dispatch('setServerState', state: 'kill'))
|
||||||
|
->disabled(fn () => $server->isInConflictState() || $server->retrieveStatus() == 'offline'),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user