From ceffc7ff147e6fdafa2d103ae94f554538decf81 Mon Sep 17 00:00:00 2001 From: Deon George Date: Mon, 22 Apr 2024 14:27:48 +1000 Subject: [PATCH] Removed unnessary controller functions that just call a view, HTML/CSS consistency updates --- app/Http/Controllers/HomeController.php | 13 +- app/Http/Controllers/SystemController.php | 6 +- app/Http/Controllers/UserController.php | 5 - public/css/fixes.css | 35 + .../views/auth/passwords/email.blade.php | 28 +- .../views/auth/passwords/reset.blade.php | 31 +- resources/views/auth/permissions.blade.php | 160 +-- resources/views/auth/register.blade.php | 22 +- resources/views/auth/verify.blade.php | 26 +- resources/views/domain/addedit.blade.php | 2 +- resources/views/domain/list.blade.php | 4 +- resources/views/domain/view.blade.php | 310 ++--- resources/views/echoarea/addedit.blade.php | 2 +- resources/views/echomail/view.blade.php | 4 +- resources/views/filearea/addedit.blade.php | 2 +- .../views/layouts/partials/scripts.blade.php | 2 +- resources/views/netmail/view.blade.php | 4 +- resources/views/pkt.blade.php | 2 +- resources/views/setup.blade.php | 22 +- resources/views/status.blade.php | 326 ++--- resources/views/system/addedit.blade.php | 1208 +++++++++-------- .../views/system/address-merge.blade.php | 92 +- resources/views/system/areafix.blade.php | 4 +- resources/views/system/form-system.blade.php | 14 - resources/views/system/home.blade.php | 2 +- resources/views/system/list.blade.php | 2 +- resources/views/system/moveaddr.blade.php | 28 +- .../{ => widget}/form-address.blade.php | 371 +++-- .../{ => widget}/form-echoarea.blade.php | 2 +- .../{ => widget}/form-filearea.blade.php | 2 +- .../{ => widget}/form-session.blade.php | 4 +- .../views/system/widget/form-system.blade.php | 458 +------ .../views/system/widget/system.blade.php | 452 ++++++ resources/views/user/addedit.blade.php | 228 ++-- resources/views/user/home.blade.php | 8 +- resources/views/user/link.blade.php | 106 +- .../views/user/system/register.blade.php | 2 +- .../system/widget/register_confirm.blade.php | 6 +- resources/views/{ => widgets}/error.blade.php | 0 resources/views/{ => widgets}/file.blade.php | 0 .../views/{ => widgets}/packet.blade.php | 0 resources/views/widgets/success-row.blade.php | 5 + resources/views/widgets/success.blade.php | 13 +- resources/views/zone/addedit.blade.php | 2 +- routes/web.php | 5 +- 45 files changed, 2009 insertions(+), 2011 deletions(-) delete mode 100644 resources/views/system/form-system.blade.php rename resources/views/system/{ => widget}/form-address.blade.php (51%) rename resources/views/system/{ => widget}/form-echoarea.blade.php (97%) rename resources/views/system/{ => widget}/form-filearea.blade.php (97%) rename resources/views/system/{ => widget}/form-session.blade.php (97%) create mode 100644 resources/views/system/widget/system.blade.php rename resources/views/{ => widgets}/error.blade.php (100%) rename resources/views/{ => widgets}/file.blade.php (100%) rename resources/views/{ => widgets}/packet.blade.php (100%) create mode 100644 resources/views/widgets/success-row.blade.php diff --git a/app/Http/Controllers/HomeController.php b/app/Http/Controllers/HomeController.php index 3ecf315..f7b44dc 100644 --- a/app/Http/Controllers/HomeController.php +++ b/app/Http/Controllers/HomeController.php @@ -39,7 +39,7 @@ class HomeController extends Controller }) ->get(); - return view('file') + return view('widgets.file') ->with('f',$f); } @@ -73,20 +73,11 @@ class HomeController extends Controller ->with(['echoarea']) ->get(); - return view('packet') + return view('widgets.packet') ->with('nm',$nm) ->with('em',$em); } - /** - * Render a view that summarises the users permissions - */ - public function permissions() - { - return view('auth.permissions') - ->with('user',Auth::user()); - } - /** * Show a packet dump * diff --git a/app/Http/Controllers/SystemController.php b/app/Http/Controllers/SystemController.php index 6c0fc2e..be10588 100644 --- a/app/Http/Controllers/SystemController.php +++ b/app/Http/Controllers/SystemController.php @@ -323,7 +323,7 @@ class SystemController extends Controller // Make sure that no other system has this address active. if ($o->role === Address::NODE_ACTIVE) - return redirect()->back()->withErrors(['demaddress'=>sprintf('%s cannot be demoted any more',$o->ftn3D)]); + return redirect()->back()->withErrors(['address'=>sprintf('%s cannot be demoted any more',$o->ftn3D)]); $o->role = ($o->role << 1); $o->save(); @@ -494,7 +494,7 @@ class SystemController extends Controller // Make sure that no other system has this address active. if ($o->role === Address::NODE_NC) - return redirect()->back()->withErrors(['proaddress'=>sprintf('%s cannot be promoted any more',$o->ftn3D)]); + return redirect()->back()->withErrors(['address'=>sprintf('%s cannot be promoted any more',$o->ftn3D)]); $o->role = ($o->role >> 1); $o->save(); @@ -564,7 +564,7 @@ class SystemController extends Controller 'active'=>TRUE, ])->single())) { - return redirect()->back()->withErrors(['susaddress'=>sprintf('%s is already active on system [%s]',$o->ftn,url('system/addedit',$x->system_id),$x->system->name)]); + return redirect()->back()->withErrors(['address'=>sprintf('%s is already active on system [%s]',$o->ftn,url('system/addedit',$x->system_id),$x->system->name)]); } $o->active = (! $o->active); diff --git a/app/Http/Controllers/UserController.php b/app/Http/Controllers/UserController.php index 748ff8b..0562e8c 100644 --- a/app/Http/Controllers/UserController.php +++ b/app/Http/Controllers/UserController.php @@ -65,9 +65,4 @@ class UserController extends Controller return view('user.link'); } - - public function register() - { - return view('user/system/register'); - } } \ No newline at end of file diff --git a/public/css/fixes.css b/public/css/fixes.css index d39e2be..eaf4be6 100644 --- a/public/css/fixes.css +++ b/public/css/fixes.css @@ -98,4 +98,39 @@ ol { padding: 0; color: inherit; background-color: inherit; +} + +/* h1 headings reference */ +h1>small.float-end { + padding-top: 2rem; +} +h1>small.float-end:before { + color: #acacac; + content: '['; +} +h1>small.float-end:after { + color: #acacac; + content: ']'; +} +h1 sup { + text-shadow: none; + font-size: 50%; + top: -1em; +} +h1>small.success { + color: #005300 !important; +} +h1>small.success:before { + color: #00aa00; + content: '['; +} +h1>small.success:after { + color: #00aa00; + content: ']'; +} + +/* Ensure our greyframe titled boxes are full width */ +.titledbox { + margin-right: 0; + margin-left: 0; } \ No newline at end of file diff --git a/resources/views/auth/passwords/email.blade.php b/resources/views/auth/passwords/email.blade.php index f7d195a..1af14bf 100644 --- a/resources/views/auth/passwords/email.blade.php +++ b/resources/views/auth/passwords/email.blade.php @@ -5,23 +5,15 @@ @endsection @section('content') - @if (Session('status')) + @includeWhen(session()->has('success'),'widgets.success-row',['msg'=>session()->get('success')]) + +
+ @csrf +
-
- -
-
- @endif - -
-
-
-

Forgot Password

- - - @csrf +
+
+

Forgot Password

@@ -52,8 +44,8 @@ Login
- +
-
+ @endsection \ No newline at end of file diff --git a/resources/views/auth/passwords/reset.blade.php b/resources/views/auth/passwords/reset.blade.php index 2628b20..4159208 100644 --- a/resources/views/auth/passwords/reset.blade.php +++ b/resources/views/auth/passwords/reset.blade.php @@ -5,23 +5,16 @@ @endsection @section('content') - @if (Session('status')) + @includeWhen(session()->has('status') || true,'widgets.success-row',['msg'=>session()->get('status')]) + +
+ @csrf +
-
- -
-
- @endif +
+
+

Reset Password

-
-
-
-

Reset Password

- - - @csrf
@@ -77,8 +70,8 @@
- -
-
-
+
+
+ + @endsection diff --git a/resources/views/auth/permissions.blade.php b/resources/views/auth/permissions.blade.php index dbcb0c4..4e414ae 100644 --- a/resources/views/auth/permissions.blade.php +++ b/resources/views/auth/permissions.blade.php @@ -4,91 +4,95 @@ @endsection @section('content') -

{{ auth()->check() ? auth()->user()->name : 'Guest' }}

+
+
+

{{ auth()->check() ? auth()->user()->name : 'Guest' }}

- - - - - - - +
TestResult
+ + + + + + - - - - - - - - + - - - + - - - + @foreach (\App\Models\Zone::orderBy('zone_id')->get() as $o) + + + + + @endforeach + +
TestResult
isAdmin@can('admin')YES @else NO @endcan
Domains - - - - - - - + + + + + + + + - + + @foreach (\App\Models\Domain::orderBy('name')->get() as $o) + + + + + @endforeach + +
DomainResult
isAdmin@can('admin')YES @else NO @endcan
Domains + + + + + + + - - @foreach (\App\Models\Domain::orderBy('name')->get() as $o) - - - - - @endforeach - -
DomainResult
{{ $o->name }}@can('admin',$o)YES @else NO @endcan
-
{{ $o->name }}@can('admin',$o)YES @else NO @endcan
+
System - - - - - - - + + + - + + @foreach (\App\Models\System::orderBy('name')->with(['users'])->get() as $o) + + + + + @endforeach + +
SystemResult
System + + + + + + + - - @foreach (\App\Models\System::orderBy('name')->with(['users'])->get() as $o) - - - - - @endforeach - -
SystemResult
{{ $o->name }}@can('update',$o)YES @else NO @endcan
-
{{ $o->name }}@can('update',$o)YES @else NO @endcan
+
Zone - - - - - - - + + + - - -
ZoneResult
Zone + + + + + + + - - @foreach (\App\Models\Zone::orderBy('zone_id')->get() as $o) - - - - - @endforeach - -
ZoneResult
{{ $o->zone_id }}@can('admin',$o)YES @else NO @endcan
-
+
{{ $o->zone_id }}@can('admin',$o)YES @else NO @endcan
+ + + + +
+
@endsection @section('page-css') diff --git a/resources/views/auth/register.blade.php b/resources/views/auth/register.blade.php index 544b5b8..c606a49 100644 --- a/resources/views/auth/register.blade.php +++ b/resources/views/auth/register.blade.php @@ -5,13 +5,13 @@ @endsection @section('content') -
-
-
-

Register

+
+ @csrf - - @csrf +
+
+
+

Register

@@ -82,14 +82,14 @@
- -
-
- Login +
+
+ Login +
-
+ @endsection \ No newline at end of file diff --git a/resources/views/auth/verify.blade.php b/resources/views/auth/verify.blade.php index c817e37..3486734 100644 --- a/resources/views/auth/verify.blade.php +++ b/resources/views/auth/verify.blade.php @@ -5,23 +5,13 @@ @endsection @section('content') - @if (Session('resent')) +
+ @csrf +
-
- -
-
- @endif - -
-
-
-

Verify

- - - @csrf +
+
+

Verify

@@ -30,8 +20,8 @@ .
- +
-
+ @endsection diff --git a/resources/views/domain/addedit.blade.php b/resources/views/domain/addedit.blade.php index 87e68e8..2fa0319 100644 --- a/resources/views/domain/addedit.blade.php +++ b/resources/views/domain/addedit.blade.php @@ -5,7 +5,7 @@ @endsection @section('content') -
+ @csrf
diff --git a/resources/views/domain/list.blade.php b/resources/views/domain/list.blade.php index 8fb255b..9cd86d0 100644 --- a/resources/views/domain/list.blade.php +++ b/resources/views/domain/list.blade.php @@ -4,14 +4,12 @@ @endsection @section('content') -
+

List of known FTN Networks

Here is a list of known FTN Networks.

-
-
diff --git a/resources/views/domain/view.blade.php b/resources/views/domain/view.blade.php index 9867179..11ebb9a 100644 --- a/resources/views/domain/view.blade.php +++ b/resources/views/domain/view.blade.php @@ -5,170 +5,174 @@ @endsection @section('content') -

{{ $o->name }} Last Update: {{ $o->updated_at->format('Y-m-d H:i') }}

+
+
+

{{ $o->name }} Last Update: {{ $o->updated_at->format('Y-m-d H:i') }}

-
- -
-

- About -

+
+ +
+

+ About +

-
-
-
- {!! \Illuminate\Mail\Markdown::parse($o->homepage) !!} +
+
+
+ {!! \Illuminate\Mail\Markdown::parse($o->homepage) !!} +
+
-
-
- -
-

- -

+ +
+

+ +

-
-
- @if($o->echoareas->count()) -

This network provides the following Echomail areas:

-
- - - - - - - - - - - - - - - - +
+
+ @if($o->echoareas->count()) +

This network provides the following Echomail areas:

+
Messages
EchoareaDescriptionLast MessageArea ActiveDayWeekMonthTotal
+ + + + + + + + + + + + + + + + - - @foreach ($o->echoarea_stats()->groupBy('id') as $oo) + + @foreach ($o->echoarea_stats()->groupBy('id') as $oo) + + + + + + + + + + + @endforeach + +
Messages
EchoareaDescriptionLast MessageArea ActiveDayWeekMonthTotal
{{ $x->name }}{{ $x->description }}{{ $x->last_message ? $x->last_message->format('Y-m-d H:i') : '-' }}{{ $x->active ? 'Active' : 'Archive' }}{{ number_format($oo->where('stats','day')->pop()?->count) }}{{ number_format($oo->where('stats','week')->pop()?->count) }}{{ number_format($oo->where('stats','month')->pop()?->count) }}{{ number_format($oo->sum('count')) }}
+ @else + This network doesnt have any Echomail areas (yet). Perhaps you would like to create one? + @endif +
+
+
+ + +
+

+ +

+ +
+
+ @if($o->fileareas->count()) +

This network provides the following File areas:

+ + + + + + + + + + + @foreach ($o->fileareas->sortBy('name') as $oo) + + + + + + @endforeach + +
FileareaDescriptionLast File Sent
{{ $oo->name }}{{ $oo->description }}-
+ @else + This network doesnt have any File areas (yet). Perhaps you would like to create one? + @endif +
+
+
+ + +
+

+ +

+ +
+
+

The following systems are members of this network.

+ + - - - - - - - - + + + + + - @endforeach - -
{{ $x->name }}{{ $x->description }}{{ $x->last_message ? $x->last_message->format('Y-m-d H:i') : '-' }}{{ $x->active ? 'Active' : 'Archive' }}{{ number_format($oo->where('stats','day')->pop()?->count) }}{{ number_format($oo->where('stats','week')->pop()?->count) }}{{ number_format($oo->where('stats','month')->pop()?->count) }}{{ number_format($oo->sum('count')) }}SystemSysopLocationAddressLast Seen
- @else - This network doesnt have any Echomail areas (yet). Perhaps you would like to create one? - @endif + + + + @foreach ($o->zones->sortBy('zone_id') as $oz) + @foreach ($oz->addresses as $ao) + + {{ $ao->system->full_name($ao) }} @auth@if($ao->session('sespass')){{ $ao->session('default') ? '**' : '*' }}@elseif($ao->system->setup)+@endif[{{ $ao->system_id }}]@endauth + {{ $ao->system->sysop }} + {{ $ao->system->location }} + {{ $ao->ftn4d }} + {{ $ao->system->last_session ? $ao->system->last_session->format('Y-m-d H:i') : '-' }} + + @endforeach + @endforeach + + @auth + + + **Default route *System defined here +This system + + + @endauth + +
+
-
-
- -
-

- -

+ +
+

+ +

-
-
- @if($o->fileareas->count()) -

This network provides the following File areas:

- - - - - - - - - - - @foreach ($o->fileareas->sortBy('name') as $oo) - - - - - - @endforeach - -
FileareaDescriptionLast File Sent
{{ $oo->name }}{{ $oo->description }}-
- @else - This network doesnt have any File areas (yet). Perhaps you would like to create one? - @endif -
-
-
- - -
-

- -

- -
-
-

The following systems are members of this network.

- - - - - - - - - - - - - @foreach ($o->zones->sortBy('zone_id') as $oz) - @foreach ($oz->addresses as $ao) - - - - - - - - @endforeach - @endforeach - - @auth - - - - - - @endauth -
SystemSysopLocationAddressLast Seen
{{ $ao->system->full_name($ao) }} @auth@if($ao->session('sespass')){{ $ao->session('default') ? '**' : '*' }}@elseif($ao->system->setup)+@endif[{{ $ao->system_id }}]@endauth{{ $ao->system->sysop }}{{ $ao->system->location }}{{ $ao->ftn4d }}{{ $ao->system->last_session ? $ao->system->last_session->format('Y-m-d H:i') : '-' }}
**Default route *System defined here +This system
-
-
-
- - -
-

- -

- -
-
- @guest - To start an application to join this network please login. - @else - @if($user->isMember($o)) - @else - This website is not ready to take applications yet, check back soon! - @endif - @endguest +
+
+ @guest + To start an application to join this network please login. + @else + @if($user->isMember($o)) + @else + This website is not ready to take applications yet, check back soon! + @endif + @endguest +
+
diff --git a/resources/views/echoarea/addedit.blade.php b/resources/views/echoarea/addedit.blade.php index 5f37ebc..47c3479 100644 --- a/resources/views/echoarea/addedit.blade.php +++ b/resources/views/echoarea/addedit.blade.php @@ -5,7 +5,7 @@ @endsection @section('content') - + @csrf
diff --git a/resources/views/echomail/view.blade.php b/resources/views/echomail/view.blade.php index 356befb..4d778d4 100644 --- a/resources/views/echomail/view.blade.php +++ b/resources/views/echomail/view.blade.php @@ -4,9 +4,9 @@ @endsection @section('content') -
+
-

Echomail

+

Echomail [{{ $o->msgid ?: '-' }}] #{{ $o->id }}

@include('widgets.message',['msg'=>$o])
diff --git a/resources/views/filearea/addedit.blade.php b/resources/views/filearea/addedit.blade.php index 4d00bf3..29335c4 100644 --- a/resources/views/filearea/addedit.blade.php +++ b/resources/views/filearea/addedit.blade.php @@ -6,7 +6,7 @@ @endsection @section('content') - + @csrf
diff --git a/resources/views/layouts/partials/scripts.blade.php b/resources/views/layouts/partials/scripts.blade.php index 4d24f31..65e5186 100644 --- a/resources/views/layouts/partials/scripts.blade.php +++ b/resources/views/layouts/partials/scripts.blade.php @@ -1,6 +1,6 @@ - + diff --git a/resources/views/netmail/view.blade.php b/resources/views/netmail/view.blade.php index 563ab31..506e911 100644 --- a/resources/views/netmail/view.blade.php +++ b/resources/views/netmail/view.blade.php @@ -4,9 +4,9 @@ @endsection @section('content') -
+
-

Netmail

+

Netmail [{{ $o->msgid ?: '-' }}] #{{ $o->id }}

@include('widgets.message',['msg'=>$o])
diff --git a/resources/views/pkt.blade.php b/resources/views/pkt.blade.php index 7668492..9a349ca 100644 --- a/resources/views/pkt.blade.php +++ b/resources/views/pkt.blade.php @@ -4,7 +4,7 @@ @endsection @section('content') - + @csrf
diff --git a/resources/views/setup.blade.php b/resources/views/setup.blade.php index 55a119e..be8b4c1 100644 --- a/resources/views/setup.blade.php +++ b/resources/views/setup.blade.php @@ -10,19 +10,15 @@ use App\Classes\Protocol\{Binkp,EMSI,DNS}; @endsection @section('content') -
-
-

Site Setup

-
-
+ + @csrf -
-
-
-

@if($o->exists) Update @else Initial @endif Setup

+
+
+

Site Setup

- - @csrf +
+

@if($o->exists) Update @else Initial @endif Setup

@@ -298,10 +294,10 @@ use App\Classes\Protocol\{Binkp,EMSI,DNS};
@endcan
- +
-
+ @endsection @section('page-css') diff --git a/resources/views/status.blade.php b/resources/views/status.blade.php index 73c3da9..0d3d475 100644 --- a/resources/views/status.blade.php +++ b/resources/views/status.blade.php @@ -7,193 +7,193 @@

System Status

-
-
-
- -
-

- -

+
+ +
+

+ +

-
-
-

This system has processed the following so far in the last 7 days:

+
+
+

This system has processed the following so far in the last 7 days:

-
- -
-
-
- Netmail - - -
- - @if($x->count()) -
-

Networks:

-
    - @foreach($x->groupBy('fftn.zone_id') as $oo) -
  • {{ $oo->first()->fftn->zone->domain->name }}: {{ number_format($oo->count()) }}
  • - @endforeach -
-
- @endif -
-
- - -
-
-
- Echomail - - -
- - @if($x->count()) -
-

Networks:

-
    - @foreach($x->groupBy('fftn.zone_id') as $oo) -
  • {{ sprintf('Z%d (%s)',$oo->first()->fftn->zone->zone_id,$oo->first()->fftn->zone->domain->name) }}: {{ number_format($oo->count()) }}
  • - @endforeach -
-
- @endif -
-
- - -
-
-
- Files - - -
- - @if($x->count()) -
-

Networks:

-
    - @foreach($x->groupBy('fftn.zone_id') as $oo) -
  • {{ sprintf('Z%d (%s)',$oo->first()->fftn->zone->zone_id,$oo->first()->fftn->zone->domain->name) }}: {{ number_format($oo->count()) }}
  • - @endforeach -
-
- @endif -
-
- - -
-
-
+ +
+
- Systems -
+ + @if($x->count()) +
+

Networks:

+
    + @foreach($x->groupBy('fftn.zone_id') as $oo) +
  • {{ $oo->first()->fftn->zone->domain->name }}: {{ number_format($oo->count()) }}
  • + @endforeach +
+
+ @endif
-
-
-
-
+ +
+
- DNS Queries - + Echomail +
+ + @if($x->count()) +
+

Networks:

+
    + @foreach($x->groupBy('fftn.zone_id') as $oo) +
  • {{ sprintf('Z%d (%s)',$oo->first()->fftn->zone->zone_id,$oo->first()->fftn->zone->domain->name) }}: {{ number_format($oo->count()) }}
  • + @endforeach +
+
+ @endif +
+
+ + +
+
+
+ Files + + +
+ + @if($x->count()) +
+

Networks:

+
    + @foreach($x->groupBy('fftn.zone_id') as $oo) +
  • {{ sprintf('Z%d (%s)',$oo->first()->fftn->zone->zone_id,$oo->first()->fftn->zone->domain->name) }}: {{ number_format($oo->count()) }}
  • + @endforeach +
+
+ @endif +
+
+ + +
+
+
+
+
+ Systems + + +
+
+
+
+ +
+
+
+
+ DNS Queries + + +
+
+
-
-
- -
-

- -

+ +
+

+ +

-
-
-
-
-

Nodes with uncollected mail as at {{ $date }}:

+
+
+
+
+

Nodes with uncollected mail as at {{ $date }}:

- - - - - - - - - - - - - - +
NetworkSystemAddressEchomailsNetmailsFilesLast SessionPoll ModeAuto Hold
+ + + + + + + + + + + + + - - @foreach($uncollected as $o) - - - - - - - - - - - - @endforeach - -
NetworkSystemAddressEchomailsNetmailsFilesLast SessionPoll ModeAuto Hold
{{ $o->zone->domain->name }} - {{ $o->system->name }} - @if (($x=$o->parent()) && ($x->id !== $o->id)) -
[via {{ $x->ftn4d }}] - @endif -
{{ $o->ftn4d }}{{ number_format($o->uncollected_echomail ?? 0) }}{{ number_format($o->uncollected_netmail ?? 0) }}{{ number_format($o->uncollected_files ?? 0) }}{{ $o->system->last_session?->format('Y-m-d H:i') }}{{ is_null($o->system->pollmode) ? 'HOLD' : ($o->system->pollmode ? 'CRASH' : 'DAILY') }}{{ $o->system->autohold ? 'YES' : 'NO' }}
+ + @foreach($uncollected as $o) + + {{ $o->zone->domain->name }} + + {{ $o->system->name }} + @if (($x=$o->parent()) && ($x->id !== $o->id)) +
[via {{ $x->ftn4d }}] + @endif + + {{ $o->ftn4d }} + {{ number_format($o->uncollected_echomail ?? 0) }} + {{ number_format($o->uncollected_netmail ?? 0) }} + {{ number_format($o->uncollected_files ?? 0) }} + {{ $o->system->last_session?->format('Y-m-d H:i') }} + {{ is_null($o->system->pollmode) ? 'HOLD' : ($o->system->pollmode ? 'CRASH' : 'DAILY') }} + {{ $o->system->autohold ? 'YES' : 'NO' }} + + @endforeach + + +
+
diff --git a/resources/views/system/addedit.blade.php b/resources/views/system/addedit.blade.php index 8a64cf4..67b41e5 100644 --- a/resources/views/system/addedit.blade.php +++ b/resources/views/system/addedit.blade.php @@ -6,646 +6,654 @@ @endsection @section('content') - @if($o->exists) -

{{ $o->name }}@if($o->setup)*@endif

- @if($o->setup)* This Host@endif - @endif +
+
+ @if($o->exists) +

+ {{ $o->name }}@if($o->setup)*@endif + @if($o->setup)* This Host@endif +

+ @endif - @if($o->zcs->count()) -

This system is the ZC for the following zones: {!! $o->zcs->sortBy('zone_id')->map(function($item) { return sprintf('%d@%s',$item->zone_id,$item->domain->name); })->join(', ') !!}

- @endif + @if($o->zcs->count()) +

This system is the ZC for the following zones: {!! $o->zcs->sortBy('zone_id')->map(function($item) { return sprintf('%d@%s',$item->zone_id,$item->domain->name); })->join(', ') !!}

+ @endif -
- @if ($o->exists) - -
-

- System -

+
+ @if ($o->exists) + +
+

+ System +

-
-
- @include('system.form-system') -
-
-
- - -
-

- -

- -
-
-

FidoNet addresses are constructed in the format zone:net/node.point@domain.

- -
-

- -

- -
-
-

FidoNet system are also assigned some roles, and in some cases, those roles have a particular address format:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
RoleAddress Format
Zone (optional) - ZONE:0/0.0, where the net, node and point values are zero. Zones normally have 1 or more Regions and/or Hosts.

- (Systems that do not configure other systems with a zone, assume that that other system is in the same zone as the system being configured.) -
Region (optional) - zone:REGION/0.0, where the zone indicates which zone the region is in. The node and point values are zero. Regions normally have 1 or more Hosts.

- Fidonet software normally doesnt configure the region address per-se. It is used by the mailer to receive packets destined to it by routing, in transition to the final destination. The region number must be unique with a zone. -
Host (mandatory) - zone:HOST/0.0, where the zone indicates which zone the host is in. The node and point values are zero. The Host system is normally configured with an additional address, where the NET address is the same and the NODE number that is greater than zero. Hosts may may zero or more Hubs and 1 or more Nodes.

- The host number must be unique within a zone, which implies that it cannot be the same as a region, if regions are used. -
Hub (optional) - zone:net/NODE.0, where the zone/net indicates which zone/net the hub is in. The system(s) in the nodelist below a Hub are fed from that hub from a routing perspective.

- The node is unique within the net and point is zero. -
Node (required) - zone:net/NODE.0, where the zone/net indicates which zone/net the node is in.

- The node is unique within the net and point is zero. -
-
+
+
+ @include('system.widget.form-system')
- - @if($o->addresses->count()) -

This system has the following addresses assigned to it:

- - - - - - - - - - - - - @foreach ($o->addresses->sortBy(function($item) { return sprintf('%04x%04x%04x%04x%04x',$item->zone->zone_id,$item->region_id,$item->host_id,$item->node_id,$item->point_id); }) as $oo) - - - - - - - - @endforeach - -
AddressActiveSecurityRole
trashed()) class="trashed" @elseif (! $oo->active) class="inactive" @endif>{{ $oo->ftn }} {{ $oo->active ? 'YES' : 'NO' }}{{ $oo->security }}{{ $oo->role_name }} - @can('admin',$oo) - @if(! $oo->active_domain) - - - @elseif($oo->trashed()) - - - @else - - - - - @if ((\App\Models\Address::NODE_HC|\App\Models\Address::NODE_ACTIVE) & $oo->role) - - @endif - @if ((\App\Models\Address::NODE_NC|\App\Models\Address::NODE_HC) & $oo->role) - - @endif - @endif - @endcan -
- - @error('susaddress') - - {!! $message !!} - - @enderror - - @error('demaddress') - - {!! $message !!} - - @enderror - - @error('proaddress') - - {!! $message !!} - - @enderror - @endif - - @can('admin',$o) - @include('system.form-address') - - @else - You'll need to ask an admin to assign addresses. - @endcan
-
-
- @if(! $o->setup) - -
-

