110 lines
4.6 KiB
PHP
110 lines
4.6 KiB
PHP
@extends('layouts.app')
|
|||
|
|
|
||
|
|
@section('title', 'DNS Records - ' . $site->name)
|
||
|
|
|
||
|
|
@section('content')
|
||
|
|
<div class="mb-3">
|
||
|
|
<nav aria-label="breadcrumb">
|
||
|
|
<ol class="breadcrumb">
|
||
|
|
<li class="breadcrumb-item"><a href="{{ route('sites.index') }}">Sites</a></li>
|
||
|
|
<li class="breadcrumb-item"><a href="{{ route('dashboard.show', $site) }}">{{ $site->name }}</a></li>
|
||
|
|
<li class="breadcrumb-item active">DNS Records</li>
|
||
|
|
</ol>
|
||
|
|
</nav>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div class="d-flex justify-content-between align-items-center mb-4">
|
||
|
|
<h1><i class="bi bi-hdd-network"></i> DNS Monitoring</h1>
|
||
|
|
<a href="{{ route('dns-records.create', $site) }}" class="btn btn-primary">
|
||
|
|
<i class="bi bi-plus-circle"></i> Add DNS Record
|
||
|
|
</a>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
@if(session('success'))
|
||
|
|
<div class="alert alert-success alert-dismissible fade show">
|
||
|
|
{{ session('success') }}
|
||
|
|
<button type="button" class="btn-close" data-bs-dismiss="alert"></button>
|
||
|
|
</div>
|
||
|
|
@endif
|
||
|
|
|
||
|
|
@if($dnsRecords->isEmpty())
|
||
|
|
<div class="alert alert-info">
|
||
|
|
<i class="bi bi-info-circle"></i> No DNS records are being monitored for this site yet. Click "Add DNS Record" to start monitoring.
|
||
|
|
</div>
|
||
|
|
@else
|
||
|
|
<div class="table-responsive">
|
||
|
|
<table class="table table-hover">
|
||
|
|
<thead>
|
||
|
|
<tr>
|
||
|
|
<th>Domain</th>
|
||
|
|
<th>Type</th>
|
||
|
|
<th>Status</th>
|
||
|
|
<th>Expected Value</th>
|
||
|
|
<th>Last Checked</th>
|
||
|
|
<th>Active</th>
|
||
|
|
<th>Actions</th>
|
||
|
|
</tr>
|
||
|
|
</thead>
|
||
|
|
<tbody>
|
||
|
|
@foreach($dnsRecords as $record)
|
||
|
|
<tr>
|
||
|
|
<td><strong>{{ $record->domain }}</strong></td>
|
||
|
|
<td>
|
||
|
|
<span class="badge bg-info">{{ $record->record_type }}</span>
|
||
|
|
</td>
|
||
|
|
<td>
|
||
|
|
<span class="badge bg-{{ $record->status_color }}">
|
||
|
|
{{ $record->status_text }}
|
||
|
|
</span>
|
||
|
|
</td>
|
||
|
|
<td>
|
||
|
|
@if($record->expected_value)
|
||
|
|
<small class="text-muted">{{ Str::limit($record->expected_value, 30) }}</small>
|
||
|
|
@else
|
||
|
|
<span class="text-muted">—</span>
|
||
|
|
@endif
|
||
|
|
</td>
|
||
|
|
<td>
|
||
|
|
@if($record->last_checked_at)
|
||
|
|
{{ $record->last_checked_at->diffForHumans() }}
|
||
|
|
@else
|
||
|
|
<span class="text-muted">Never</span>
|
||
|
|
@endif
|
||
|
|
</td>
|
||
|
|
<td>
|
||
|
|
@if($record->is_active)
|
||
|
|
<span class="badge bg-success">Active</span>
|
||
|
|
@else
|
||
|
|
<span class="badge bg-secondary">Inactive</span>
|
||
|
|
@endif
|
||
|
|
</td>
|
||
|
|
<td>
|
||
|
|
<div class="btn-group btn-group-sm">
|
||
|
|
<a href="{{ route('dns-records.show', [$site, $record]) }}"
|
||
|
|
class="btn btn-outline-primary" title="View">
|
||
|
|
<i class="bi bi-eye"></i>
|
||
|
|
</a>
|
||
|
|
<a href="{{ route('dns-records.edit', [$site, $record]) }}"
|
||
|
|
class="btn btn-outline-secondary" title="Edit">
|
||
|
|
<i class="bi bi-pencil"></i>
|
||
|
|
</a>
|
||
|
|
<form action="{{ route('dns-records.destroy', [$site, $record]) }}"
|
||
|
|
method="POST"
|
||
|
|
class="d-inline"
|
||
|
|
onsubmit="return confirm('Are you sure you want to delete this DNS record?');">
|
||
|
|
@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>
|
||
|
|
@endif
|
||
|
|
@endsection
|