Code cleanup, no functional changes

This commit is contained in:
2023-06-27 19:39:11 +12:00
parent b70a36003a
commit ad36da0bb1
64 changed files with 466 additions and 438 deletions

View File

@@ -9,27 +9,44 @@
<p>Welcome to the <strong class="highlight">FTN Clearing Houz</strong>.</p>
<div class="float-end ps-3 pb-3" id="network_traffic"></div>
<p>FTN is an abbreviation for FidoNet Technology Network, and the most well known FTN is "<a href="https://wikipedia.org/wiki/FidoNet">FidoNet</a>" that still exists today.
There were many other "Othernets" also created around that time and since, and some still in operation today as well.</p>
<p>FidoNet was born in the 1980's (well before the public Internet) when personal computers were being introduced to homes, and modems were being invented.
Some very clever people developed protocols and standards to exchange mail and files with peers, with the network growing to around 40,000 systems in the mid 1990's.
Those systems were called BBSes or <a href="https://wikipedia.org/wiki/Bulletin_board_system">Bulletin Board Systems</a>.
As "the Internet" became more accessible, the usage of FidoNet and BBSes drastically reduced, but there are some systems still in operation today.</p>
<p>The <strong class="highlight">FTN Clearing Houz</strong> is both an FTN Mailer and FTN message tosser, where mail is stored internally in a DB, and files in an S3 bucket. It can also hatch and toss files into FTN networks for both upstream and downstream nodes.</p>
<p>It was created as an idea to bring modern technology and capabilities to that legacy computing network that existed in the 1980's and 1990's, where many of those programs from the 1980's and 1990's are still in use today too.</p>
<p>Setting up an FTN network is fun, but managing one for the longer term, in amongst our busy lives can involve some tedious repetitive tasks.
In the same vain, maintaining and growing an FTN network also can be time consuming, especially when your effort (or lack thereof) can affect the experience of your users.
<p>FTN is an abbreviation for FidoNet Technology Network, and the most well known FTN is "
<a href="https://wikipedia.org/wiki/FidoNet">FidoNet</a>" that still exists today.
There were many other "Othernets" also created around that time and since, and some still in operation today as
well.</p>
<p>FidoNet was born in the 1980's (well before the public Internet) when personal computers were being introduced to
homes, and modems were being invented.
Some very clever people developed protocols and standards to exchange mail and files with peers, with the
network growing to around 40,000 systems in the mid 1990's.
Those systems were called BBSes or <a href="https://wikipedia.org/wiki/Bulletin_board_system">Bulletin Board
Systems</a>.
As "the Internet" became more accessible, the usage of FidoNet and BBSes drastically reduced, but there are some
systems still in operation today.</p>
<p>The <strong class="highlight">FTN Clearing Houz</strong> is both an FTN Mailer and FTN message tosser, where mail
is stored internally in a DB, and files in an S3 bucket. It can also hatch and toss files into FTN networks for
both upstream and downstream nodes.</p>
<p>It was created as an idea to bring modern technology and capabilities to that legacy computing network that
existed in the 1980's and 1990's, where many of those programs from the 1980's and 1990's are still in use today
too.</p>
<p>Setting up an FTN network is fun, but managing one for the longer term, in amongst our busy lives can involve
some tedious repetitive tasks.
In the same vain, maintaining and growing an FTN network also can be time consuming, especially when your effort
(or lack thereof) can affect the experience of your users.
So FTN Clearing Houz was created to help address that.</p>
<p>Building this software is driven by three main goals:</p>
<ol>
<li>Self Service - so that users can setup and re-jig their configuration themselves, or new users can join a network with the minimum of effort (relieving a dependancy on an admin to set you up, and thus freeing up time for those admins).</li>
<li>Self Service - so that users can setup and re-jig their configuration themselves, or new users can join a
network with the minimum of effort (relieving a dependancy on an admin to set you up, and thus freeing up
time for those admins).
</li>
<li>Automation - so that repetitive tasks can be done with minimal effort.</li>
<li>High Availability - So if one hub goes down, users can automatically connect to an alternate hub to keep mail flowing. Furthermore, as hubs retire, new hubs can assume the role of the retiring hub with minimal effort.</li>
<li>High Availability - So if one hub goes down, users can automatically connect to an alternate hub to keep
mail flowing. Furthermore, as hubs retire, new hubs can assume the role of the retiring hub with minimal
effort.
</li>
</ol>
<p>...all so that you can spend your time playing on your BBS rather than managing messages, failures or keeping an FTN network running.</p>
<p>...all so that you can spend your time playing on your BBS rather than managing messages, failures or keeping an
FTN network running.</p>
<h3>For the BBS Sysop</h3>
<p>For the BBS sysop, the FTN Clearing Houz has the following features:</p>
@@ -38,7 +55,8 @@
<li>Supports EMSI network transfers (for legacy "frontend" mailers)</li>
<li>Supports PING responses (to netmails)</li>
<li>A consistent reliable echomail/netmail hub for your BBSes, while you reconfigure your BBS.<br>
If you have more than 1 BBS, then the Clearing Houz can receive all your mail from your uplinks and feed them to your BBSes.
If you have more than 1 BBS, then the Clearing Houz can receive all your mail from your uplinks and feed
them to your BBSes.
</li>
</ul>
@@ -53,9 +71,14 @@ If you have more than 1 BBS, then the Clearing Houz can receive all your mail fr
<li>Nodelist Management</li>
<li>Self service FTN Network Applications <sup>being implemented</sup></li>
<li>Dynamic mail bundling for upstream and downstream nodes (no more "inbounds" and "outbounds")</li>
<li>Support for Fidonet Packet formats <a href="http://ftsc.org/docs/fts-0001.016">FTS-0001</a>,<a href="http://ftsc.org/docs/fsc-0039.004">FSC-0039</a>,<a href="http://ftsc.org/docs/fsc-0045.001">FSC-0045</a>,<a href="http://ftsc.org/docs/fsc-0048.002">FSC-0048</a></li>
<li>Support for Fidonet Packet formats <a href="http://ftsc.org/docs/fts-0001.016">FTS-0001</a>,
<a href="http://ftsc.org/docs/fsc-0039.004">FSC-0039</a>,
<a href="http://ftsc.org/docs/fsc-0045.001">FSC-0045</a>,
<a href="http://ftsc.org/docs/fsc-0048.002">FSC-0048</a></li>
<li>Automatic delisting of idle nodes <sup>(to be implemented)</sup></li>
<li>DNS server, to enable resolving of registered nodes using domain dns names <strong class="highlight">p<em>N</em>.f<em>N</em>.n<em>N</em>.z<em>N</em>.<em>domain</em>.ftn</strong>, or <strong class="highlight">p<em>N</em>.f<em>N</em>.n<em>N</em>.z<em>N</em>.<em>[domain dns zone]</em></strong></li>
<li>DNS server, to enable resolving of registered nodes using domain dns names
<strong class="highlight">p<em>N</em>.f<em>N</em>.n<em>N</em>.z<em>N</em>.<em>domain</em>.ftn</strong>, or
<strong class="highlight">p<em>N</em>.f<em>N</em>.n<em>N</em>.z<em>N</em>.<em>[domain dns zone]</em></strong></li>
</ul>
<h4>Other things</h4>
@@ -69,14 +92,20 @@ If you have more than 1 BBS, then the Clearing Houz can receive all your mail fr
<p>If you are here to link to BBS, please get started by <a href="{{ url('login') }}">logging in</a>.</p>
<h2>Open Source</h2>
<p>FTN Clearing Houz is built with Open Source software. At it's core, PHP drives this web UI and the interaction with nodes.</p>
<p>This web UI has been inspired by the great work at <a href="https://int10h.org">int10h.org</a>. If you have ideas to make it even better, please send me a message, or submit your comments in <a href="https://dev.dege.au/bbs/clrghouz">gitlab</a></p>
<p>FTN Clearing Houz is built with Open Source software. At it's core, PHP drives this web UI and the interaction
with nodes.</p>
<p>This web UI has been inspired by the great work at <a href="https://int10h.org">int10h.org</a>. If you have ideas
to make it even better, please send me a message, or submit your comments in <a
href="https://dev.dege.au/bbs/clrghouz">gitlab</a></p>
<h3>Other technology that drives the Clearing Houz</h3>
<p>FTN Clearing Houz is made available by these technologies:</p>
<ul>
<li>Docker - taking the effort out of building, deploying and easing the effort of upgrading.</li>
<li><strike>CockroachDB - a high available, geodispersable database, that enables accessing configuration and data from multiple locations. CockroachDB enables the FTN Clearing Houz to appear as the same hub from multiple locations, providing a high available environment for Sysops to drop off and collect mail</strike></li>
<li><strike>CockroachDB - a high available, geodispersable database, that enables accessing configuration and
data from multiple locations. CockroachDB enables the FTN Clearing Houz to appear as the same hub from
multiple locations, providing a high available environment for Sysops to drop off and collect
mail</strike></li>
<li>PostgreSQL - to store all the data
<li>Memcached - to take some of the pressure off the database</li>
<li>PHP/Laravel - the coding framework used to create this UI, and to enable the transfer of mail between systems</li>