- -

+ +
+

+ +

-
-
- @if ($o->sessions->count()) - - - - - - - - - - - - - - - - - +
+
+
+
+

FidoNet addresses are constructed in the format zone:net/node.point@domain.

-
- @foreach ($o->sessions->sortBy('zone_id') as $oo) - - - - - - - - - - @endforeach - -
 Passwords 
ZoneDefaultSessionPacketTICAreafix 
{{ $oo->zone_id }}@{{ $oo->domain->name }} - @if(($x=$oo->systems->where('pivot.default',TRUE))->count() && ($x->first()->id !== $o->id)) - - @else - - @endif - {{ $oo->pivot->sespass }}{{ $oo->pivot->pktpass }}{{ $oo->pivot->ticpass }}{{ $oo->pivot->fixpass }} - {{-- - - --}} - - -
- @else -

No session details exist

- @endif +
+

+ +

- @include('system.form-session') -
-
-
+
+
+

FidoNet system are also assigned some roles, and in some cases, those roles have a particular address format:

+ + + + + + + - -
-

- -

+
+ + + + + + + + + + + + + + + + + + + + + +
RoleAddress Format
Zone (optional) + ZONE:0/0.0, where the net, node and point values are zero. Zones normally have 1 or more Regions and/or Hosts.

+ (Systems that do not configure other systems with a zone, assume that that other system is in the same zone as the system being configured.) +
Region (optional) + zone:REGION/0.0, where the zone indicates which zone the region is in. The node and point values are zero. Regions normally have 1 or more Hosts.

