110 lines
4.5 KiB
PHP
110 lines
4.5 KiB
PHP
@extends('layouts.app')
|
|
|
|
@section('title', 'TCP Ports - ' . $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">TCP Ports</li>
|
|
</ol>
|
|
</nav>
|
|
</div>
|
|
|
|
<div class="d-flex justify-content-between align-items-center mb-4">
|
|
<h1><i class="bi bi-ethernet"></i> TCP Port Monitoring</h1>
|
|
<a href="{{ route('tcp-ports.create', $site) }}" class="btn btn-primary">
|
|
<i class="bi bi-plus-circle"></i> Add Port
|
|
</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($tcpPorts->isEmpty())
|
|
<div class="alert alert-info">
|
|
<i class="bi bi-info-circle"></i> No TCP ports are being monitored for this site yet. Click "Add Port" to start monitoring.
|
|
</div>
|
|
@else
|
|
<div class="table-responsive">
|
|
<table class="table table-hover">
|
|
<thead>
|
|
<tr>
|
|
<th>Port</th>
|
|
<th>Name</th>
|
|
<th>Status</th>
|
|
<th>Response Time</th>
|
|
<th>Last Checked</th>
|
|
<th>Active</th>
|
|
<th>Actions</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach($tcpPorts as $port)
|
|
<tr>
|
|
<td><strong>{{ $port->port }}</strong></td>
|
|
<td>{{ $port->display_name }}</td>
|
|
<td>
|
|
<span class="badge bg-{{ $port->status_color }}">
|
|
{{ $port->status_text }}
|
|
</span>
|
|
</td>
|
|
<td>
|
|
@if($port->response_time_ms)
|
|
{{ $port->response_time_ms }}ms
|
|
@else
|
|
<span class="text-muted">—</span>
|
|
@endif
|
|
</td>
|
|
<td>
|
|
@if($port->last_checked_at)
|
|
{{ $port->last_checked_at->diffForHumans() }}
|
|
@else
|
|
<span class="text-muted">Never</span>
|
|
@endif
|
|
</td>
|
|
<td>
|
|
@if($port->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('tcp-ports.show', [$site, $port]) }}"
|
|
class="btn btn-outline-primary" title="View">
|
|
<i class="bi bi-eye"></i>
|
|
</a>
|
|
<a href="{{ route('tcp-ports.edit', [$site, $port]) }}"
|
|
class="btn btn-outline-secondary" title="Edit">
|
|
<i class="bi bi-pencil"></i>
|
|
</a>
|
|
<form action="{{ route('tcp-ports.destroy', [$site, $port]) }}"
|
|
method="POST"
|
|
class="d-inline"
|
|
onsubmit="return confirm('Are you sure you want to delete this port monitor?');">
|
|
@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>
|
|
|
|
{{ $tcpPorts->links() }}
|
|
@endif
|
|
@endsection
|