diff --git a/app/Helpers/PageAssets.php b/app/Helpers/PageAssets.php index 84a70cc..d02adb0 100644 --- a/app/Helpers/PageAssets.php +++ b/app/Helpers/PageAssets.php @@ -20,12 +20,13 @@ class PageAssets 'datatables' => [ 'base' => [ 'css' => [ - '//cdn.datatables.net/2.1.2/css/dataTables.bootstrap4.css', + '//cdn.datatables.net/1.10.25/css/dataTables.bootstrap5.css', //'//cdn.datatables.net/2.1.2/css/dataTables.dataTables.min.css', + '/plugin/dataTables/dataTables.bootstrap5.css', ], 'js' => [ - '//cdn.datatables.net/2.1.2/js/dataTables.min.js', - '//cdn.datatables.net/2.1.2/js/dataTables.bootstrap4.min.js', + '//cdn.datatables.net/1.10.25/js/jquery.dataTables.min.js', + '//cdn.datatables.net/1.10.25/js/dataTables.bootstrap5.min.js', ], ], 'buttons' => [ @@ -42,7 +43,8 @@ class PageAssets ], 'conditionalpaging' => [ 'js' => [ - '//cdn.datatables.net/plug-ins/2.0.5/features/conditionalPaging/dataTables.conditionalPaging.min.js', + //'//cdn.datatables.net/plug-ins/2.0.5/features/conditionalPaging/dataTables.conditionalPaging.min.js', + '/plugin/dataTables/dataTables.conditionalPaging.js', ], ], 'fixedheader' => [ @@ -69,13 +71,13 @@ class PageAssets ], 'rowgroup' => [ 'css' => [ - '//cdn.datatables.net/rowgroup/1.5.0/css/rowGroup.bootstrap4.min.css', + '//cdn.datatables.net/rowgroup/1.1.2/css/rowGroup.bootstrap4.min.css', //'//cdn.datatables.net/rowgroup/1.5.0/css/rowGroup.dataTables.min.css', ], 'js' => [ - '//cdn.datatables.net/rowgroup/1.5.0/js/dataTables.rowGroup.min.js', + '//cdn.datatables.net/rowgroup/1.1.2/js/dataTables.rowGroup.min.js', //'//cdn.datatables.net/rowgroup/1.5.0/js/rowGroup.dataTables.min.js', - '//cdn.datatables.net/rowgroup/1.5.0/js/rowGroup.bootstrap4.min.js', + '//cdn.datatables.net/rowgroup/1.1.2/js/rowGroup.bootstrap5.min.js', ], ], 'searchpanes' => [ diff --git a/app/Http/Controllers/SystemController.php b/app/Http/Controllers/SystemController.php index 3e3222e..41ec723 100644 --- a/app/Http/Controllers/SystemController.php +++ b/app/Http/Controllers/SystemController.php @@ -684,9 +684,16 @@ class SystemController extends Controller $this->authorize('update_nn',$o); session()->flash('accordion','session'); + // Remove the subscription to file/echo areas for each address affected + foreach ($o->akas->where('zone_id',$zo->id) as $ao) { + $ao->echoareas()->detach(); + $ao->fileareas()->detach(); + } + $o->sessions()->detach($zo); - return redirect()->to(sprintf('system/addedit/%d',$o->id)); + return redirect() + ->to(sprintf('system/addedit/%d',$o->id)); } // @todo Can this be consolidated with system_register() diff --git a/app/Models/System.php b/app/Models/System.php index aed5906..9a98568 100644 --- a/app/Models/System.php +++ b/app/Models/System.php @@ -118,7 +118,8 @@ class System extends Model ->select(['zones.id','zones.zone_id','domain_id','zones.active']) ->join('domains',['domains.id'=>'zones.domain_id']) ->withPivot(['sespass','pktpass','ticpass','fixpass','zt_ipv4','zt_ipv6','default']) - ->orderBy('domains.name'); + ->orderBy('domains.name') + ->dontCache(); } /** diff --git a/app/Providers/CustomBladeServiceProvider.php b/app/Providers/CustomBladeServiceProvider.php index 15973a8..948b53e 100644 --- a/app/Providers/CustomBladeServiceProvider.php +++ b/app/Providers/CustomBladeServiceProvider.php @@ -32,14 +32,6 @@ class CustomBladeServiceProvider extends ServiceProvider ''. ''; - case 'select2': - return - ''; - - case 'simplemde': - return - ''; - default: throw new \Exception('Unknown CSS: '.$expression); } @@ -63,15 +55,6 @@ class CustomBladeServiceProvider extends ServiceProvider ''. ''; - case 'select2': - return - ''. - ''; - - case 'simplemde': - return - ''; - default: throw new \Exception('Unknown JS: '.$expression); } diff --git a/resources/views/components/form/base.blade.php b/resources/views/components/form/base.blade.php index 7d333fa..6d11e38 100644 --- a/resources/views/components/form/base.blade.php +++ b/resources/views/components/form/base.blade.php @@ -1,6 +1,6 @@
@if(isset($label)) - + @endisset
@if(isset($icon) || isset($prepend)) diff --git a/resources/views/components/form/select.blade.php b/resources/views/components/form/select.blade.php index e34561f..7c0b174 100644 --- a/resources/views/components/form/select.blade.php +++ b/resources/views/components/form/select.blade.php @@ -1,6 +1,6 @@ - @if(empty($value) || isset($addnew) || isset($choose)) @isset($addnew) diff --git a/resources/views/echoarea/addedit.blade.php b/resources/views/echoarea/addedit.blade.php index 9ff621a..95e8368 100644 --- a/resources/views/echoarea/addedit.blade.php +++ b/resources/views/echoarea/addedit.blade.php @@ -1,3 +1,4 @@ + @use(App\Models\Domain) @extends('layouts.app') @@ -17,24 +18,12 @@
- -
- - - - @error('domain_id') - {{ $message }} - @else - A domain is required. - @enderror - - Add a NEW Domain -
+ @php + $helper = (! $o->domain_id) + ? sprintf('Add a NEW Domain',url('domain/addedit')) + : NULL; + @endphp +
@@ -170,7 +159,7 @@

Exporting to the following adresses:

- +
@@ -185,7 +174,7 @@ @foreach ($o->addresses as $ao) - + @@ -198,4 +187,24 @@ @endif @endcan -@endsection \ No newline at end of file +@endsection + +@pa(datatables,conditionalpaging) + +@section('page-scripts') + +@append \ No newline at end of file diff --git a/resources/views/filearea/addedit.blade.php b/resources/views/filearea/addedit.blade.php index 7a5b328..c5896c4 100644 --- a/resources/views/filearea/addedit.blade.php +++ b/resources/views/filearea/addedit.blade.php @@ -1,6 +1,7 @@ @use(App\Models\Domain) @use(App\Classes\FTN\Message) + @extends('layouts.app') @section('htmlheader_title') @@ -18,24 +19,12 @@
- -
- - - - @error('domain_id') - {{ $message }} - @else - A domain is required. - @enderror - - Add a NEW Domain -
+ @php + $helper = (! $o->domain_id) + ? sprintf('Add a NEW Domain',url('domain/addedit')) + : NULL; + @endphp +
@@ -157,6 +146,8 @@
+ +
@if ($o->files->count()) @@ -191,13 +182,9 @@ @endsection -@section('page-css') - @css('datatables') -@append +@pa(datatables,conditionalpaging) @section('page-scripts') - @js('datatables') - -@append \ No newline at end of file +@endsection \ No newline at end of file diff --git a/resources/views/system/moveaddr.blade.php b/resources/views/system/moveaddr.blade.php index 1e431e6..da36d95 100644 --- a/resources/views/system/moveaddr.blade.php +++ b/resources/views/system/moveaddr.blade.php @@ -1,3 +1,6 @@ + +@use(App\Models\System) + @extends('layouts.app') @section('htmlheader_title') @@ -22,26 +25,11 @@ Move Address
- -
- - - - @error('system_id') - {{ $message }} - @else - Please select the System that should have the address. - @enderror - - - Add a NEW System - -
+ @php + $helper = sprintf('Add a NEW System',url('system/addedit')); + $label = sprintf('Move %s to system',$o->ftn); + @endphp +
@@ -109,16 +97,9 @@ Move Address @endsection -@section('page-css') - @css('select2') -@append @section('page-scripts') - @js('select2') - @@ -224,7 +206,6 @@
System
{{ $ao->system->full_name($ao) }} @auth@if($ao->is_hosted){{ $ao->is_default ? '**' : '*' }}@elseif($ao->system->setup)+@endif[{{ $ao->system_id }}]@endauth{{ $ao->ftn_3d }}{{ $ao->ftn4d }} {{ $ao->system->last_seen?->format('Y-m-d H:i') ?: '-' }} {{ ($x=$o->waiting($ao))->count() ? $x->first()->datetime->format('Y-m-d H:i') : '-' }} {{ number_format($x->count()) }}