clrghouz/resources/views/system/home.blade.php

108 lines
3.1 KiB
PHP
Raw Normal View History

@extends('layouts.app')
@section('htmlheader_title')
Systems
@endsection
@section('content')
<div class="row">
<div class="col-12">
<h2>BBS Systems</h2>
<p>BBS Systems Send and Receive Echomail and Files.</p>
</div>
</div>
<div class="row">
2021-06-25 11:31:57 +00:00
<div class="col-12">
2021-08-14 01:11:20 +00:00
<p>This system is aware of the following systems @can('admin',(new \App\Models\System))(you can <a href="{{ url('ftn/system/addedit') }}">add</a> more)@endcan:</p>
@if (\App\Models\System::count() == 0)
@can('admin',(new \App\Models\System))
<p>There are no systems setup, to <a href="{{ url('ftn/system/addedit') }}">set up your first</a>.</p>
@else
<p class="pad">There are no systems - you need to ask an admin to create one for you.</p>
@endcan
@else
2021-08-14 01:11:20 +00:00
<table class="table monotable" id="system">
<thead>
<tr>
<th>ID</th>
<th>System</th>
<th>Sysop</th>
<th>Location</th>
<th>Connect</th>
2021-06-25 11:31:57 +00:00
<th>Address</th>
<th>ZeroTier ID</th>
<th>Addresses</th>
</tr>
</thead>
<tbody>
2021-06-25 13:38:57 +00:00
@foreach (\App\Models\System::active()->orderBy('name')->with(['addresses.zone.domain'])->get() as $oo)
<tr>
<td><a href="{{ url('ftn/system/addedit',[$oo->id]) }}">{{ $oo->id }}</a></td>
<td>{{ $oo->name }}</td>
<td>{{ $oo->sysop }}</td>
<td>{{ $oo->location }}</td>
<td>
@switch($oo->method)
@case(23)<a href="telnet://{{ $oo->address }}:{{ $oo->port }}">Telnet</a>@break
@case(22)<a href="ssh://{{ $oo->address }}:{{ $oo->port }}">SSH</a>@break
@case(519)<a href="rlogin://{{ $oo->address }}:{{ $oo->port }}">SSH</a>@break
@default No details
@endswitch
</td>
<td>{{ $oo->addresses->pluck('ftn')->join(', ') }}</td>
2021-06-25 11:31:57 +00:00
<td>{{ $oo->zt_id }}</td>
<td>{{ $oo->addresses->count() }}</td>
</tr>
@endforeach
</tbody>
</table>
@endif
</div>
</div>
@endsection
@section('page-scripts')
2021-08-14 01:11:20 +00:00
<link type="text/css" rel="stylesheet" href="https://cdn.datatables.net/1.10.25/css/dataTables.bootstrap5.min.css" media="screen">
2021-06-25 11:31:57 +00:00
<link type="text/css" rel="stylesheet" href="{{ asset('plugin/dataTables/dataTables.bootstrap5.css') }}" media="screen">
<script type="text/javascript" src="https://cdn.datatables.net/1.10.25/js/jquery.dataTables.min.js"></script>
2021-08-14 01:11:20 +00:00
<script type="text/javascript" src="{{ asset('plugin/dataTables/dataTables.conditionalPaging.js') }}"></script>
2021-06-25 11:31:57 +00:00
<script type="text/javascript" src="https://cdn.datatables.net/1.10.25/js/dataTables.bootstrap5.min.js"></script>
<script type="text/javascript">
2021-08-14 01:11:20 +00:00
$(document).ready(function() {
$('table tr').click(function() {
var href = $(this).find('a').attr('href');
2021-08-14 01:11:20 +00:00
if (href)
window.location = href;
});
2021-06-25 11:31:57 +00:00
2021-08-14 01:11:20 +00:00
$('#system').DataTable({
paging: true,
pageLength: 25,
searching: true,
autoWidth: false,
conditionalPaging: {
style: 'fade',
speed: 500 // optional
},
language: {
paginate: {
previous: '&lt;&lt;',
next: '&gt;&gt;'
}
},
columnDefs: [
{
targets: [5,6],
visible: false,
}
],
});
2021-06-25 11:31:57 +00:00
});
</script>
@append