+ Fidonet software normally doesnt configure the region address per-se. It is used by the mailer to receive packets destined to it by routing, in transition to the final destination. The region number must be unique with a zone. +
Host (mandatory) + zone:HOST/0.0, where the zone indicates which zone the host is in. The node and point values are zero. The Host system is normally configured with an additional address, where the NET address is the same and the NODE number that is greater than zero. Hosts may may zero or more Hubs and 1 or more Nodes.

+ The host number must be unique within a zone, which implies that it cannot be the same as a region, if regions are used. +
Hub (optional) + zone:net/NODE.0, where the zone/net indicates which zone/net the hub is in. The system(s) in the nodelist below a Hub are fed from that hub from a routing perspective.

+ The node is unique within the net and point is zero. +
Node (required) + zone:net/NODE.0, where the zone/net indicates which zone/net the node is in.

+ The node is unique within the net and point is zero. +
+
+
+
-
-
-

This system can subscribe to the following echoareas:

- @include('system.form-echoarea') -
-
-
+ @if($o->addresses->count()) +

This system has the following addresses assigned to it:

- -
-

- -

+ + + + + + + + + -
-
-

This system can subscribe to the following fileareas:

- @include('system.form-filearea') -
-
- - - -
-

- -

- -
-
-
- -
- @if(! $o->setup && ($x=\App\Models\Zone::active() - ->whereIn('id',$o->zones->pluck('id')) - ->whereNotIn('id',$o->sessions->pluck('id')) - ->get())->count()) - -

