mirror of
https://github.com/pelican-dev/panel.git
synced 2025-11-08 14:49:27 +01:00
tweaks
This commit is contained in:
parent
1f2d7025af
commit
bda39382b4
@ -675,7 +675,7 @@ class EditNode extends EditRecord
|
||||
->label(trans('admin/node.diagnostics.upload'))
|
||||
->visible(fn (Get $get) => $get('pulled') ?? false)
|
||||
->icon('tabler-cloud-upload')->iconSize(IconSize::ExtraLarge)
|
||||
->action(function (Get $get) {
|
||||
->action(function (Get $get, Set $set) {
|
||||
try {
|
||||
$response = Http::asMultipart()->post('https://logs.pelican.dev', [
|
||||
[
|
||||
@ -713,6 +713,9 @@ class EditNode extends EditRecord
|
||||
])
|
||||
->persistent()
|
||||
->send();
|
||||
$set('log', $url);
|
||||
$set('pulled', false);
|
||||
$set('uploaded', true);
|
||||
|
||||
} catch (\Exception $e) {
|
||||
Notification::make()
|
||||
@ -749,8 +752,7 @@ class EditNode extends EditRecord
|
||||
->hiddenLabel()
|
||||
->columnSpanFull()
|
||||
->rows(35)
|
||||
->visible(fn (Get $get) => $get('pulled') ?? false),
|
||||
]),
|
||||
->visible(fn (Get $get) => ($get('pulled') ?? false) || ($get('uploaded') ?? false)), ]),
|
||||
]),
|
||||
]);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user