Mail routing parent/children, domain name validation, nodelist import changes and other fixes
This commit is contained in:
@@ -157,7 +157,7 @@
|
||||
<tr>
|
||||
<td>{{ $oo->ftn }}</td>
|
||||
<td>{{ $oo->active ? 'YES' : 'NO' }}</td>
|
||||
<td>{{ $oo->role }}</td>
|
||||
<td>{{ $oo->role_name }}</td>
|
||||
<td style="width: 70px;">
|
||||
@if (! $oo->children)
|
||||
@can('admin',$oo)
|
||||
@@ -185,6 +185,83 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Routing -->
|
||||
<div class="accordion-item">
|
||||
<h3 class="accordion-header" id="routing" data-bs-toggle="collapse" data-bs-target="#collapse_routing" aria-expanded="false" aria-controls="collapse_routing">Mail Routing</h3>
|
||||
|
||||
<div id="collapse_routing" class="accordion-collapse collapse {{ (session()->has('add_address')) ? 'show' : '' }}" aria-labelledby="addresses" data-bs-parent="#accordion_homepage">
|
||||
<div class="accordion-body">
|
||||
<div class="row">
|
||||
<!-- Zone mail sent to -->
|
||||
<div class="col-6">
|
||||
@if(! $o->setup && ($x=\App\Models\Zone::active()
|
||||
->whereIn('id',$o->zones->pluck('id'))
|
||||
->whereNotIn('id',$o->sessions->pluck('id'))
|
||||
->get())->count())
|
||||
|
||||
<h4>This host's mail is sent to:</h4>
|
||||
<table class="table monotable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Zone</th>
|
||||
<th>System</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@foreach($x as $zo)
|
||||
<!-- @todo Not showing when multiple addresses in the same domain -->
|
||||
@foreach ($o->match($zo) as $oo)
|
||||
<tr>
|
||||
<td>{{ $oo->ftn }}</td>
|
||||
<td>
|
||||
@if ($x=$oo->parent())
|
||||
{{ $x->ftn4d }}
|
||||
@else
|
||||
No destination for mail.
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<!-- Systems this host collects for -->
|
||||
<div class="col-6">
|
||||
<h4>This host collects mail for the following systems:</h4>
|
||||
|
||||
@if($o->sessions->count())
|
||||
<table class="table monotable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Zone</th>
|
||||
<th>System</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@foreach ($o->sessions->sortBy('zone_id') as $zo)
|
||||
@foreach ($o->match($zo) as $oo)
|
||||
<tr>
|
||||
<td>{{ $oo->ftn }}</td>
|
||||
<td>{!! (($x=$oo->children) && $x->count()) ? $x->pluck('ftn4d')->join('<br>') : 'None' !!}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
@else
|
||||
<p>This host doesnt collect mail.</p>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@else
|
||||
@include('system.form-system')
|
||||
@endif
|
||||
|
@@ -1,7 +1,6 @@
|
||||
@if(($x=\App\Models\Zone::active()
|
||||
->whereIn('id',$o->zones->pluck('id'))
|
||||
->whereNotIn('id',$o->sessions->pluck('id'))
|
||||
->with(['domain'])
|
||||
->get())->count())
|
||||
|
||||
<hr>
|
||||
|
Reference in New Issue
Block a user