This host's mail is sent to:

-
AddressActiveSecurityRole
- - - - - - - - - @foreach($x as $zo) - @foreach ($o->match($zo,\App\Models\Address::NODE_ALL) as $oo) + + @foreach ($o->addresses->sortBy(function($item) { return sprintf('%04x%04x%04x%04x%04x',$item->zone->zone_id,$item->region_id,$item->host_id,$item->node_id,$item->point_id); }) as $oo) - - + + + + @endforeach - @endforeach - -
AKAUplink
{{ $oo->ftn }} - @if ($x=$oo->parent()) - {{ $x->ftn4d }} - @else - None - @endif + trashed()) class="trashed" @elseif (! $oo->active) class="inactive" @endif>{{ $oo->ftn }}{{ $oo->active ? 'YES' : 'NO' }}{{ $oo->security }}{{ $oo->role_name }} + @can('admin',$oo) + @if(! $oo->active_domain) + + + @elseif($oo->trashed()) + + + @else + + + + + @if ((\App\Models\Address::NODE_HC|\App\Models\Address::NODE_ACTIVE) & $oo->role) + + @endif + @if ((\App\Models\Address::NODE_NC|\App\Models\Address::NODE_HC) & $oo->role) + + @endif + @endif + @endcan
- @endif + + + @endif + +
- -
- @if($o->sessions->count()) -

