{{-- resources/views/scans/index.blade.php --}} @extends('layouts.app1') @push('styles') {{-- DataTables CSS --}} @endpush @section('content')
{{-- 標題列 --}}

掃描任務

{{-- Flash 訊息 --}} @if (session('ok')) @endif @if (session('err')) @endif {{-- 篩選列 --}}
{{ $tasks->count() }}
{{-- 資料表 --}}
@foreach ($tasks as $t) @php $status = $t->status ?? 'unknown'; $badgeClass = match ($status) { 'pending' => 'bg-secondary', 'created' => 'bg-info', 'launched' => 'bg-primary', 'running' => 'bg-warning text-dark', 'completed' => 'bg-success', 'failed' => 'bg-danger', default => 'bg-light text-dark', }; $err = data_get($t->meta, 'error'); $progress = data_get($t->meta, 'progress'); $targetCount = $t->targets?->count() ?? 0; @endphp @endforeach
ID 名稱 狀態 進度 目標數 建立時間 操作
{{ $t->id }}
{{ $t->name }}
@if (!empty($t->nessus_scan_id))
Scan ID: {{ $t->nessus_scan_id }}
@endif
{{ $status }} @if ($err) @endif @if (is_numeric($progress))
{{ $progress }}%
@else @endif
{{ $targetCount }} {{ $t->created_at }}
檢視 @if (in_array($status, ['failed', 'pending']))
@csrf
@endif
@endsection @push('scripts') @endpush