mirror of
https://github.com/pelican-dev/panel.git
synced 2025-11-08 10:39:27 +01:00
add clear button
This commit is contained in:
parent
c4398eb26f
commit
48962b6875
@ -680,7 +680,7 @@ class EditNode extends EditRecord
|
||||
Action::make('upload')
|
||||
->label(trans('admin/node.diagnostics.upload'))
|
||||
->visible(fn (Get $get) => $get('pulled') ?? false)
|
||||
->icon('tabler-cloud-upload')->iconSize(IconSize::ExtraLarge)
|
||||
->icon('tabler-cloud-upload')->iconButton()->iconSize(IconSize::ExtraLarge)
|
||||
->action(function (Get $get, Set $set) {
|
||||
try {
|
||||
$response = Http::asMultipart()->post('https://logs.pelican.dev', [
|
||||
@ -731,6 +731,17 @@ class EditNode extends EditRecord
|
||||
->send();
|
||||
}
|
||||
}),
|
||||
Action::make('clear')
|
||||
->label(trans('admin/node.diagnostics.clear'))
|
||||
->visible(fn (Get $get) => $get('pulled') ?? false)
|
||||
->icon('tabler-trash')->iconButton()->iconSize(IconSize::ExtraLarge)->color('danger')
|
||||
->action(function (Get $get, Set $set) {
|
||||
$set('pulled', false);
|
||||
$set('uploaded', false);
|
||||
$set('log', null);
|
||||
$this->refresh();
|
||||
}
|
||||
),
|
||||
])
|
||||
->schema([
|
||||
Toggle::make('include_endpoints')
|
||||
|
||||
@ -132,6 +132,7 @@ return [
|
||||
'view_logs' => 'View Logs',
|
||||
'pull' => 'Pull',
|
||||
'upload' => 'Upload',
|
||||
'clear' => 'Clear',
|
||||
'404' => 'The requested diagnostic report could not be found. Make sure wings is up to date and try again.',
|
||||
],
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user