clrghouz/resources/views/system/ours.blade.php
Deon George 4501443a43
All checks were successful
Create Docker Image / Build Docker Image (x86_64) (push) Successful in 47s
Create Docker Image / Build Docker Image (arm64) (push) Successful in 1m53s
Create Docker Image / Final Docker Image Manifest (push) Successful in 10s
Improvements to finding idle nodes, last_session actually only shows the last time the remote polled us
2024-09-15 22:37:35 +10:00

103 lines
2.4 KiB
PHP

@use(App\Models\SystemZone)
@extends('layouts.app')
@section('htmlheader_title')
Systems
@endsection
@section('content')
<div class="row">
<div class="col-12">
<h2>Our Systems</h2>
@if (\App\Models\System::count() === 0)
<p class="pad">There are no systems configured here.</p>
@else
<p>These BBS systems are configured here.</p>
<table class="table monotable" id="system">
<thead>
<tr>
<th>Domain</th>
<th>ID</th>
<th>System</th>
<th>Sysop</th>
<th>Location</th>
<th>Last Seen</th>
<th>Address</th>
<th>ZeroTier ID</th>
</tr>
</thead>
<tbody>
@foreach (SystemZone::select('*')->with(['system.addresses.zone.domain','zone.domain','system.logs_recent'])->get() as $oo)
<tr>
<td>{{ $oo->zone->domain->name }}</td>
<td>
<a href="{{ url('system/addedit',[$oo->system_id]) }}">{{ $oo->system_id }}</a>
@if(! $oo->system->active)<span class="float-end"><i class="text-danger bi bi-slash-circle"></i></span>
@elseif($oo->system->hold)<span class="float-end"><i class="text-danger bi bi-stop-circle"></i></span>
@endif
</td>
<td>{{ $oo->system->name }}</td>
<td>{{ $oo->system->sysop }}</td>
<td>{{ $oo->system->location }}</td>
<td>{{ $oo->system->last_seen?->format('Y-m-d H:i') ?: '-' }}</td>
<td>{{ $oo->system->akas->where('zone_id',$oo->zone_id)->pluck('ftn4d')->join(', ') }}</td>
<td>{{ $oo->system->zt_id }}</td>
</tr>
@endforeach
</tbody>
</table>
@endif
</div>
</div>
@endsection
@section('page-css')
@css('datatables')
@append
@section('page-scripts')
@js('datatables')
<script type="text/javascript">
$(document).ready(function() {
$('table tr').click(function() {
var href = $(this).find('a').attr('href');
if (href)
window.location = href;
});
$('#system').DataTable({
paging: true,
pageLength: 25,
searching: true,
autoWidth: false,
order: [
[0,'asc'],
[2,'asc']
],
rowGroup: {
dataSrc: [0],
},
columnDefs: [
{
targets: [0],
visible: false,
},
],
conditionalPaging: {
style: 'fade',
speed: 500 // optional
},
language: {
paginate: {
previous: '&lt;&lt;',
next: '&gt;&gt;'
}
},
});
});
</script>
@append