This host collects mail for the following systems:

+ @error('address') +
+
+ + {!! $message !!} + +
+
+ @enderror + @can('admin',$o) +
+
+ @include('system.widget.form-address') +
+
+ + @else + You'll need to ask an admin to assign addresses. + @endcan +
+
+
+ + @if(! $o->setup) + +
+

+ +

+ +
+
+ @if ($o->sessions->count()) - - + + + + + + + + + + + + - @foreach ($o->sessions->sortBy('zone_id') as $zo) - @foreach ($o->match($zo,\App\Models\Address::NODE_ALL) as $oo) + @foreach ($o->sessions->sortBy('zone_id') as $oo) + + + + + + + + + + @endforeach + +
AKADownlink(s) Passwords 
ZoneDefaultSessionPacketTICAreafix 
{{ $oo->zone_id }}@{{ $oo->domain->name }} + @if(($x=$oo->systems->where('pivot.default',TRUE))->count() && ($x->first()->id !== $o->id)) + + @else + + @endif + {{ $oo->pivot->sespass }}{{ $oo->pivot->pktpass }}{{ $oo->pivot->ticpass }}{{ $oo->pivot->fixpass }} + {{-- + + --}} + + +
+ @else +

No session details exist

+ @endif + + @include('system.widget.form-session') +
+
+
+ + +
+

+ +

+ +
+
+

This system can subscribe to the following echoareas:

+ @include('system.widget.form-echoarea') +
+
+
+ + +
+

+ +

+ +
+
+

This system can subscribe to the following fileareas:

+ @include('system.widget.form-filearea') +
+
+
+ + +
+

+ +

+ +
+
+
+ +
+ @if(! $o->setup && ($x=\App\Models\Zone::active() + ->whereIn('id',$o->zones->pluck('id')) + ->whereNotIn('id',$o->sessions->pluck('id')) + ->get())->count()) + +

This host's mail is sent to:

