61 lines
2.5 KiB
PHP
61 lines
2.5 KiB
PHP
|
|
@extends('layouts.admin')
|
||
|
|
|
||
|
|
@section('title', '采集运行记录')
|
||
|
|
|
||
|
|
@section('head')
|
||
|
|
@include('admin.partials.modern-index-head')
|
||
|
|
@endsection
|
||
|
|
|
||
|
|
@section('content')
|
||
|
|
<div class="card modern-index-toolbar mb-3">
|
||
|
|
<div class="card-body d-flex flex-column flex-lg-row gap-3 align-items-lg-center justify-content-between">
|
||
|
|
<form method="get" action="{{ route('admin.crawl-runs.index') }}" class="d-flex flex-column flex-md-row gap-2 w-100">
|
||
|
|
<input class="form-control" type="number" name="rule_id" value="{{ $filters['rule_id'] ?? '' }}" placeholder="按规则ID筛选">
|
||
|
|
<button class="btn btn-primary" type="submit"><i class="bi bi-search me-1"></i>筛选</button>
|
||
|
|
</form>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div class="card modern-index-card">
|
||
|
|
<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>
|
||
|
|
<th class="text-end">操作</th>
|
||
|
|
</tr>
|
||
|
|
</thead>
|
||
|
|
<tbody>
|
||
|
|
@forelse($items as $item)
|
||
|
|
<tr>
|
||
|
|
<td>#{{ $item->id }}</td>
|
||
|
|
<td>{{ $item->rule?->name ?? '-' }}</td>
|
||
|
|
<td>{{ $item->trigger_type?->value ?? '-' }}</td>
|
||
|
|
<td>{{ $item->status?->value ?? '-' }}</td>
|
||
|
|
<td>成功 {{ $item->success_count }} / 失败 {{ $item->failed_count }} / 跳过 {{ $item->skipped_count }}</td>
|
||
|
|
<td>{{ $item->created_at?->format('Y-m-d H:i:s') }}</td>
|
||
|
|
<td class="text-end d-flex justify-content-end gap-2">
|
||
|
|
<a class="btn btn-sm btn-outline-primary" href="{{ route('admin.crawl-runs.show', $item) }}">详情</a>
|
||
|
|
<form method="post" action="{{ route('admin.crawl-runs.retry', $item) }}">
|
||
|
|
@csrf
|
||
|
|
<button class="btn btn-sm btn-outline-success" type="submit">重试</button>
|
||
|
|
</form>
|
||
|
|
</td>
|
||
|
|
</tr>
|
||
|
|
@empty
|
||
|
|
<tr>
|
||
|
|
<td colspan="7" class="text-center text-muted py-5">暂无运行记录</td>
|
||
|
|
</tr>
|
||
|
|
@endforelse
|
||
|
|
</tbody>
|
||
|
|
</table>
|
||
|
|
</div>
|
||
|
|
<div class="card-footer">{{ $items->links() }}</div>
|
||
|
|
</div>
|
||
|
|
@endsection
|