@extends('layouts.app') @section('title', $profile->name . ' - GCB 排除設定') @push('head') @endpush @section('content')

{{ $profile->name }} {{ $profile->type === 'ubuntu' ? 'Ubuntu' : 'Apache' }}

{{ $profile->description ?? '' }} ・ 已排除 {{ count($excludedIds) }} 項
匯出排除清單 返回 GCB
@include('partials.alert') {{-- 搜尋 --}}
{{-- 目前排除清單 --}} @if (count($excludedIds) > 0)
已排除項目 ({{ count($excludedIds) }})
@foreach ($profile->exclusions as $exc) @php $item = collect($items)->firstWhere('id', $exc->gcb_item_id); @endphp @endforeach
TWGCB-ID 項目名稱 排除原因 核准人 操作
{{ $exc->gcb_item_id }} {{ $item['name'] ?? '-' }} {{ $exc->reason }} {{ $exc->approved_by }}
@csrf @method('DELETE')
@endif {{-- 所有項目(可加入排除)--}}
全部檢測項目
@foreach ($items as $idx => $item) @php $isExcluded = in_array($item['id'], $excludedIds); @endphp @endforeach
# TWGCB-ID 類別 原則設定名稱 設定值 狀態 操作
{{ $idx + 1 }} {{ $item['id'] }} {{ $item['category'] ?? '-' }} {{ $item['name'] ?? '-' }} @php $val = $item['expected'] ?? '-'; $cls = match(true) { $val === '停用' => 'gcb-val-disable', $val === '啟用' => 'gcb-val-enable', str_contains($val, '請參閱') => 'gcb-val-ref', default => 'gcb-val-other' }; $display = mb_strlen($val) > 18 ? mb_substr($val, 0, 18) . '…' : $val; @endphp {{ $display }} @if ($isExcluded) 已排除 @else 檢測中 @endif @if (!$isExcluded) @endif
{{-- 排除 Modal --}} @endsection @push('scripts') @endpush