+ + - - + + + + + + + @foreach($x as $zo) + @foreach ($o->match($zo,\App\Models\Address::NODE_ALL) as $oo) + + + + + @endforeach + @endforeach + +
{{ $oo->ftn }}{!! (($x=$oo->children()) && $x->count()) ? $x->pluck('ftn4d')->join('
') : 'None' !!}
AKAUplink
{{ $oo->ftn }} + @if ($x=$oo->parent()) + {{ $x->ftn4d }} + @else + None + @endif +
+ @endif +
+ + +
+ @if($o->sessions->count()) +

This host collects mail for the following systems:

+ + + + + + + + + + + @foreach ($o->sessions->sortBy('zone_id') as $zo) + @foreach ($o->match($zo,\App\Models\Address::NODE_ALL) as $oo) + + + + + @endforeach + @endforeach + +
AKADownlink(s)
{{ $oo->ftn }}{!! (($x=$oo->children()) && $x->count()) ? $x->pluck('ftn4d')->join('
') : 'None' !!}
+ @endif +
+
+
+
+
+ + +
+

+ +

+ +
+
+
+ +
+ Netmails are waiting for these addresses: + + + + + + + + + + @foreach ($o->addresses->sortBy('zone.zone_id') as $ao) + + + @endforeach - @endforeach - -
AddressNetmail
{{ $ao->ftn }}{{ $ao->netmailWaiting()->count() }}
- @endif + + +
+ + +
+ Echomail waiting for these addresses: + + + + + + + + + + @foreach ($o->addresses->sortBy('zone.zone_id') as $ao) + + + + + @endforeach + +
AddressEchomail
{{ $ao->ftn }}{{ $ao->echomailWaiting()->count() }}
+
+ + +
+ Files waiting for these addresses: + + + + + + + + + + @foreach ($o->addresses->sortBy('zone.zone_id') as $ao) + + + + + @endforeach + +
AddressFiles
{{ $ao->ftn }}{{ $ao->filesWaiting()->count() }}
+
+
-
-
- -
-

- -

+ +
+

+ +

-
-
-
- -
- Netmails are waiting for these addresses: - - - - - - - +
+
+
+
+ The last Netmails sent (to you): -
- @foreach ($o->addresses->sortBy('zone.zone_id') as $ao) - - - - - @endforeach - -
AddressNetmail
{{ $ao->ftn }}{{ $ao->netmailWaiting()->count() }}
-
+ @if(($x=\App\Models\Netmail::select(['sent_pkt','sent_at',DB::raw('count(*) AS count')]) + ->whereIn('sent_id',$o->addresses->pluck('id')) + ->whereNotNull('sent_at') + ->groupBy(['sent_pkt','sent_at']) + ->orderBy('sent_at','DESC') + ->limit(10) + ->get())->count()) - -
- Echomail waiting for these addresses: - - - - - - - +
AddressEchomail
+ + + + + + + - - @foreach ($o->addresses->sortBy('zone.zone_id') as $ao) - - - - - @endforeach - -
PacketSentCount
{{ $ao->ftn }}{{ $ao->echomailWaiting()->count() }}
-
+ + @foreach ($x as $oo) + + {{ $oo->sent_pkt }} + {{ $oo->sent_at }} + {{ $oo->count }} + + @endforeach + + + @else + None + @endif +
- -
- Files waiting for these addresses: - - - - - - - +
+ The last Echomails sent (to you): -
- @foreach ($o->addresses->sortBy('zone.zone_id') as $ao) - - - - - @endforeach - -
AddressFiles
{{ $ao->ftn }}{{ $ao->filesWaiting()->count() }}
+ @if(($x=\App\Models\Echomail::select(['sent_pkt','sent_at',DB::raw('count(*) AS count')]) + ->join('echomail_seenby',['echomail_seenby.echomail_id'=>'echomails.id']) + ->whereNotNull('sent_at') + ->whereIn('address_id',$o->addresses->pluck('id')) + ->groupBy(['sent_pkt','sent_at']) + ->orderBy('sent_at','DESC') + ->limit(10) + ->get())->count()) + + + + + + + + + + + @foreach ($x as $oo) + + + + + + @endforeach + +
PacketSentCount
{{ $oo->sent_pkt }}{{ $oo->sent_at }}{{ $oo->count }}
+ @else + None + @endif +
+ +
+ The last Files sent (to you): + + @if(($x=\App\Models\File::select(['sent_at',DB::raw('count(*) AS count')]) + ->join('file_seenby',['file_seenby.file_id'=>'files.id']) + ->whereNotNull('sent_at') + ->whereIn('address_id',$o->addresses->pluck('id')) + ->groupBy(['sent_at']) + ->orderBy('sent_at','DESC') + ->limit(10) + ->get())->count()) + + + + + + + + + + @foreach ($x as $oo) + + + + + @endforeach + +
SessionCount
{{ $oo->sent_at }}{{ $oo->count }}
+ @else + None + @endif +
+
+ +
+
+ The last Netmails received (you sent): + + @if(($x=\App\Models\Netmail::select(['recv_pkt','recv_at',DB::raw('count(*) AS count')]) + ->join('netmail_path',['netmail_path.netmail_id'=>'netmails.id']) + ->whereIn('address_id',$o->addresses->pluck('id')) + ->groupBy(['recv_pkt','recv_at']) + ->orderBy('recv_at','DESC') + ->limit(10) + ->get())->count()) + + + + + + + + + + + @foreach ($x as $oo) + + + + + + @endforeach + +
PacketReceivedCount
{{ $oo->recv_pkt }}{{ $oo->recv_at }}{{ $oo->count }}
+ @else + None + @endif +
+ +
+ The last Echomails received (you sent): + + @if(($x=\App\Models\Echomail::select(['recv_pkt','recv_at',DB::raw('count(*) AS count')]) + ->join('echomail_path',['echomail_path.echomail_id'=>'echomails.id']) + ->whereNotNull('recv_pkt') + ->whereIn('address_id',$o->addresses->pluck('id')) + ->groupBy(['recv_pkt','recv_at']) + ->orderBy('recv_at','DESC') + ->limit(10) + ->get())->count()) + + + + + + + + + + + @foreach ($x as $oo) + + + + + + @endforeach + +
PacketReceivedCount
{{ $oo->recv_pkt }}{{ $oo->recv_at }}{{ $oo->count }}
+ @else + None + @endif +
+ +
+ The last Files received (from you): + + @if(($x=\App\Models\File::select(['created_at',DB::raw('count(*) AS count')]) + ->whereIn('fftn_id',$o->addresses->pluck('id')) + ->groupBy(['created_at']) + ->orderBy('created_at','DESC') + ->limit(10) + ->get())->count()) + + + + + + + + + + @foreach ($x as $oo) + + + + + @endforeach + +
SessionCount
{{ $oo->created_at }}{{ $oo->count }}
+ @else + None + @endif +
+
-
-
+ @endif - -
-

- -

+ @else + @include('system.widget.form-system') + @endif +
-
-
-
-
- The last Netmails sent (to you): - - @if(($x=\App\Models\Netmail::select(['sent_pkt','sent_at',DB::raw('count(*) AS count')]) - ->whereIn('sent_id',$o->addresses->pluck('id')) - ->whereNotNull('sent_at') - ->groupBy(['sent_pkt','sent_at']) - ->orderBy('sent_at','DESC') - ->limit(10) - ->get())->count()) - - - - - - - - - - - - @foreach ($x as $oo) - - - - - - @endforeach - -
PacketSentCount
{{ $oo->sent_pkt }}{{ $oo->sent_at }}{{ $oo->count }}
- @else - None - @endif -
- -
- The last Echomails sent (to you): - - @if(($x=\App\Models\Echomail::select(['sent_pkt','sent_at',DB::raw('count(*) AS count')]) - ->join('echomail_seenby',['echomail_seenby.echomail_id'=>'echomails.id']) - ->whereNotNull('sent_at') - ->whereIn('address_id',$o->addresses->pluck('id')) - ->groupBy(['sent_pkt','sent_at']) - ->orderBy('sent_at','DESC') - ->limit(10) - ->get())->count()) - - - - - - - - - - - @foreach ($x as $oo) - - - - - - @endforeach - -
PacketSentCount
{{ $oo->sent_pkt }}{{ $oo->sent_at }}{{ $oo->count }}
- @else - None - @endif -
- -
- The last Files sent (to you): - - @if(($x=\App\Models\File::select(['sent_at',DB::raw('count(*) AS count')]) - ->join('file_seenby',['file_seenby.file_id'=>'files.id']) - ->whereNotNull('sent_at') - ->whereIn('address_id',$o->addresses->pluck('id')) - ->groupBy(['sent_at']) - ->orderBy('sent_at','DESC') - ->limit(10) - ->get())->count()) - - - - - - - - - - @foreach ($x as $oo) - - - - - @endforeach - -
SessionCount
{{ $oo->sent_at }}{{ $oo->count }}
- @else - None - @endif -
-
- -
-
- The last Netmails received (you sent): - - @if(($x=\App\Models\Netmail::select(['recv_pkt','recv_at',DB::raw('count(*) AS count')]) - ->join('netmail_path',['netmail_path.netmail_id'=>'netmails.id']) - ->whereIn('address_id',$o->addresses->pluck('id')) - ->groupBy(['recv_pkt','recv_at']) - ->orderBy('recv_at','DESC') - ->limit(10) - ->get())->count()) - - - - - - - - - - - @foreach ($x as $oo) - - - - - - @endforeach - -
PacketReceivedCount
{{ $oo->recv_pkt }}{{ $oo->recv_at }}{{ $oo->count }}
- @else - None - @endif -
- -
- The last Echomails received (you sent): - - @if(($x=\App\Models\Echomail::select(['recv_pkt','recv_at',DB::raw('count(*) AS count')]) - ->join('echomail_path',['echomail_path.echomail_id'=>'echomails.id']) - ->whereNotNull('recv_pkt') - ->whereIn('address_id',$o->addresses->pluck('id')) - ->groupBy(['recv_pkt','recv_at']) - ->orderBy('recv_at','DESC') - ->limit(10) - ->get())->count()) - - - - - - - - - - - @foreach ($x as $oo) - - - - - - @endforeach - -
PacketReceivedCount
{{ $oo->recv_pkt }}{{ $oo->recv_at }}{{ $oo->count }}
- @else - None - @endif -
- -
- The last Files received (from you): - - @if(($x=\App\Models\File::select(['created_at',DB::raw('count(*) AS count')]) - ->whereIn('fftn_id',$o->addresses->pluck('id')) - ->groupBy(['created_at']) - ->orderBy('created_at','DESC') - ->limit(10) - ->get())->count()) - - - - - - - - - - @foreach ($x as $oo) - - - - - @endforeach - -
SessionCount
{{ $oo->created_at }}{{ $oo->count }}
- @else - None - @endif -
-
-
-
-
- @endif - @else - @include('system.form-system') - @endif + @include('widgets.modal_packet') + @include('widgets.modal_files') + @include('widgets.modal_purge') +
- - @include('widgets.modal_packet') - @include('widgets.modal_files') - @include('widgets.modal_purge') @endsection @section('page-css') @@ -657,18 +665,18 @@ @endsection @section('page-scripts') -@append \ No newline at end of file + \ No newline at end of file diff --git a/resources/views/system/widget/system.blade.php b/resources/views/system/widget/system.blade.php new file mode 100644 index 0000000..777ffde --- /dev/null +++ b/resources/views/system/widget/system.blade.php @@ -0,0 +1,452 @@ + +
+
+

System Users

+ +
+ +
+ +
+ + + + + @error('users') + {{ $message }} + @enderror + +
+
+
+
+
+ +
+
+

System Details

+ +
+ +
+ +
+ + + +
+ + @error('name') + {{ $message }} + @else + A name is required. + @enderror + +
+
+ + +
+ +
+ + + + @error('zt_id') + {{ $message }} + @enderror + +
+
+ + +
+ @can('update',$o) + +
+
+ active))checked @endif> + + + active))checked @endif> + +
+
+ @endcan +
+
+ +
+ +
+ +
+ + + + @error('sysop') + {{ $message }} + @else + A Sysop's name is required. + @enderror + +
+
+ + +
+ +
+ + + + @error('location') + {{ $message }} + @else + System location is required. + @enderror + +
+
+ + +
+ @can('update',$o) + +
+
+ hold))checked @endif> + + + hold))checked @endif> + +
+
+ @endcan +
+
+ +
+ +
+ +
+ + + + @error('address') + {{ $message }} + @enderror + +
+
+ + +
+ +
+ + + + @error('phone') + {{ $message }} + @enderror + +
+
+ + +
+ @can('update',$o) + +
+
+ pollmode === TRUE) ? 2 : 0) === 2)checked @endif> + + + pollmode === FALSE) ? 1 : 0) === 1)checked @endif> + + + pollmode) ? 0 : 1) === 0)checked @endif> + +
+ + @error('pollmode') + {{ $message }} + @enderror + +
+ @endcan +
+
+
+
+ +
+ +
+

