@extends('layouts.app') @section('title', '源碼掃描') @section('content')
{{ $s['desc'] }}
| 來源 | 工具 | 語言 | 共享 | 狀態 | C | H | M | L | @if($isAdmin)建立者 | @endif時間 | |
|---|---|---|---|---|---|---|---|---|---|---|---|
|
@php
$displayName = $scan->project?->name
?? $scan->source_name
?? ($scan->source_type === 'upload' ? '上傳檔案' : null)
?? basename(parse_url($scan->source_ref ?? '', PHP_URL_PATH) ?: '—');
@endphp
{{ $displayName }}
@if($scan->source_type === 'upload')
上傳檔案
@else
{{ Str::limit(parse_url($scan->source_ref ?? '', PHP_URL_PATH) ?: ($scan->source_ref ?? ''), 55) }}
@endif
@if($scan->branch && $scan->branch !== 'main')
{{ $scan->branch }}
@endif
|
{{ $scan->scannerLabel() }} | {{ $scan->language ?? '—' }} | @php $st = $scan->share_type ?? 'private'; @endphp @php $canManage = $isAdmin || $scan->created_by === auth()->id(); @endphp @if($canManage) @else {{-- 非建立者:僅顯示狀態,無法修改 --}} @if($st === 'public') @elseif($st === 'restricted') @else @endif @endif | @if($scan->status==='done') 完成 @elseif($scan->status==='running') 執行中 @elseif($scan->status==='failed') 失敗 @else 待執行 @endif | {{ ($bySev['critical']??0) ?: '·' }} | {{ ($bySev['high']??0) ?: '·' }} | {{ ($bySev['medium']??0) ?: '·' }} | {{ ($bySev['low']??0) ?: '·' }} | @if($isAdmin){{ $scan->creator?->name ?? '—' }} | @endif{{ $scan->created_at->format('m-d H:i') }} | |
| @if($search) 找不到「{{ $search }}」的掃描記錄 @else 尚無掃描記錄,請點選上方工具卡片開始掃描 @endif | |||||||||||