View File

@@ -16,7 +16,7 @@
<div class="row">
<div class="col-9">
@if (\App\Models\Domain::count() == 0)
@if (\App\Models\Domain::count() === 0)
@can('admin',(new \App\Models\Domain))
<p>There are no domains setup, to <a href="{{ url('ftn/domain/addedit') }}">set up your first</a>.</p>
@else

View File

@@ -16,7 +16,7 @@
<div class="col-9">
<p>This system is aware of the following echoareas @can('admin',(new \App\Models\Echoarea))(you can <a href="{{ url('ftn/echoarea/addedit') }}">add</a> more)@endcan:</p>
@if (\App\Models\Echoarea::count() == 0)
@if (\App\Models\Echoarea::count() === 0)
@can('admin',(new \App\Models\Echoarea))
<p>There are no echoareas setup, to <a href="{{ url('ftn/echoarea/addedit') }}">set up your first</a>.</p>
@else

View File

@@ -16,7 +16,7 @@
<div class="col-9">
<p>This system is aware of the following fileareas @can('admin',(new \App\Models\Filearea))(you can <a href="{{ url('ftn/filearea/addedit') }}">add</a> more)@endcan:</p>
@if (\App\Models\Filearea::count() == 0)
@if (\App\Models\Filearea::count() === 0)
@can('admin',(new \App\Models\Filearea))
<p>There are no fileareas setup, to <a href="{{ url('ftn/filearea/addedit') }}">set up your first</a>.</p>
@else