Mailer Details

+ + +
+
+ @foreach (\App\Models\Mailer::all() as $mo) + @php($x=$o->mailers->find($mo)) +
+
+ +
+ + +
+ id.'.active',$x?->pivot->active))checked @endif> +
+ + @error('mailer_details.'.$mo->id.'.port') + {{ $message }} + @enderror + +
+
+
+ @endforeach +
+ + +
+ +
+ + + + @error('pkt_type') + {{ $message }} + @enderror + +
+
+ +
pollmode))d-none @endif" id="heartbeat_option"> + @can('admin',$o) +
+
+ +
+ + + + @error('heartbeat') + {{ $message }} + @enderror + +
+
+
+ @endcan + + @if (! is_null($o->pollmode)) +
+
+ @if($job = $o->poll()) +
+
+ @if($job->attempts)Last: @else Scheduled: @endif +
+
+ {{ $job->created_at }} +
+
+ +
+
+ Attempts: +
+
+ {{ $job->attempts ?: 0 }} +
+
+ + @if ($job->attempts) +
+
+ Next: +
+
+ {{ $job->available_at->diffForHumans(now(),$job->available_at->isFuture() ? \Carbon\CarbonInterface::DIFF_ABSOLUTE : \Carbon\CarbonInterface::DIFF_RELATIVE_TO_NOW) }} +
+
+ @endif + + @else +
+
+ Last Poll: +
+
+ {{ ($x=$o->logs->where('originate',TRUE)->last())?->created_at ?: 'Never' }} +
+
+ +
+
+ Method: +
+
+ {{ $x ? $x->mailer->name : '-' }} +
+
+ + @if ($o->heartbeat) +
+
+ Next Heartbeat: +
+
+ {{ $x ? $x->created_at->addHours($o->heartbeat) : Carbon::now() }} +
+
+ @endif + @endif + +
+
+ Status: +
+
+ + @if ($job) Queued + @elseif ($o->autohold)Auto Hold + @else + @switch($o->pollmode) + @case(TRUE) Crash @break; + @case(FALSE) Normal @break; + @default Hold + @endswitch + @endif + +
+
+
+
+ + + {{-- +
+ + + + + + + + +
Status : + @if ($job) Queued + @elseif ($o->autohold)Auto Hold + @else + @switch($o->pollmode) + @case(TRUE) Crash @break; + @case(FALSE) Normal @break; + @default Hold + @endswitch + @endif +
+
+ --}} + @endif +
+
+
+
+ +
+ +
+

BBS Details

