@php $taskHistoryExportRows = []; @endphp

Hypervisor jobs

@forelse($this->paginatedTaskHistory as $task) @php $startTime = isset($task['starttime']) ? \Carbon\Carbon::createFromTimestamp($task['starttime']) : null; $endTime = isset($task['endtime']) && $task['endtime'] > 0 ? \Carbon\Carbon::createFromTimestamp($task['endtime']) : null; $duration = null; if ($startTime && $endTime) { $duration = $startTime->diffInSeconds($endTime); } elseif ($startTime && isset($task['status']) && $task['status'] === 'running') { $duration = $startTime->diffInSeconds(now()); } $taskUpid = $task['upid'] ?? $task['id'] ?? ''; $taskKey = md5($taskUpid . ($task['starttime'] ?? '')); $isExpanded = in_array($taskUpid, $this->expandedTaskUpids ?? []); $taskHistoryExportRows[] = [ 'type' => $task['type'] ?? 'N/A', 'status' => $task['status'] ?? '-', 'start_time' => $startTime ? $startTime->format('M d, Y H:i:s') : '-', 'end_time' => $endTime ? $endTime->format('M d, Y H:i:s') : '-', 'duration' => $duration !== null ? $this->formatUptime($duration) : '-', ]; @endphp @empty @endforelse
Type
Status
Start Time
End Time
Duration
{{ $task['type'] ?? 'N/A' }} @if(isset($task['status'])) @if($task['status'] === 'OK') Success @else Failure @endif @else - @endif @if($startTime)
{{ $startTime->format('M d, Y') }}
{{ $startTime->format('H:i:s') }}
@else - @endif
@if($endTime)
{{ $endTime->format('M d, Y') }}
{{ $endTime->format('H:i:s') }}
@else - @endif
@if($duration !== null) {{ $this->formatUptime($duration) }} @else - @endif

Task Information

Loading task details...

No detailed information available for this task.

No task history available

Task history will appear here as tasks are executed on the server.

@if(count($this->taskHistory) > 0)
{{-- Records per page selector --}}
per page
{{-- Page info and navigation --}} @php $taskTotalPages = $this->taskHistoryTotalPages; $taskCurrentPage = $taskHistoryCurrentPage; $taskTotalCount = count($this->taskHistory); @endphp
Showing {{ (($taskCurrentPage - 1) * $taskHistoryPerPage) + 1 }} - {{ min($taskCurrentPage * $taskHistoryPerPage, $taskTotalCount) }} of {{ $taskTotalCount }} tasks @if($taskTotalPages > 1)
{{-- First page --}} {{-- Previous page --}} {{-- Page numbers --}} @php $taskStartPage = max(1, $taskCurrentPage - 2); $taskEndPage = min($taskTotalPages, $taskCurrentPage + 2); @endphp @if($taskStartPage > 1) @if($taskStartPage > 2) ... @endif @endif @for($i = $taskStartPage; $i <= $taskEndPage; $i++) @endfor @if($taskEndPage < $taskTotalPages) @if($taskEndPage < $taskTotalPages - 1) ... @endif @endif {{-- Next page --}} {{-- Last page --}}
@endif
@endif