Change rendering of user's home, taking into account systems that have been marked inactive
All checks were successful
Create Docker Image / Build Docker Image (x86_64) (push) Successful in 35s
Create Docker Image / Build Docker Image (arm64) (push) Successful in 1m30s
Create Docker Image / Final Docker Image Manifest (push) Successful in 10s

This commit is contained in:
Deon George 2024-12-02 19:57:39 +11:00
parent 09a0139839
commit 37549a90b7
2 changed files with 63 additions and 58 deletions

View File

@ -81,6 +81,7 @@ class User extends Authenticatable implements MustVerifyEmail
->join('systems',['systems.id'=>'addresses.system_id'])
->join('system_user',['system_user.system_id'=>'systems.id'])
->where('system_user.user_id',$this->id)
->where('systems.active',TRUE)
->ActiveFTN()
->FTN()
->get();

View File

@ -22,66 +22,67 @@ $user->load(['systems.akas.zone.domain.echoareas','systems.akas.echoareas']);
<div class="row pt-2">
<div class="col-12">
<h2>Hub Details for your nets</h2>
@if(($x=$user
->addresses()
->diff(our_address())
->filter(fn($item)=>($item->point_id === 0) && ($item->zone->domain->isManaged())))->count())
<h2>Hub Details for your nets</h2>
<div class="accordion" id="accordion_details">
@foreach($user
->addresses()
->diff(our_address())
->filter(fn($item)=>($item->point_id === 0) && ($item->zone->domain->isManaged()))
->groupBy('zone.domain.name') as $list)
<!-- {{ $x=$list->first()->domain->name }} -->
<div class="accordion-item">
<h3 class="accordion-header">
<span @class(['accordion-button','collapsed'=>$loop->index]) id="hd_{{ $x }}" data-bs-toggle="collapse" data-bs-target="#collapse_{{ $x }}" aria-expanded="true" aria-controls="collapse_{{ $x }}">{{ $x }}</span>
</h3>
<div class="accordion" id="accordion_details">
@foreach($x->groupBy('zone.domain.name') as $list)
<!-- {{ $x=$list->first()->domain->name }} -->
<div class="accordion-item">
<h3 class="accordion-header">
<span @class(['accordion-button','collapsed'=>$loop->index]) id="hd_{{ $x }}" data-bs-toggle="collapse" data-bs-target="#collapse_{{ $x }}" aria-expanded="true" aria-controls="collapse_{{ $x }}">{{ $x }}</span>
</h3>
<div id="collapse_{{ $x }}" class="accordion-collapse {{ ($loop->index) ? 'collapse' : 'show' }}" aria-labelledby="{{ $x }}" data-bs-parent="#accordion_details">
<div class="accordion-body">
<p>For your addresses in this domain: <strong class="highlight">{!! $list->pluck('ftn')->join('</strong>, <strong class="highlight">') !!}</strong>, you'll need to use the following details:</p>
<br>
<table class="table monotable">
<tbody>
<tr>
<td>
Hub FTN Address
</td>
<th>
<span style="color: cyan;">{{ our_address($list->first())->ftn4d }}</span>
</th>
</tr>
<tr>
<td>
Hub FTN Domain
</td>
<th>
<span style="color: cyan;">{{ $x }}</span>
</th>
</tr>
<tr>
<td>
Hub Internet Address
</td>
<th>
<span style="color: cyan;">{{ our_hostname($list->first()) }}</span>
</th>
</tr>
<tr>
<td>
Hub Internet Ports
</td>
<td>
BINKP: <span style="color: cyan;">{{ $setup->binkp_port }}</span> MD5 Mode: <span style="color: cyan;">{{$setup->optionGet(Binkp::F_MD,'binkp_options') ? 'YES' : 'NO' }}</span><br>
EMSI: <span style="color: cyan;">{{ $setup->emsi_port }}</span> Protocol: <span style="color: cyan;">Zmodem</span><br>
</td>
</tr>
</tbody>
</table>
<div id="collapse_{{ $x }}" class="accordion-collapse {{ ($loop->index) ? 'collapse' : 'show' }}" aria-labelledby="{{ $x }}" data-bs-parent="#accordion_details">
<div class="accordion-body">
<p>For your addresses in this domain: <strong class="highlight">{!! $list->pluck('ftn')->join('</strong>, <strong class="highlight">') !!}</strong>, you'll need to use the following details:</p>
<br>
<table class="table monotable">
<tbody>
<tr>
<td>
Hub FTN Address
</td>
<th>
<span style="color: cyan;">{{ our_address($list->first())->ftn4d }}</span>
</th>
</tr>
<tr>
<td>
Hub FTN Domain
</td>
<th>
<span style="color: cyan;">{{ $x }}</span>
</th>
</tr>
<tr>
<td>
Hub Internet Address
</td>
<th>
<span style="color: cyan;">{{ our_hostname($list->first()) }}</span>
</th>
</tr>
<tr>
<td>
Hub Internet Ports
</td>
<td>
BINKP: <span style="color: cyan;">{{ $setup->binkp_port }}</span> MD5 Mode: <span style="color: cyan;">{{$setup->optionGet(Binkp::F_MD,'binkp_options') ? 'YES' : 'NO' }}</span><br>
EMSI: <span style="color: cyan;">{{ $setup->emsi_port }}</span> Protocol: <span style="color: cyan;">Zmodem</span><br>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
@endforeach
</div>
@endforeach
</div>
@endif
</div>
</div>
</div>
@ -119,8 +120,9 @@ $user->load(['systems.akas.zone.domain.echoareas','systems.akas.echoareas']);
<h3>Active and Available Echos</h3>
<table class="table monotable">
<tbody>
@foreach (($dl=$user
@forelse(($dl=$user
->systems
->where('active',TRUE)
->pluck('akas')->flatten()
->pluck('zone.domain')
->unique()
@ -137,7 +139,9 @@ $user->load(['systems.akas.zone.domain.echoareas','systems.akas.echoareas']);
@endforeach
</td>
</tr>
@endforeach
@empty
<p>We share no active FTN addresses, so there are no Echos available</p>
@endforelse
</tbody>
</table>
</div>