Enabled default routing
This commit is contained in:
@@ -70,7 +70,7 @@
|
||||
@foreach ($o->zones->sortBy('zone_id') as $oz)
|
||||
@foreach ($oz->addresses as $ao)
|
||||
<tr>
|
||||
<td><a href="{{ url('ftn/system/addedit',[$ao->system_id]) }}">{{ $ao->system->full_name($ao) }}</a> @auth<span class="float-end"><small>@if($ao->session('sespass'))<sup>*</sup>@elseif($ao->system->setup)<sup class="success">+</sup>@endif[{{ $ao->system_id }}]</small></span>@endauth</td>
|
||||
<td><a href="{{ url('ftn/system/addedit',[$ao->system_id]) }}">{{ $ao->system->full_name($ao) }}</a> @auth<span class="float-end"><small>@if($ao->session('sespass'))<sup>{{ $ao->session('default') ? '**' : '*' }}</sup>@elseif($ao->system->setup)<sup class="success">+</sup>@endif[{{ $ao->system_id }}]</small></span>@endauth</td>
|
||||
<td>{{ $ao->system->sysop }}</td>
|
||||
<td>{{ $ao->system->location }}</td>
|
||||
<td>{{ $ao->ftn_3d }}</td>
|
||||
@@ -82,7 +82,7 @@
|
||||
@auth
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="5"><sup>*</sup>System defined here <sup class="success">+</sup>This system</td>
|
||||
<td colspan="5"><sup>**</sup>Default route <sup>*</sup>System defined here <sup class="success">+</sup>This system</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
@endauth
|
||||
|
@@ -38,12 +38,13 @@ use App\Http\Controllers\DomainController as DC;
|
||||
<table class="table monotable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th> </th>
|
||||
<th colspan="2"> </th>
|
||||
<th colspan="4" class="text-center">Passwords</th>
|
||||
<th> </th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Zone</th>
|
||||
<th style="min-width: 1%;">Default</th>
|
||||
<th>Session</th>
|
||||
<th>Packet</th>
|
||||
<th>TIC</th>
|
||||
@@ -56,6 +57,13 @@ use App\Http\Controllers\DomainController as DC;
|
||||
@foreach ($o->sessions->sortBy('zone_id') as $oo)
|
||||
<tr>
|
||||
<td>{{ $oo->zone_id }}<span>@</span>{{ $oo->domain->name }}</td>
|
||||
<td style="text-align: center;">
|
||||
@if(($x=$oo->systems->where('pivot.default',TRUE))->count() && ($x->first()->id !== $o->id))
|
||||
<i class="bi bi-dash-square"></i>
|
||||
@else
|
||||
<span id="default" itemid="{{$oo->id}}"><i class="bi bi-{{ $x->count() ? 'check-square' : 'square' }}"></i></span>
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ $oo->pivot->sespass }}</td>
|
||||
<td>{{ $oo->pivot->pktpass }}</td>
|
||||
<td>{{ $oo->pivot->ticpass }}</td>
|
||||
@@ -271,4 +279,40 @@ use App\Http\Controllers\DomainController as DC;
|
||||
</div>
|
||||
|
||||
@include('widgets.modal_delete')
|
||||
@endsection
|
||||
@endsection
|
||||
|
||||
@section('page-scripts')
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$('#default').click(function() {
|
||||
var item = this;
|
||||
icon = $(item).find('i');
|
||||
|
||||
$.ajax({
|
||||
type:'POST',
|
||||
data: {sid: {{$o->id}},_token: '{{csrf_token()}}',set:(icon.hasClass('bi-square') ? 1 : 0)},
|
||||
beforeSend: function() {
|
||||
$(item).find('i').addClass('spinner-grow spinner-grow-sm');
|
||||
},
|
||||
success: function() {
|
||||
if (icon.hasClass('bi-square')) {
|
||||
icon.removeClass('bi-square');
|
||||
icon.addClass('bi-check-square');
|
||||
} else {
|
||||
icon.removeClass('bi-check-square');
|
||||
icon.addClass('bi-square');
|
||||
}
|
||||
|
||||
$(item).find('i').removeClass('spinner-grow spinner-grow-sm');
|
||||
},
|
||||
error: function() {
|
||||
$(item).find('i').removeClass('spinner-grow spinner-grow-sm');
|
||||
alert('That didnt work? Please try again....');
|
||||
},
|
||||
url: '{{ url('api/default') }}/'+item.attributes.itemid.nodeValue,
|
||||
cache: false
|
||||
})
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@append
|
Reference in New Issue
Block a user