some progress
This commit is contained in:
@@ -0,0 +1,124 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('title', 'Sitemap Monitoring')
|
||||
|
||||
@section('content')
|
||||
<div class="d-flex justify-content-between align-items-center mb-4">
|
||||
<h1><i class="bi bi-diagram-3"></i> Sitemap Monitoring</h1>
|
||||
<a href="{{ route('sitemaps.create') }}" class="btn btn-primary">
|
||||
<i class="bi bi-plus-circle"></i> Add Sitemap
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@if(session('success'))
|
||||
<div class="alert alert-success alert-dismissible fade show" role="alert">
|
||||
<i class="bi bi-check-circle"></i> {{ session('success') }}
|
||||
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if($sitemaps->isEmpty())
|
||||
<div class="alert alert-info">
|
||||
<i class="bi bi-info-circle"></i> No sitemaps are being monitored yet. Click "Add Sitemap" to get started!
|
||||
</div>
|
||||
@else
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover mb-0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Site</th>
|
||||
<th>Sitemap URL</th>
|
||||
<th>Status</th>
|
||||
<th>URL Count</th>
|
||||
<th>Last Checked</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($sitemaps as $sitemap)
|
||||
<tr class="{{ $sitemap->hasErrors() ? 'table-danger' : '' }}">
|
||||
<td>
|
||||
<a href="{{ route('dashboard.show', $sitemap->site) }}">
|
||||
{{ $sitemap->site->name }}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{ $sitemap->url }}" target="_blank" rel="noopener" class="text-break">
|
||||
{{ Str::limit($sitemap->url, 60) }}
|
||||
<i class="bi bi-box-arrow-up-right small"></i>
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<span class="badge {{ $sitemap->getStatusBadgeClass() }}">
|
||||
{{ $sitemap->getStatusText() }}
|
||||
</span>
|
||||
@if($sitemap->last_error)
|
||||
<i class="bi bi-exclamation-triangle text-danger"
|
||||
data-bs-toggle="tooltip"
|
||||
title="{{ $sitemap->last_error }}"></i>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@if($sitemap->url_count)
|
||||
<span class="badge bg-info">{{ number_format($sitemap->url_count) }} URLs</span>
|
||||
@else
|
||||
<span class="text-muted">-</span>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@if($sitemap->last_checked_at)
|
||||
<small>{{ $sitemap->last_checked_at->diffForHumans() }}</small>
|
||||
@else
|
||||
<span class="text-muted">Never</span>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
<div class="btn-group btn-group-sm" role="group">
|
||||
<a href="{{ route('sitemaps.show', $sitemap) }}" class="btn btn-outline-primary" title="View">
|
||||
<i class="bi bi-eye"></i>
|
||||
</a>
|
||||
<a href="{{ route('sitemaps.edit', $sitemap) }}" class="btn btn-outline-secondary" title="Edit">
|
||||
<i class="bi bi-pencil"></i>
|
||||
</a>
|
||||
<form action="{{ route('sitemaps.check', $sitemap) }}" method="POST" class="d-inline">
|
||||
@csrf
|
||||
<button type="submit" class="btn btn-outline-info" title="Validate Now">
|
||||
<i class="bi bi-arrow-clockwise"></i>
|
||||
</button>
|
||||
</form>
|
||||
<form action="{{ route('sitemaps.destroy', $sitemap) }}" method="POST" class="d-inline"
|
||||
onsubmit="return confirm('Are you sure you want to delete this sitemap?');">
|
||||
@csrf
|
||||
@method('DELETE')
|
||||
<button type="submit" class="btn btn-outline-danger" title="Delete">
|
||||
<i class="bi bi-trash"></i>
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@if($sitemaps->hasPages())
|
||||
<div class="card-footer">
|
||||
{{ $sitemaps->links() }}
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@push('scripts')
|
||||
<script>
|
||||
// Initialize Bootstrap tooltips
|
||||
var tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]'))
|
||||
var tooltipList = tooltipTriggerList.map(function (tooltipTriggerEl) {
|
||||
return new bootstrap.Tooltip(tooltipTriggerEl)
|
||||
})
|
||||
</script>
|
||||
@endpush
|
||||
@endsection
|
||||
Reference in New Issue
Block a user