+ +
+
+ +
+ + +
+
+
+ +
+ + +
+
+
+
+
+ +@can('admin',$o) +
+ +
+ + +
+
+@endcan + +
+
+ @if($o->exists) + @can($action,$o) + Cancel + + @else + + NOTE: You'll be able to update these details after registration is completed. + + @endcan + @else + + @endif +
+
+ +@section('page-css') + @css('select2') +@append +@section('page-scripts') + @js('select2') + + +@append \ No newline at end of file diff --git a/resources/views/user/addedit.blade.php b/resources/views/user/addedit.blade.php index eb92766..ed5552b 100644 --- a/resources/views/user/addedit.blade.php +++ b/resources/views/user/addedit.blade.php @@ -5,135 +5,131 @@ @endsection @section('content') -
+ @csrf
-
+

@if($o->exists) Update @else Add @endif User

+ +
+
+ +
+ + + + @error('name') + {{ $message }} + @else + A name is required. + @enderror + +
+
+ +
+ +
+ + + + @error('alias') + {{ $message }} + @enderror + +
+
+ + +
+ +
+ + + + @error('system_id') + {{ $message }} + @enderror + +
+
+
+ +
+
+ +
+ + + + @error('email') + {{ $message }} + @else + Email required for login. + @enderror + +
+
+ +
+ +
+
+ active))checked @endif> + + + active))checked @endif> + +
+
+
+ +
+ +
+
id === $o->id)data-bs-toggle="tooltip" title="You cannot demote yourself" @endif> + admin))checked @endif> + + + id === $o->id) || $user->cannot('admin',$o)) disabled @endif @if(! old('admin',$o->admin))checked @endif> + +
+
+
+
+ +
-

@if($o->exists) Update @else Add @endif User

+ + + + @error('pgp_pubkey') + {{ $message }} + @enderror + +
+
-
-
- -
- - - - @error('name') - {{ $message }} - @else - A name is required. - @enderror - -
-
- -
- -
- - - - @error('alias') - {{ $message }} - @enderror - -
-
- - -
- -
- - - - @error('system_id') - {{ $message }} - @enderror - -
-
-
- -
-
- -
- - - - @error('email') - {{ $message }} - @else - Email required for login. - @enderror - -
-
- -
- -
-
- active))checked @endif> - - - active))checked @endif> - -
-
-
- -
- -
-
id === $o->id)data-bs-toggle="tooltip" title="You cannot demote yourself" @endif> - admin))checked @endif> - - - id === $o->id) || $user->cannot('admin',$o)) disabled @endif @if(! old('admin',$o->admin))checked @endif> - -
-
-
-
- -
-
- - - - @error('pgp_pubkey') - {{ $message }} - @enderror - -
-
- -
-
- Cancel - @can('admin',$o) - - @endcan -
-
+
+
+ Cancel + @can('admin',$o) + + @endcan
-
+

Systems

diff --git a/resources/views/user/home.blade.php b/resources/views/user/home.blade.php index bcad70a..5f56d94 100644 --- a/resources/views/user/home.blade.php +++ b/resources/views/user/home.blade.php @@ -5,13 +5,9 @@ @section('content')
-
-
-

System Users

-
-
-
+

System Users

+

This system is aware of the following users @can('admin',(new \App\Models\User))(you can add more)@endcan:

diff --git a/resources/views/user/link.blade.php b/resources/views/user/link.blade.php index 4e86356..8604131 100644 --- a/resources/views/user/link.blade.php +++ b/resources/views/user/link.blade.php @@ -4,66 +4,70 @@ @endsection @section('content') - + @csrf -
-

Enter your Link code

+
+
+
+

Enter your Link code

- -
- -
- -
- - - - @error('system_id') - {{ $message }} - @else - BBS Name is required. - @enderror - + +
+ +
+ +
+ + + + @error('system_id') + {{ $message }} + @else + BBS Name is required. + @enderror + +
+
-
-
- -
-
- -
- - - - @error('code') - {{ $message }} - @else - A code is required. - @enderror - + +
+
+ +
+ + + + @error('code') + {{ $message }} + @else + A code is required. + @enderror + +
+
-
-
-
-
- Cancel - +
+
+ Cancel + +
+
diff --git a/resources/views/user/system/register.blade.php b/resources/views/user/system/register.blade.php index eba1e13..d4a70ed 100644 --- a/resources/views/user/system/register.blade.php +++ b/resources/views/user/system/register.blade.php @@ -5,7 +5,7 @@ @endsection @section('content') - + @csrf
diff --git a/resources/views/user/system/widget/register_confirm.blade.php b/resources/views/user/system/widget/register_confirm.blade.php index c979266..956243d 100644 --- a/resources/views/user/system/widget/register_confirm.blade.php +++ b/resources/views/user/system/widget/register_confirm.blade.php @@ -27,14 +27,14 @@

Otherwise, if all is good, we'll send a netmail to {{ $o->sysop }} at {{ $o->access_mailer }}

with further details. - + @csrf -
-
+
+
diff --git a/resources/views/error.blade.php b/resources/views/widgets/error.blade.php similarity index 100% rename from resources/views/error.blade.php rename to resources/views/widgets/error.blade.php diff --git a/resources/views/file.blade.php b/resources/views/widgets/file.blade.php similarity index 100% rename from resources/views/file.blade.php rename to resources/views/widgets/file.blade.php diff --git a/resources/views/packet.blade.php b/resources/views/widgets/packet.blade.php similarity index 100% rename from resources/views/packet.blade.php rename to resources/views/widgets/packet.blade.php diff --git a/resources/views/widgets/success-row.blade.php b/resources/views/widgets/success-row.blade.php new file mode 100644 index 0000000..f15c0ce --- /dev/null +++ b/resources/views/widgets/success-row.blade.php @@ -0,0 +1,5 @@ +
+
+ @include('widgets.success') +
+
\ No newline at end of file diff --git a/resources/views/widgets/success.blade.php b/resources/views/widgets/success.blade.php index d883fd3..a514801 100644 --- a/resources/views/widgets/success.blade.php +++ b/resources/views/widgets/success.blade.php @@ -1,10 +1,5 @@ -@if(session()->has('success')) - -@endif \ No newline at end of file + \ No newline at end of file diff --git a/resources/views/zone/addedit.blade.php b/resources/views/zone/addedit.blade.php index 2b700be..fcadccb 100644 --- a/resources/views/zone/addedit.blade.php +++ b/resources/views/zone/addedit.blade.php @@ -5,7 +5,7 @@ @endsection @section('content') - + @csrf
diff --git a/routes/web.php b/routes/web.php index 52ac462..ee8a8e3 100644 --- a/routes/web.php +++ b/routes/web.php @@ -50,10 +50,14 @@ Route::view('system/list','system.list'); Route::get('system/view/{o}',[SystemController::class,'view']) ->where('o','[0-9]+'); Route::get('search',[HomeController::class,'search']); +Route::view('user/permissions','auth.permissions'); Route::middleware(['auth','verified','activeuser'])->group(function () { Route::view('dashboard','dashboard'); + /* ACCOUNT PATHS */ + Route::view('user/update','user/update'); + /* DOMAIN PATHS */ Route::view('domain','domain.home'); Route::get('domain/api/hosts/{o}/{region}',[DomainController::class,'api_hosts']) @@ -121,7 +125,6 @@ Route::middleware(['auth','verified','activeuser'])->group(function () { Route::post('packet/contents/{o}/{packet}',[HomeController::class,'packet_contents']) ->where('o','[0-9]+') ->where('packet','[[:xdigit:]]+'); - Route::get('permissions',[HomeController::class,'permissions']); Route::match(['get','post'],'user/system/register',[SystemController::class,'register']); Route::match(['post'],'user/system/link',[SystemController::class,'system_link']);