@extends('layouts.app') @section('title', 'GCB 檢測報告') @push('head') @endpush @section('content') @php $s = $filteredSummary; $rate = $s['compliance_rate'] ?? 0; $rateColor = $rate >= 80 ? '#198754' : ($rate >= 60 ? '#fd7e14' : '#dc3545'); $categories = collect($filteredResults)->pluck('category')->unique()->sort()->values(); @endphp

{{ $report->title }}

@if ($report->profile) 主機:{{ $report->profile->name }} ・排除 {{ $s['excluded'] ?? 0 }} 項不檢測 @endif
匯出 PDF 返回 GCB
{{-- 摘要 --}}
{{ $rate }}%
合規率(排除後)
{{ $s['total'] ?? 0 }}
檢測項目
{{ $s['pass'] ?? 0 }}
通過
{{ $s['fail'] ?? 0 }}
不通過
主機:{{ $report->hostname }}
時間:{{ $report->scan_time?->format('Y-m-d H:i') }}
標準:{{ $report->type === 'ubuntu' ? 'TWGCB-01-014' : 'TWGCB-04-007' }}
錯誤:{{ $s['error'] ?? 0 }}排除:{{ $s['excluded'] ?? 0 }}
{{-- 篩選 --}}
{{-- 結果表格(排除項目已過濾) --}}
@foreach ($filteredResults as $r) @php $stIcon = match($r['status'] ?? '') { 'pass' => '', 'fail' => '', 'error' => '', default => '', }; @endphp @php $exp = $r['expected'] ?? '-'; @endphp @endforeach
狀態 ID 類別 檢測項目 預期值
{!! $stIcon !!} {{ $r['id'] ?? '' }} {{ $r['category'] ?? '' }} {{ $r['name'] ?? '' }} @if (($r['status'] ?? '') === 'fail' && !empty($r['remediation']))
修復建議:
{{ $r['remediation'] }}
@endif
{{ $exp }}
@endsection @push('scripts') @endpush