爬虫开发
This commit is contained in:
73
resources/views/admin/crawl-alerts/index.blade.php
Normal file
73
resources/views/admin/crawl-alerts/index.blade.php
Normal file
@@ -0,0 +1,73 @@
|
||||
@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-alerts.index') }}" class="d-flex flex-column flex-md-row gap-2 w-100">
|
||||
<select class="form-select" name="resolved" style="max-width: 260px">
|
||||
<option value="">全部状态</option>
|
||||
<option value="0" @selected(($filters['resolved'] ?? '') === '0')>未处理</option>
|
||||
<option value="1" @selected(($filters['resolved'] ?? '') === '1')>已处理</option>
|
||||
</select>
|
||||
<button class="btn btn-primary" type="submit">筛选</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>状态</th>
|
||||
<th class="text-end">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@forelse($items as $item)
|
||||
<tr>
|
||||
<td>#{{ $item->id }}</td>
|
||||
<td>{{ $item->severity?->value ?? '-' }}</td>
|
||||
<td>{{ $item->rule?->name ?? '-' }}</td>
|
||||
<td>
|
||||
@if($item->run)
|
||||
<a href="{{ route('admin.crawl-runs.show', $item->run) }}">#{{ $item->run_id }}</a>
|
||||
@else
|
||||
-
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ $item->type }}</td>
|
||||
<td>{{ $item->message }}</td>
|
||||
<td>{{ $item->is_resolved ? '已处理' : '未处理' }}</td>
|
||||
<td class="text-end">
|
||||
@if(! $item->is_resolved)
|
||||
<form method="post" action="{{ route('admin.crawl-alerts.resolve', $item) }}">
|
||||
@csrf
|
||||
<button class="btn btn-sm btn-outline-success" type="submit">标记已处理</button>
|
||||
</form>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@empty
|
||||
<tr>
|
||||
<td colspan="8" class="text-center text-muted py-5">暂无告警</td>
|
||||
</tr>
|
||||
@endforelse
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="card-footer">{{ $items->links() }}</div>
|
||||
</div>
|
||||
@endsection
|
||||
Reference in New Issue
Block a user