mirror of
https://github.com/PhyreApps/PhyrePanel.git
synced 2024-11-21 23:20:24 +00:00
update
This commit is contained in:
parent
7345ae9df9
commit
d6a6875a70
3 changed files with 22 additions and 14 deletions
|
@ -28,10 +28,6 @@ class ManageBackups extends ManageRecords
|
|||
|
||||
return [
|
||||
|
||||
Actions\Action::make('restoring')
|
||||
->label('Restoring backup...')
|
||||
->icon('heroicon-o-clock'),
|
||||
|
||||
Actions\Action::make('restore')
|
||||
->hidden($restoringBackup)
|
||||
->icon('heroicon-o-cloud-arrow-up')
|
||||
|
|
|
@ -17,14 +17,18 @@ class JobQueueNotifications extends Component
|
|||
foreach ($getJobs as $job) {
|
||||
$job->payload = json_decode($job->payload);
|
||||
if (isset($job->payload->displayName)) {
|
||||
$jobClassInstance = new $job->payload->displayName;
|
||||
$displayName = 'Unknown Job';
|
||||
if (method_exists($jobClassInstance, 'getDisplayName')) {
|
||||
$displayName = $jobClassInstance->getDisplayName();
|
||||
} else {
|
||||
|
||||
try {
|
||||
$jobClassInstance = new $job->payload->displayName();
|
||||
if (method_exists($jobClassInstance, 'getDisplayName')) {
|
||||
$displayName = $jobClassInstance->getDisplayName();
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
$explodeDisplayName = explode('\\', $job->payload->displayName);
|
||||
$displayName = end($explodeDisplayName);
|
||||
}
|
||||
|
||||
$jobs[] = [
|
||||
'id' => $job->id,
|
||||
'displayName' => $displayName,
|
||||
|
|
|
@ -1,22 +1,30 @@
|
|||
<div>
|
||||
@foreach($jobs as $job)
|
||||
|
||||
<div class="absolute z-50 bottom-5 right-5 w-[22rem] rounded-xl text-black px-3 py-4 shadow-sm bg-white ring-1 ring-gray-950/5 dark:bg-gray-900 dark:ring-white/10">
|
||||
<div class="fixed z-50 bottom-5 right-5 w-[22rem] rounded-xl text-black dark:text-white px-4 py-4 shadow-sm bg-white ring-1 ring-gray-950/5 dark:bg-gray-900 dark:ring-white/10">
|
||||
|
||||
<div class="w-full flex justify-between">
|
||||
<div>
|
||||
{{ $job['displayName']}}
|
||||
<div class="text-sm">
|
||||
Runnning...
|
||||
</div>
|
||||
<div>
|
||||
{{-- <div>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="w-4" viewBox="0 0 24 24">
|
||||
<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2.5" d="m7 7l10 10M7 17L17 7" />
|
||||
</svg>
|
||||
</div>
|
||||
</div>--}}
|
||||
</div>
|
||||
|
||||
<div class="flex gap-2 items-center">
|
||||
<span class="text-sm">Running...</span>
|
||||
<div>
|
||||
{{ $job['displayName']}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="animate-pulse mt-2">
|
||||
<div class="h-1 bg-primary-500 rounded-xl"></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@endforeach
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue