Fix end session report, move address when system is a ZC, show #addresses on systems

This commit is contained in:
Deon George
2021-08-15 11:42:38 +10:00
parent b9abd17139
commit 414a10f84e
6 changed files with 20 additions and 4 deletions

View File

@@ -9,11 +9,15 @@ use App\Http\Controllers\DomainController as DC;
@endphp
@section('content')
@if ($o->exists)
@if($o->exists)
<h1>{{ $o->name }}@if($o->setup)<sup class="success" style="text-shadow: 0 0; font-size: 50%; top: -1em;">*</sup>@endif</h1>
@if($o->setup)<sup class="success" style="float:right;top:-2em;">* This Host</sup>@endif
@endif
@if($o->zcs)
<p>This system is the ZC for the following zones: <strong class="highlight">{!! $o->zcs->map(function($item) { return sprintf('%d@%s',$item->zone_id,$item->domain->name); })->join('</strong>, <strong class="highlight">') !!} </strong></p>
@endif
<div class="accordion accordion-flush" id="accordion_homepage">
@if ($o->exists)
<!-- System -->

View File

@@ -32,6 +32,7 @@
<th>Connect</th>
<th>Address</th>
<th>ZeroTier ID</th>
<th>Addresses</th>
</tr>
</thead>
@@ -52,6 +53,7 @@
</td>
<td>{{ $oo->addresses->pluck('ftn')->join(', ') }}</td>
<td>{{ $oo->zt_id }}</td>
<td>{{ $oo->addresses->count() }}</td>
</tr>
@endforeach
</tbody>

View File

@@ -50,10 +50,10 @@ Move Address
<label for="remove" class="form-label">Delete System after Move</label>
<div class="input-group">
<div class="btn-group" role="group">
<input type="radio" class="btn-check" name="remove" id="remove_yes" value="1" @if($o->system->setup || $o->system->addresses->count() > 1)disabled @endif @if(old('remove',FALSE))checked @endif>
<input type="radio" class="btn-check" name="remove" id="remove_yes" value="1" @if($o->system->setup || $o->system->addresses->count()+$o->system->zcs->count() > 1)disabled @endif @if(old('remove',FALSE))checked @endif>
<label class="btn btn-outline-danger" for="remove_yes">Yes</label>
<input type="radio" class="btn-check" name="remove" id="remove_no" value="0" @if($o->system->addresses->count() > 1)disabled @endif @if(! old('remove',FALSE))checked @endif>
<input type="radio" class="btn-check" name="remove" id="remove_no" value="0" @if($o->system->addresses->count()+$o->system->zcs->count() > 1)disabled @endif @if(! old('remove',FALSE))checked @endif>
<label class="btn btn-outline-success" for="remove_no">No</label>
</div>
</div>