102 lines
3.8 KiB
PHP
102 lines
3.8 KiB
PHP
|
|
@extends('layouts.admin')
|
|||
|
|
|
|||
|
|
@section('title', '运行详情 #'.$run->id)
|
|||
|
|
|
|||
|
|
@section('head')
|
|||
|
|
@include('admin.partials.modern-index-head')
|
|||
|
|
@endsection
|
|||
|
|
|
|||
|
|
@section('page_actions')
|
|||
|
|
<a class="btn btn-outline-secondary" href="{{ route('admin.crawl-runs.index') }}">返回列表</a>
|
|||
|
|
@endsection
|
|||
|
|
|
|||
|
|
@section('content')
|
|||
|
|
<div class="card modern-index-card mb-3">
|
|||
|
|
<div class="card-body">
|
|||
|
|
<div class="row g-3">
|
|||
|
|
<div class="col-md-3"><strong>规则:</strong>{{ $run->rule?->name ?? '-' }}</div>
|
|||
|
|
<div class="col-md-3"><strong>触发方式:</strong>{{ $run->trigger_type?->value ?? '-' }}</div>
|
|||
|
|
<div class="col-md-3"><strong>状态:</strong>{{ $run->status?->value ?? '-' }}</div>
|
|||
|
|
<div class="col-md-3"><strong>创建时间:</strong>{{ $run->created_at?->format('Y-m-d H:i:s') }}</div>
|
|||
|
|
<div class="col-md-3"><strong>总URL:</strong>{{ $run->total_urls }}</div>
|
|||
|
|
<div class="col-md-3"><strong>成功:</strong>{{ $run->success_count }}</div>
|
|||
|
|
<div class="col-md-3"><strong>失败:</strong>{{ $run->failed_count }}</div>
|
|||
|
|
<div class="col-md-3"><strong>跳过:</strong>{{ $run->skipped_count }}</div>
|
|||
|
|
</div>
|
|||
|
|
@if($run->error_summary)
|
|||
|
|
<div class="alert alert-warning mt-3 mb-0">{{ $run->error_summary }}</div>
|
|||
|
|
@endif
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
|
|||
|
|
<div class="card modern-index-card mb-3">
|
|||
|
|
<div class="card-header"><strong>运行明细</strong></div>
|
|||
|
|
<div class="table-responsive">
|
|||
|
|
<table class="table table-vcenter card-table modern-index-table">
|
|||
|
|
<thead>
|
|||
|
|
<tr>
|
|||
|
|
<th>ID</th>
|
|||
|
|
<th>URL</th>
|
|||
|
|
<th>阶段</th>
|
|||
|
|
<th>状态</th>
|
|||
|
|
<th>HTTP</th>
|
|||
|
|
<th>耗时(ms)</th>
|
|||
|
|
<th>错误</th>
|
|||
|
|
</tr>
|
|||
|
|
</thead>
|
|||
|
|
<tbody>
|
|||
|
|
@forelse($run->items as $item)
|
|||
|
|
<tr>
|
|||
|
|
<td>#{{ $item->id }}</td>
|
|||
|
|
<td class="text-break" style="max-width: 420px">{{ $item->url }}</td>
|
|||
|
|
<td>{{ $item->stage }}</td>
|
|||
|
|
<td>{{ $item->status?->value ?? '-' }}</td>
|
|||
|
|
<td>{{ $item->http_code ?? '-' }}</td>
|
|||
|
|
<td>{{ $item->latency_ms ?? '-' }}</td>
|
|||
|
|
<td>{{ $item->error_message ?? '-' }}</td>
|
|||
|
|
</tr>
|
|||
|
|
@empty
|
|||
|
|
<tr>
|
|||
|
|
<td colspan="7" class="text-center text-muted py-4">无明细数据</td>
|
|||
|
|
</tr>
|
|||
|
|
@endforelse
|
|||
|
|
</tbody>
|
|||
|
|
</table>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
|
|||
|
|
<div class="card modern-index-card">
|
|||
|
|
<div class="card-header"><strong>关联告警</strong></div>
|
|||
|
|
<div class="table-responsive">
|
|||
|
|
<table class="table table-vcenter card-table modern-index-table">
|
|||
|
|
<thead>
|
|||
|
|
<tr>
|
|||
|
|
<th>ID</th>
|
|||
|
|
<th>等级</th>
|
|||
|
|
<th>类型</th>
|
|||
|
|
<th>信息</th>
|
|||
|
|
<th>状态</th>
|
|||
|
|
<th>时间</th>
|
|||
|
|
</tr>
|
|||
|
|
</thead>
|
|||
|
|
<tbody>
|
|||
|
|
@forelse($run->alerts as $alert)
|
|||
|
|
<tr>
|
|||
|
|
<td>#{{ $alert->id }}</td>
|
|||
|
|
<td>{{ $alert->severity?->value ?? '-' }}</td>
|
|||
|
|
<td>{{ $alert->type }}</td>
|
|||
|
|
<td>{{ $alert->message }}</td>
|
|||
|
|
<td>{{ $alert->is_resolved ? '已处理' : '未处理' }}</td>
|
|||
|
|
<td>{{ $alert->created_at?->format('Y-m-d H:i:s') }}</td>
|
|||
|
|
</tr>
|
|||
|
|
@empty
|
|||
|
|
<tr>
|
|||
|
|
<td colspan="6" class="text-center text-muted py-4">无告警</td>
|
|||
|
|
</tr>
|
|||
|
|
@endforelse
|
|||
|
|
</tbody>
|
|||
|
|
</table>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
@endsection
|