{{-- resources/views/scans/show.blade.php --}} @extends('layouts.app1') @push('styles') {{-- DataTables CSS --}} @endpush @section('content')
{{-- 返回與標題列 --}}
回任務列表
最後更新:{{ $task->updated_at }}
{{-- Flash 訊息 --}} @if (session('ok')) @endif @if (session('err')) @endif {{-- 任務標頭卡 --}}

掃描任務 #{{ $task->id }}

名稱:{{ $task->name }}
@php $status = $task->status; $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', }; $progress = data_get($task->meta, 'progress'); @endphp {{ $status }} {{-- 簡易進度條(若 meta.progress 存在 0~100) --}} @if (is_numeric($progress))
{{ $progress }}%
@endif
{{-- 基本資訊列 --}}
Nessus Scan ID
{{ $task->nessus_scan_id ?? '—' }}
Template UUID
{{ $task->template_uuid ?? '—' }}
Policy ID
{{ $task->policy_id ?? '—' }}
建立時間
{{ $task->created_at }}
{{-- 操作按鈕 --}}
操作
{{-- 立即輪詢 --}}
@csrf
{{-- 重試啟動(僅在 failed 或 pending 時顯示) --}} @if (in_array($task->status, ['failed', 'pending']))
@csrf
@endif @if (empty($task->nessus_scan_id)) 綁定 Nessus 掃描 @endif {{-- 下載報告(完成時顯示) --}} @if ($task->status === 'completed' && $task->nessus_scan_id) @endif
{{-- 錯誤訊息(若有) --}} @php $err = data_get($task->meta, 'error'); @endphp @if (!empty($err)) @endif
{{-- 目標清單 --}}
目標清單 共 {{ $task->targets?->count() ?? 0 }} 個目標
@forelse($task->targets as $i => $tg) @empty @endforelse
# Target
{{ $i + 1 }} {{ $tg->target }}
尚無目標
{{-- Meta JSON(可收合) --}}
Meta(原始資料)
{{ json_encode($task->meta, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES) }}
@endsection @push('scripts') @endpush