View File

@@ -155,7 +155,7 @@
async : true,
cache : false,
beforeSend : function() {
if (c++ == 0) {
if (c++ === 0) {
$('i.bi-search').addClass('spinner-grow spinner-grow-sm');
}
},
@@ -166,7 +166,7 @@
process(data);
},
complete : function() {
if (--c == 0) {
if (--c === 0) {
$('i.bi-search').removeClass('spinner-grow spinner-grow-sm');
}
}

View File

@@ -60,7 +60,7 @@
@foreach($results as $item)
@foreach ($item as $file => $result)
<h3 class="accordion-header" data-bs-toggle="collapse" data-bs-target="#collapse_item_{{ $loop->parent->index }}_{{ $loop->index }}" aria-expanded="false">Packet Results <strong class="highlight">{{ $file }}</strong></h3>
<div id="collapse_item_{{ $loop->parent->index }}_{{ $loop->index }}" class="accordion-collapse collapse @if($result->messages->count() == 1 && $loop->parent->first)show @endif" aria-labelledby="packetdebug" data-bs-parent="#accordion_packet">
<div id="collapse_item_{{ $loop->parent->index }}_{{ $loop->index }}" class="accordion-collapse collapse @if($result->messages->count() === 1 && $loop->parent->first)show @endif" aria-labelledby="packetdebug" data-bs-parent="#accordion_packet">
<div class="accordion-body">
<p>Packet <strong class="highlight">{{ $file }}</strong> (type <strong class="highlight">{{ $result->type }}</strong>) is from <strong class="highlight">{{ $result->fftn }}</strong> to <strong class="highlight">{{ $result->tftn }}</strong>, dated <strong class="highlight">{{ $result->date }}</strong>.</p>
<p>This packet has <strong class="highlight">{{ $result->messages->count() }}</strong> messages and <strong class="highlight">{{ $result->password ? 'DOES' : 'does NOT' }}</strong> have a password.</p>
@@ -77,7 +77,7 @@
@if($msg->isNetmail()) Netmail @else Echomail <strong>{{ $msg->echoarea }}</strong> @endif : {{ $msg->msgid }}
</h4>
<div id="collapse_msg_{{ $loop->parent->index }}_{{ $loop->index }}" class="accordion-collapse collapse @if($result->messages->count() == 1 && $loop->parent->first)show @endif" aria-labelledby="packetdebug" data-bs-parent="#accordion_file_{{ $loop->parent->parent->index }}">
<div id="collapse_msg_{{ $loop->parent->index }}_{{ $loop->index }}" class="accordion-collapse collapse @if($result->messages->count() === 1 && $loop->parent->first)show @endif" aria-labelledby="packetdebug" data-bs-parent="#accordion_file_{{ $loop->parent->parent->index }}">
<div class="accordion-body">
@if ($msg->errors)
@foreach ($msg->errors->messages()->all() as $error)

View File

@@ -18,7 +18,7 @@
@can('admin',(new \App\Models\System))(you can <a href="{{ url('ftn/system/addedit') }}">add</a> more):@endcan
</p>
@if (\App\Models\System::active()->count() == 0)
@if (\App\Models\System::active()->count() === 0)
@can('create',(new \App\Models\System))
<p>There are no systems setup, to <a href="{{ url('ftn/system/addedit') }}">set up your first</a>.</p>
@else

View File

@@ -8,7 +8,7 @@
<div class="col-12">
<h2>Our Systems</h2>
@if (\App\Models\System::count() == 0)
@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>

View File

@@ -12,7 +12,7 @@
<tbody>
@foreach ($echoareas as $oo)
<tr>
<td><input type="checkbox" name="id[]" value="{{ $oo->id }}" @if($ao->echoareas->search(function($item) use ($oo) { return $item->id == $oo->id; }) !== FALSE)checked @endif></td>
<td><input type="checkbox" name="id[]" value="{{ $oo->id }}" @if($ao->echoareas->search(function($item) use ($oo) { return $item->id === $oo->id; }) !== FALSE)checked @endif></td>
<td>{{ $oo->name }}</td>
<td>{{ $oo->description }}</td>
</tr>

View File

@@ -12,7 +12,7 @@
<tbody>
@foreach ($fileareas as $oo)
<tr>
<td><input type="checkbox" name="id[]" value="{{ $oo->id }}" @if($ao->fileareas->search(function($item) use ($oo) { return $item->id == $oo->id; }) !== FALSE)checked @endif></td>
<td><input type="checkbox" name="id[]" value="{{ $oo->id }}" @if($ao->fileareas->search(function($item) use ($oo) { return $item->id === $oo->id; }) !== FALSE)checked @endif></td>
<td>{{ $oo->name }}</td>
<td>{{ $oo->description }}</td>
</tr>

View File

@@ -75,11 +75,11 @@
<div class="offset-1 col-1">
<label for="admin" class="form-label">Site Admin</label>
<div class="input-group">
<div class="btn-group" role="group" @if($user->id == $o->id)data-bs-toggle="tooltip" title="You cannot demote yourself" @endif>
<div class="btn-group" role="group" @if($user->id === $o->id)data-bs-toggle="tooltip" title="You cannot demote yourself" @endif>
<input type="radio" class="btn-check" name="admin" id="admin_yes" value="1" required @cannot('admin',$o)disabled @endcannot @if(old('admin',$o->admin))checked @endif>
<label class="btn btn-outline-success" for="admin_yes">Yes</label>
<input type="radio" class="btn-check btn-danger" name="admin" id="admin_no" value="0" required @if(($user->id == $o->id) || $user->cannot('admin',$o)) disabled @endif @if(! old('admin',$o->admin))checked @endif>
<input type="radio" class="btn-check btn-danger" name="admin" id="admin_no" value="0" required @if(($user->id === $o->id) || $user->cannot('admin',$o)) disabled @endif @if(! old('admin',$o->admin))checked @endif>
<label class="btn btn-outline-danger" for="admin_no">No</label>
</div>
</div>
@@ -113,7 +113,7 @@
@endsection
@section('page-scripts')
@if($user->id == $o->id)
@if($user->id === $o->id)
<script>
var tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]'))
var tooltipList = tooltipTriggerList.map(function (tooltipTriggerEl) {

View File

@@ -119,7 +119,7 @@
async : true,
cache : false,
beforeSend : function() {
if (c++ == 0) {
if (c++ === 0) {
icon.removeClass('d-none');
}
},
@@ -130,7 +130,7 @@
process(data);
},
complete : function() {
if (--c == 0) {
if (--c === 0) {
icon.addClass('d-none');
}
}

View File

@@ -227,7 +227,7 @@
async : true,
cache : false,
beforeSend : function() {
if (c++ == 0) {
if (c++ === 0) {
icon.removeClass('d-none');
}
},
@@ -238,7 +238,7 @@
process(data);
},
complete : function() {
if (--c == 0) {
if (--c === 0) {
icon.addClass('d-none');
}
}

View File

@@ -16,7 +16,7 @@
<div class="row">
<div class="col-9">
@if (\App\Models\Zone::count() == 0)
@if (\App\Models\Zone::count() === 0)
@can('admin',(new \App\Models\Zone))
<p>There are no zones setup, to <a href="{{ url('ftn/zone/addedit') }}">set up your first</a>.</p>
@else