mirror of
https://github.com/PhyreApps/PhyrePanel.git
synced 2024-11-25 09:00:27 +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 [
|
return [
|
||||||
|
|
||||||
Actions\Action::make('restoring')
|
|
||||||
->label('Restoring backup...')
|
|
||||||
->icon('heroicon-o-clock'),
|
|
||||||
|
|
||||||
Actions\Action::make('restore')
|
Actions\Action::make('restore')
|
||||||
->hidden($restoringBackup)
|
->hidden($restoringBackup)
|
||||||
->icon('heroicon-o-cloud-arrow-up')
|
->icon('heroicon-o-cloud-arrow-up')
|
||||||
|
|
|
@ -17,14 +17,18 @@ class JobQueueNotifications extends Component
|
||||||
foreach ($getJobs as $job) {
|
foreach ($getJobs as $job) {
|
||||||
$job->payload = json_decode($job->payload);
|
$job->payload = json_decode($job->payload);
|
||||||
if (isset($job->payload->displayName)) {
|
if (isset($job->payload->displayName)) {
|
||||||
$jobClassInstance = new $job->payload->displayName;
|
|
||||||
$displayName = 'Unknown Job';
|
$displayName = 'Unknown Job';
|
||||||
if (method_exists($jobClassInstance, 'getDisplayName')) {
|
|
||||||
$displayName = $jobClassInstance->getDisplayName();
|
try {
|
||||||
} else {
|
$jobClassInstance = new $job->payload->displayName();
|
||||||
|
if (method_exists($jobClassInstance, 'getDisplayName')) {
|
||||||
|
$displayName = $jobClassInstance->getDisplayName();
|
||||||
|
}
|
||||||
|
} catch (\Exception $e) {
|
||||||
$explodeDisplayName = explode('\\', $job->payload->displayName);
|
$explodeDisplayName = explode('\\', $job->payload->displayName);
|
||||||
$displayName = end($explodeDisplayName);
|
$displayName = end($explodeDisplayName);
|
||||||
}
|
}
|
||||||
|
|
||||||
$jobs[] = [
|
$jobs[] = [
|
||||||
'id' => $job->id,
|
'id' => $job->id,
|
||||||
'displayName' => $displayName,
|
'displayName' => $displayName,
|
||||||
|
|
|
@ -1,22 +1,30 @@
|
||||||
|
<div>
|
||||||
@foreach($jobs as $job)
|
@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 class="w-full flex justify-between">
|
||||||
<div>
|
<div class="text-sm">
|
||||||
{{ $job['displayName']}}
|
Runnning...
|
||||||
</div>
|
</div>
|
||||||
<div>
|
{{-- <div>
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" class="w-4" viewBox="0 0 24 24">
|
<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" />
|
<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2.5" d="m7 7l10 10M7 17L17 7" />
|
||||||
</svg>
|
</svg>
|
||||||
</div>
|
</div>--}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex gap-2 items-center">
|
<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>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@endforeach
|
@endforeach
|
||||||
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue