Removed unnessary controller functions that just call a view, HTML/CSS consistency updates
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -6,66 +6,66 @@
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="row pt-0">
|
||||
<div class="col-12">
|
||||
<h2>Merge Address {{ $o->ftn }}</h2>
|
||||
<p>{{ $o->system->sysop }} : {{ $o->system->name }}</p>
|
||||
</div>
|
||||
<form class="needs-validation" method="post" novalidate>
|
||||
@csrf
|
||||
|
||||
<div class="col-12">
|
||||
<form method="POST">
|
||||
@csrf
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<h2>Merge Address {{ $o->ftn }}</h2>
|
||||
<p>{{ $o->system->sysop }} : {{ $o->system->name }}</p>
|
||||
</div>
|
||||
|
||||
<div class="col-12">
|
||||
<table class="table monotable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>F</th>
|
||||
<th>T</th>
|
||||
<th>ID</th>
|
||||
<th>FTN</th>
|
||||
<th>ACTIVE</th>
|
||||
<th>Messages</th>
|
||||
<th>F</th>
|
||||
<th>T</th>
|
||||
<th>ID</th>
|
||||
<th>FTN</th>
|
||||
<th>ACTIVE</th>
|
||||
<th>Messages</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@foreach ($oo as $ao)
|
||||
<tr>
|
||||
<td><input type="radio" name="src" value="{{ $ao->id }}"></td>
|
||||
<td><input type="radio" name="dst" value="{{ $ao->id }}"></td>
|
||||
<th>{{ $ao->id }} {{ $ao->system_id }}:<a href="{{ url('system/addedit',$ao->system_id) }}">{{ $ao->system->name }}</a></th>
|
||||
<th>{{ $ao->ftn }}</th>
|
||||
<td>
|
||||
@if($ao->trashed())
|
||||
<a href="{{ url('system/address/rec',[$ao->id]) }}" title="Restore Address"><i class="bi bi-bandaid"></i></a>
|
||||
<a href="{{ url('system/address/pur',[$ao->id]) }}" title="Purge Address" class="purge"><i class="bi bi-scissors"></i></a>
|
||||
@else
|
||||
<a href="{{ url('system/address/sus',[$ao->id]) }}" title="@if($ao->active)Pause @else Activate @endif Address"><i class="bi @if($ao->active)bi-pause-circle @else bi-play-circle @endif"></i></a>
|
||||
<a href="{{ url('system/address/mov',[$ao->system_id,$ao->id]) }}" title="Move Address to another System"><i class="bi bi-arrow-right-square"></i></a>
|
||||
<a href="{{ url('system/address/del',[$ao->id]) }}" title="Delete Address"><i class="bi bi-trash"></i></a>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
<ul>
|
||||
@foreach(\App\Models\Echomail::select(['id','msgid','from','msg','echoarea_id'])
|
||||
->where('fftn_id',$ao->id)
|
||||
->orderBy('created_at','DESC')
|
||||
->with('echoarea')
|
||||
->limit(5)
|
||||
->get() as $eo)
|
||||
<li class="pb-4">{{ sprintf('%s-%04d: %s (%s) %s',$eo->echoarea->name,$eo->id,$eo->from,$eo->msgid,$eo->msg) }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input type="radio" name="src" value="{{ $ao->id }}"></td>
|
||||
<td><input type="radio" name="dst" value="{{ $ao->id }}"></td>
|
||||
<th>{{ $ao->id }} {{ $ao->system_id }}:<a href="{{ url('system/addedit',$ao->system_id) }}">{{ $ao->system->name }}</a></th>
|
||||
<th>{{ $ao->ftn }}</th>
|
||||
<td>
|
||||
@if($ao->trashed())
|
||||
<a href="{{ url('system/address/rec',[$ao->id]) }}" title="Restore Address"><i class="bi bi-bandaid"></i></a>
|
||||
<a href="{{ url('system/address/pur',[$ao->id]) }}" title="Purge Address" class="purge"><i class="bi bi-scissors"></i></a>
|
||||
@else
|
||||
<a href="{{ url('system/address/sus',[$ao->id]) }}" title="@if($ao->active)Pause @else Activate @endif Address"><i class="bi @if($ao->active)bi-pause-circle @else bi-play-circle @endif"></i></a>
|
||||
<a href="{{ url('system/address/mov',[$ao->system_id,$ao->id]) }}" title="Move Address to another System"><i class="bi bi-arrow-right-square"></i></a>
|
||||
<a href="{{ url('system/address/del',[$ao->id]) }}" title="Delete Address"><i class="bi bi-trash"></i></a>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
<ul>
|
||||
@foreach(\App\Models\Echomail::select(['id','msgid','from','msg','echoarea_id'])
|
||||
->where('fftn_id',$ao->id)
|
||||
->orderBy('created_at','DESC')
|
||||
->with('echoarea')
|
||||
->limit(5)
|
||||
->get() as $eo)
|
||||
<li class="pb-4">{{ sprintf('%s-%04d: %s (%s) %s',$eo->echoarea->name,$eo->id,$eo->from,$eo->msgid,$eo->msg) }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<button type="submit" name="submit" class="btn btn-success float-end">Merge</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@include('error')
|
||||
</div>
|
||||
@endsection
|
||||
@include('widgets.error')
|
||||
@endsection
|
||||
|
@@ -11,9 +11,9 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include('widgets.success')
|
||||
@includeWhen(session()->has('success'),'widgets.success',['msg'=>session()->get('success')])
|
||||
|
||||
<form class="row g-0 needs-validation" method="post" novalidate>
|
||||
<form class="needs-validation" method="post" novalidate>
|
||||
@csrf
|
||||
|
||||
<div class="row pt-0">
|
||||
|
@@ -1,14 +0,0 @@
|
||||
<form class="row g-0 needs-validation" method="post" novalidate>
|
||||
@csrf
|
||||
<input type="hidden" name="system_id" value="{{ $o->id }}">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="greyframe titledbox shadow0xb0">
|
||||
<h2 class="cap">@can('update',$o) @if($o->exists) Update @else Add @endif @endif System</h2>
|
||||
|
||||
@include('system.widget.form-system')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
@@ -6,7 +6,7 @@
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<h2>BBS Systems</h2>
|
||||
<h2>About BBS Systems</h2>
|
||||
<p>BBS Systems Send and Receive Echomail and Files.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -4,7 +4,7 @@
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="row pt-0">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<h2>List of Connectable Systems</h2>
|
||||
|
||||
|
@@ -5,21 +5,19 @@ Move Address
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<h1>{{ $o->system->name }} - {{ $o->ftn }}@if($o->system->setup)<sup class="success" style="text-shadow: 0 0; font-size: 50%; top: -1em;">*</sup>@endif</h1>
|
||||
@if($o->system->setup)<sup class="success" style="float:right;top:-2em;">* This Host</sup>@endif
|
||||
</div>
|
||||
</div>
|
||||
<form class="needs-validation" method="post" novalidate>
|
||||
@csrf
|
||||
|
||||
<div class="row pt-0">
|
||||
<div class="col-12">
|
||||
<!-- @todo The list of presented system should only be those that the user can see -->
|
||||
<div class="greyframe titledbox shadow0xb0">
|
||||
<h2 class="cap">Move Address</h2>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<h1>
|
||||
{{ $o->system->name }} - {{ $o->ftn }}@if($o->system->setup)<sup class="success">*</sup>@endif
|
||||
@if($o->system->setup)<small class="success float-end">* This Host</small>@endif
|
||||
</h1>
|
||||
|
||||
<form class="row g-0 needs-validation" method="post" novalidate>
|
||||
@csrf
|
||||
<!-- @todo The list of presented system should only be those that the user can see -->
|
||||
<div class="greyframe titledbox shadow0xb0">
|
||||
<h2 class="cap">Move Address</h2>
|
||||
|
||||
<div class="row">
|
||||
<!-- Choose System -->
|
||||
@@ -105,10 +103,10 @@ Move Address
|
||||
</div>
|
||||
@endcan
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@endsection
|
||||
|
||||
@section('page-css')
|
||||
|
@@ -1,199 +1,196 @@
|
||||
<form class="row g-0 needs-validation" method="post" action="{{ url('system/address/add',$o->id) }}" novalidate>
|
||||
<input type="hidden" id="action" name="action" value="">
|
||||
<form class="needs-validation" method="post" action="{{ url('system/address/add',$o->id) }}" novalidate>
|
||||
@csrf
|
||||
<input type="hidden" id="action" name="action" value="">
|
||||
|
||||
<div class="row pt-0">
|
||||
<div class="col-12">
|
||||
<div class="greyframe titledbox shadow0xb0">
|
||||
<h2 class="cap">Assign New/Update Existing Address</h2>
|
||||
<div class="greyframe titledbox shadow0xb0">
|
||||
<h2 class="cap">Assign New/Update Existing Address</h2>
|
||||
|
||||
<div class="row">
|
||||
<!-- Select Zone -->
|
||||
<div class="col-3">
|
||||
<label for="zone_id" class="form-label">Zone</label>
|
||||
<div class="input-group has-validation">
|
||||
<span class="input-group-text"><i class="bi bi-hash"></i></span>
|
||||
<select class="form-select @error('zone_id') is-invalid @enderror" id="zone_id" name="zone_id" required>
|
||||
<option></option>
|
||||
@foreach(\App\Models\Zone::active()->domainZoneOrder()->with(['domain'])->get() as $zo)
|
||||
<option value="{{ $zo->id }}">{{ $zo->zone_id }} <small>({{ $zo->domain->name }})</small></option>
|
||||
@endforeach
|
||||
</select>
|
||||
<span class="invalid-feedback" role="alert">
|
||||
@error('zone_id')
|
||||
{{ $message }}
|
||||
@else
|
||||
Please select the Zone for the node's address.
|
||||
@enderror
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Select Region -->
|
||||
<div class="col-3 d-none" id="region-select">
|
||||
<label for="region_id" class="form-label">Region</label>
|
||||
<div class="input-group has-validation">
|
||||
<span class="input-group-text"><i class="bi bi-geo"></i></span>
|
||||
<select class="form-select @error('region_id') is-invalid @enderror" id="region_id" name="region_id" required>
|
||||
</select>
|
||||
<span class="invalid-feedback" role="alert">
|
||||
@error('region_id')
|
||||
{{ $message }}
|
||||
@else
|
||||
Please make a choice.
|
||||
@enderror
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Select Host -->
|
||||
<div class="col-3 d-none" id="host-select">
|
||||
<label for="host_id" class="form-label">Host</label>
|
||||
<div class="input-group has-validation">
|
||||
<span class="input-group-text"><i class="bi bi-diagram-3-fill"></i></span>
|
||||
<select class="form-select @error('host_id') is-invalid @enderror" id="host_id" name="host_id">
|
||||
</select>
|
||||
<span class="invalid-feedback" role="alert">
|
||||
@error('host_id')
|
||||
{{ $message }}
|
||||
@enderror
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Select Hub -->
|
||||
<div class="col-3 d-none" id="hub-select">
|
||||
<label for="hub_id" class="form-label">Hub</label>
|
||||
<div class="input-group has-validation">
|
||||
<span class="input-group-text"><i class="bi bi-diagram-2-fill"></i></span>
|
||||
<select class="form-select @error('hub_id') is-invalid @enderror" id="hub_id" name="hub_id">
|
||||
</select>
|
||||
<span class="invalid-feedback" role="alert">
|
||||
@error('hub_id')
|
||||
{{ $message }}
|
||||
@enderror
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<!-- Node/Point address -->
|
||||
<div class="col-3 d-none" id="node-address">
|
||||
<label for="node_id" class="form-label">Node/Point Address</label>
|
||||
<div class="input-group has-validation">
|
||||
<span class="input-group-text"><i class="bi bi-hash"></i></span>
|
||||
<input type="text" style="width: 35%;" class="form-control text-end @error('node_id') is-invalid @enderror" id="node_id" placeholder="Node" name="node_id" value="{{ old('node_id',$o->node_id) }}" @cannot('admin',$o)disabled @endcannot>
|
||||
<span class="input-group-text p-0">.</span>
|
||||
<input type="text" class="form-control @error('point_id') is-invalid @enderror" id="point_id" placeholder="0" name="point_id" value="{{ old('point_id',$o->point_id) ?: 0 }}" @cannot('admin',$o)disabled @endcannot style="padding-left: 0;">
|
||||
<span class="invalid-feedback" role="alert">
|
||||
@error('node_id')
|
||||
{{ $message }}
|
||||
@enderror
|
||||
@error('point_id')
|
||||
{{ $message }}
|
||||
@enderror
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Region Address -->
|
||||
<div class="col-3 ps-0 d-none" id="region-address">
|
||||
<label for="region_id_new" class="form-label">Region Address</label>
|
||||
<div class="input-group has-validation">
|
||||
<span class="input-group-text"><i class="bi bi-hash"></i></span>
|
||||
<input type="text" style="width: 35%;" class="form-control @error('region_id_new') is-invalid @enderror" id="region_id_new" placeholder="Region #" name="region_id_new" value="{{ old('region_id_new') }}" @cannot('admin',$o)disabled @endcannot>
|
||||
<span class="input-group-text">/0.0</span>
|
||||
<span class="invalid-feedback" role="alert">
|
||||
@error('region_id_new')
|
||||
{{ $message }}
|
||||
@else
|
||||
The region number is required.
|
||||
@enderror
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Host Address -->
|
||||
<div class="col-3 ps-0 d-none" id="host-address">
|
||||
<label for="host_id_new" class="form-label">Host Address</label>
|
||||
<div class="input-group has-validation">
|
||||
<span class="input-group-text"><i class="bi bi-hash"></i></span>
|
||||
<input type="text" class="form-control text-end @error('host_id_new') is-invalid @enderror" id="host_id_new" placeholder="Host #" name="host_id_new" value="{{ old('host_id_new') }}" @cannot('admin',$o)disabled @endcannot>
|
||||
<span class="input-group-text p-0">/</span>
|
||||
<input type="text" class="form-control @error('node_id_new') is-invalid @enderror" id="node_id_new" placeholder="Node #" name="node_id_new" value="{{ old('node_id_new') }}" @cannot('admin',$o)disabled @endcannot>
|
||||
<span class="input-group-text">.0</span>
|
||||
<span class="invalid-feedback" role="alert">
|
||||
@error('host_id_new')
|
||||
{{ $message }}
|
||||
@else
|
||||
The host address is required.
|
||||
@enderror
|
||||
@error('node_id_new')
|
||||
{{ $message }}
|
||||
@else
|
||||
The node address is required.
|
||||
@enderror
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Hub Checkbox -->
|
||||
<div class="col-2 d-none" id="hub-checkbox">
|
||||
<label for="hub" class="form-label">Hub</label>
|
||||
<div class="input-group">
|
||||
<div class="btn-group" role="group">
|
||||
<input type="radio" class="btn-check" name="hub" id="hub_yes" value="1" required @cannot('admin',$o)disabled @endcannot @if(old('hub',$o->hub))checked @endif>
|
||||
<label class="btn btn-outline-success" for="hub_yes">Yes</label>
|
||||
|
||||
<input type="radio" class="btn-check btn-danger" name="hub" id="hub_no" value="0" required @cannot('admin',$o)disabled @endcannot @if(! old('hub',$o->hub))checked @endif>
|
||||
<label class="btn btn-outline-danger" for="hub_no">No</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Security -->
|
||||
<div class="col-2 d-none" id="sec-level">
|
||||
<label for="security" class="form-label">Security Level</label>
|
||||
<div class="input-group has-validation">
|
||||
<span class="input-group-text"><i class="bi bi-file-lock"></i></span>
|
||||
<input type="text" class="form-control text-end @error('security') is-invalid @enderror" id="security" placeholder="#" name="security" value="{{ old('security') }}" @cannot('admin',$o)disabled @endcannot>
|
||||
<span class="invalid-feedback" role="alert">
|
||||
@error('security')
|
||||
{{ $message }}
|
||||
@enderror
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-2">
|
||||
<a href="{{ url('system') }}" class="btn btn-danger">Cancel</a>
|
||||
</div>
|
||||
|
||||
<span class="col-6 mt-auto mx-auto text-center align-bottom">
|
||||
@if($errors->count())
|
||||
<span class="btn btn-sm btn-danger" role="alert">
|
||||
There were errors with the submission.
|
||||
<ul>
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</span>
|
||||
@endif
|
||||
<div class="row">
|
||||
<!-- Select Zone -->
|
||||
<div class="col-3">
|
||||
<label for="zone_id" class="form-label">Zone</label>
|
||||
<div class="input-group has-validation">
|
||||
<span class="input-group-text"><i class="bi bi-hash"></i></span>
|
||||
<select class="form-select @error('zone_id') is-invalid @enderror" id="zone_id" name="zone_id" required>
|
||||
<option></option>
|
||||
@foreach(\App\Models\Zone::active()->domainZoneOrder()->with(['domain'])->get() as $zo)
|
||||
<option value="{{ $zo->id }}">{{ $zo->zone_id }} <small>({{ $zo->domain->name }})</small></option>
|
||||
@endforeach
|
||||
</select>
|
||||
<span class="invalid-feedback" role="alert">
|
||||
@error('zone_id')
|
||||
{{ $message }}
|
||||
@else
|
||||
Please select the Zone for the node's address.
|
||||
@enderror
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@can('admin',$o)
|
||||
<div class="col-2">
|
||||
<button type="submit" id="submit" name="submit" class="btn btn-success float-end">Add/Update</button>
|
||||
</div>
|
||||
@endcan
|
||||
<!-- Select Region -->
|
||||
<div class="col-3 d-none" id="region-select">
|
||||
<label for="region_id" class="form-label">Region</label>
|
||||
<div class="input-group has-validation">
|
||||
<span class="input-group-text"><i class="bi bi-geo"></i></span>
|
||||
<select class="form-select @error('region_id') is-invalid @enderror" id="region_id" name="region_id" required>
|
||||
</select>
|
||||
<span class="invalid-feedback" role="alert">
|
||||
@error('region_id')
|
||||
{{ $message }}
|
||||
@else
|
||||
Please make a choice.
|
||||
@enderror
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Select Host -->
|
||||
<div class="col-3 d-none" id="host-select">
|
||||
<label for="host_id" class="form-label">Host</label>
|
||||
<div class="input-group has-validation">
|
||||
<span class="input-group-text"><i class="bi bi-diagram-3-fill"></i></span>
|
||||
<select class="form-select @error('host_id') is-invalid @enderror" id="host_id" name="host_id">
|
||||
</select>
|
||||
<span class="invalid-feedback" role="alert">
|
||||
@error('host_id')
|
||||
{{ $message }}
|
||||
@enderror
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Select Hub -->
|
||||
<div class="col-3 d-none" id="hub-select">
|
||||
<label for="hub_id" class="form-label">Hub</label>
|
||||
<div class="input-group has-validation">
|
||||
<span class="input-group-text"><i class="bi bi-diagram-2-fill"></i></span>
|
||||
<select class="form-select @error('hub_id') is-invalid @enderror" id="hub_id" name="hub_id">
|
||||
</select>
|
||||
<span class="invalid-feedback" role="alert">
|
||||
@error('hub_id')
|
||||
{{ $message }}
|
||||
@enderror
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<!-- Node/Point address -->
|
||||
<div class="col-3 d-none" id="node-address">
|
||||
<label for="node_id" class="form-label">Node/Point Address</label>
|
||||
<div class="input-group has-validation">
|
||||
<span class="input-group-text"><i class="bi bi-hash"></i></span>
|
||||
<input type="text" style="width: 35%;" class="form-control text-end @error('node_id') is-invalid @enderror" id="node_id" placeholder="Node" name="node_id" value="{{ old('node_id',$o->node_id) }}" @cannot('admin',$o)disabled @endcannot>
|
||||
<span class="input-group-text p-0">.</span>
|
||||
<input type="text" class="form-control @error('point_id') is-invalid @enderror" id="point_id" placeholder="0" name="point_id" value="{{ old('point_id',$o->point_id) ?: 0 }}" @cannot('admin',$o)disabled @endcannot style="padding-left: 0;">
|
||||
<span class="invalid-feedback" role="alert">
|
||||
@error('node_id')
|
||||
{{ $message }}
|
||||
@enderror
|
||||
@error('point_id')
|
||||
{{ $message }}
|
||||
@enderror
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Region Address -->
|
||||
<div class="col-3 ps-0 d-none" id="region-address">
|
||||
<label for="region_id_new" class="form-label">Region Address</label>
|
||||
<div class="input-group has-validation">
|
||||
<span class="input-group-text"><i class="bi bi-hash"></i></span>
|
||||
<input type="text" style="width: 35%;" class="form-control @error('region_id_new') is-invalid @enderror" id="region_id_new" placeholder="Region #" name="region_id_new" value="{{ old('region_id_new') }}" @cannot('admin',$o)disabled @endcannot>
|
||||
<span class="input-group-text">/0.0</span>
|
||||
<span class="invalid-feedback" role="alert">
|
||||
@error('region_id_new')
|
||||
{{ $message }}
|
||||
@else
|
||||
The region number is required.
|
||||
@enderror
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Host Address -->
|
||||
<div class="col-3 ps-0 d-none" id="host-address">
|
||||
<label for="host_id_new" class="form-label">Host Address</label>
|
||||
<div class="input-group has-validation">
|
||||
<span class="input-group-text"><i class="bi bi-hash"></i></span>
|
||||
<input type="text" class="form-control text-end @error('host_id_new') is-invalid @enderror" id="host_id_new" placeholder="Host #" name="host_id_new" value="{{ old('host_id_new') }}" @cannot('admin',$o)disabled @endcannot>
|
||||
<span class="input-group-text p-0">/</span>
|
||||
<input type="text" class="form-control @error('node_id_new') is-invalid @enderror" id="node_id_new" placeholder="Node #" name="node_id_new" value="{{ old('node_id_new') }}" @cannot('admin',$o)disabled @endcannot>
|
||||
<span class="input-group-text">.0</span>
|
||||
<span class="invalid-feedback" role="alert">
|
||||
@error('host_id_new')
|
||||
{{ $message }}
|
||||
@else
|
||||
The host address is required.
|
||||
@enderror
|
||||
@error('node_id_new')
|
||||
{{ $message }}
|
||||
@else
|
||||
The node address is required.
|
||||
@enderror
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Hub Checkbox -->
|
||||
<div class="col-2 d-none" id="hub-checkbox">
|
||||
<label for="hub" class="form-label">Hub</label>
|
||||
<div class="input-group">
|
||||
<div class="btn-group" role="group">
|
||||
<input type="radio" class="btn-check" name="hub" id="hub_yes" value="1" required @cannot('admin',$o)disabled @endcannot @if(old('hub',$o->hub))checked @endif>
|
||||
<label class="btn btn-outline-success" for="hub_yes">Yes</label>
|
||||
|
||||
<input type="radio" class="btn-check btn-danger" name="hub" id="hub_no" value="0" required @cannot('admin',$o)disabled @endcannot @if(! old('hub',$o->hub))checked @endif>
|
||||
<label class="btn btn-outline-danger" for="hub_no">No</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Security -->
|
||||
<div class="col-2 d-none" id="sec-level">
|
||||
<label for="security" class="form-label">Security Level</label>
|
||||
<div class="input-group has-validation">
|
||||
<span class="input-group-text"><i class="bi bi-file-lock"></i></span>
|
||||
<input type="text" class="form-control text-end @error('security') is-invalid @enderror" id="security" placeholder="#" name="security" value="{{ old('security') }}" @cannot('admin',$o)disabled @endcannot>
|
||||
<span class="invalid-feedback" role="alert">
|
||||
@error('security')
|
||||
{{ $message }}
|
||||
@enderror
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-2">
|
||||
<a href="{{ url('system') }}" class="btn btn-danger">Cancel</a>
|
||||
</div>
|
||||
|
||||
<span class="col-6 mt-auto mx-auto text-center align-bottom">
|
||||
@if($errors->count())
|
||||
<span class="btn btn-sm btn-danger" role="alert">
|
||||
There were errors with the submission.
|
||||
<ul>
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</span>
|
||||
@endif
|
||||
</span>
|
||||
|
||||
@can('admin',$o)
|
||||
<div class="col-2">
|
||||
<button type="submit" id="submit" name="submit" class="btn btn-success float-end">Add/Update</button>
|
||||
</div>
|
||||
@endcan
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
@section('page-scripts')
|
@@ -3,7 +3,7 @@
|
||||
->orderBy('zone_id')
|
||||
->get())->count())
|
||||
|
||||
<form class="row g-0 needs-validation" method="post" action="{{ url('system/echoarea',$o->id) }}" novalidate>
|
||||
<form class="needs-validation" method="post" action="{{ url('system/echoarea',$o->id) }}" novalidate>
|
||||
@csrf
|
||||
|
||||
<div class="row pt-0">
|
@@ -3,7 +3,7 @@
|
||||
->orderBy('zone_id')
|
||||
->get())->count())
|
||||
|
||||
<form class="row g-0 needs-validation" method="post" action="{{ url('system/filearea',$o->id) }}" novalidate>
|
||||
<form class="needs-validation" method="post" action="{{ url('system/filearea',$o->id) }}" novalidate>
|
||||
@csrf
|
||||
|
||||
<div class="row pt-0">
|
@@ -4,9 +4,7 @@
|
||||
->whereNotIn('id',$o->sessions->pluck('id'))
|
||||
->get())->count())
|
||||
|
||||
<hr>
|
||||
|
||||
<form class="row g-0 needs-validation" method="post" action="{{ url('system/session/add',$o->id) }}" novalidate>
|
||||
<form class="needs-validation" method="post" action="{{ url('system/session/add',$o->id) }}" novalidate>
|
||||
@csrf
|
||||
|
||||
<div class="row pt-0">
|
@@ -1,452 +1,14 @@
|
||||
<!-- $o = System::class -->
|
||||
<div class="row pt-0">
|
||||
<div class="col-12">
|
||||
<h4 class="mb-0 pb-2">System Users</h4>
|
||||
<form class="needs-validation" method="post" novalidate>
|
||||
@csrf
|
||||
<input type="hidden" name="system_id" value="{{ $o->id }}">
|
||||
|
||||
<div class="row pt-0">
|
||||
<!-- Users -->
|
||||
<div class="col-4">
|
||||
<label for="users" class="form-label">Owners</label>
|
||||
<div class="input-group has-validation">
|
||||
<span class="input-group-text"><i class="bi bi-people-fill"></i></span>
|
||||
<select style="width: 80%;" class="form-select @error('users') is-invalid @enderror" id="users" name="users[]">
|
||||
<option value=""> </option>
|
||||
@foreach (\App\Models\User::orderBy('name')->active()->get() as $uo)
|
||||
<option value="{{ $uo->id }}" @if(in_array($uo->id,old('users',$o->users->pluck('id')->toArray())))selected @endif>{{ $uo->name }} <small>({{ $uo->email }})</small></option>
|
||||
@endforeach
|
||||
</select>
|
||||
|
||||
<span class="invalid-feedback" role="alert">
|
||||
@error('users')
|
||||
{{ $message }}
|
||||
@enderror
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<h4 class="mb-0 pb-2">System Details</h4>
|
||||
|
||||
<div class="row pt-0">
|
||||
<!-- Name -->
|
||||
<div class="col-4">
|
||||
<label for="name" class="form-label">BBS Name</label>
|
||||
<div class="input-group has-validation">
|
||||
<span class="input-group-text"><i class="bi bi-pc"></i></span>
|
||||
<input type="text" class="form-control @error('name') is-invalid @enderror" id="name" placeholder="Name" name="name" value="{{ old('name',$o->name) }}" required @cannot('update',$o)readonly @endcannot autofocus>
|
||||
<span id="search-icon" style="width: 0;"><i style="border-radius: 50%;" class="spinner-border spinner-border-sm text-dark d-none"></i></span>
|
||||
<div id="system_search_results"></div>
|
||||
<span class="invalid-feedback" role="alert">
|
||||
@error('name')
|
||||
{{ $message }}
|
||||
@else
|
||||
A name is required.
|
||||
@enderror
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- ZeroTier ID -->
|
||||
<div class="col-3">
|
||||
<label for="zt_id" class="form-label">ZeroTier ID</label>
|
||||
<div class="input-group has-validation">
|
||||
<span class="input-group-text"><i class="bi bi-shield-lock-fill"></i></span>
|
||||
<input type="text" class="form-control @error('zt_id') is-invalid @enderror" id="zt_id" placeholder="ZeroTier" name="zt_id" value="{{ old('zt_id',$o->zt_id) }}" @cannot($action,$o)readonly @endcannot>
|
||||
<span class="invalid-feedback" role="alert">
|
||||
@error('zt_id')
|
||||
{{ $message }}
|
||||
@enderror
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Active -->
|
||||
<div class="offset-2 col-2">
|
||||
@can('update',$o)
|
||||
<label for="active" class="form-label">Active</label>
|
||||
<div class="input-group">
|
||||
<div class="btn-group" role="group">
|
||||
<input type="radio" class="btn-check" name="active" id="active_yes" value="1" required @if(old('active',$o->active))checked @endif>
|
||||
<label class="btn btn-outline-success" for="active_yes">Yes</label>
|
||||
|
||||
<input type="radio" class="btn-check btn-danger" name="active" id="active_no" value="0" required @if(! old('active',$o->active))checked @endif>
|
||||
<label class="btn btn-outline-danger" for="active_no">No</label>
|
||||
</div>
|
||||
</div>
|
||||
@endcan
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<!-- Sysop -->
|
||||
<div class="col-4">
|
||||
<label for="sysop" class="form-label">Sysop</label>
|
||||
<div class="input-group has-validation">
|
||||
<span class="input-group-text"><i class="bi bi-person-fill"></i></span>
|
||||
<input type="text" class="form-control @error('sysop') is-invalid @enderror" id="sysop" placeholder="Sysop" name="sysop" value="{{ old('sysop',$o->sysop) }}" required @cannot('admin',$o)readonly @endcannot autocomplete="name">
|
||||
<span class="invalid-feedback" role="alert">
|
||||
@error('sysop')
|
||||
{{ $message }}
|
||||
@else
|
||||
A Sysop's name is required.
|
||||
@enderror
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Location -->
|
||||
<div class="col-4">
|
||||
<label for="location" class="form-label">Location</label>
|
||||
<div class="input-group has-validation">
|
||||
<span class="input-group-text"><i class="bi bi-globe"></i></span>
|
||||
<input type="text" class="form-control @error('location') is-invalid @enderror" id="location" placeholder="Location" name="location" value="{{ old('location',$o->location) }}" required @cannot($action,$o)readonly @endcannot>
|
||||
<span class="invalid-feedback" role="alert">
|
||||
@error('location')
|
||||
{{ $message }}
|
||||
@else
|
||||
System location is required.
|
||||
@enderror
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Hold -->
|
||||
<div class="offset-1 col-2">
|
||||
@can('update',$o)
|
||||
<label for="hold" class="form-label">Hold Mail <i class="bi bi-info-circle" title="Dont give the node any mail regardless of poll mode"></i></label>
|
||||
<div class="input-group">
|
||||
<div class="btn-group" role="group">
|
||||
<input type="radio" class="btn-check" name="hold" id="hold_yes" value="1" required @if(old('hold',$o->hold))checked @endif>
|
||||
<label class="btn btn-outline-warning" for="hold_yes">Yes</label>
|
||||
|
||||
<input type="radio" class="btn-check btn-danger" name="hold" id="hold_no" value="0" required @if(! old('hold',$o->hold))checked @endif>
|
||||
<label class="btn btn-outline-success" for="hold_no">No</label>
|
||||
</div>
|
||||
</div>
|
||||
@endcan
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<!-- Address -->
|
||||
<div class="col-5">
|
||||
<label for="address" class="form-label">BBS Internet Hostname</label>
|
||||
<div class="input-group has-validation">
|
||||
<span class="input-group-text"><i class="bi bi-globe"></i></span>
|
||||
<input type="text" class="w-75 form-control @error('address') is-invalid @enderror" id="address" placeholder="FQDN" name="address" value="{{ old('address',$o->address) }}" @cannot($action,$o)readonly @endcannot>
|
||||
<span class="invalid-feedback" role="alert">
|
||||
@error('address')
|
||||
{{ $message }}
|
||||
@enderror
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Phone -->
|
||||
<div class="col-3">
|
||||
<label for="phone" class="form-label">Phone</label>
|
||||
<div class="input-group has-validation">
|
||||
<span class="input-group-text"><i class="bi bi-telephone-fill"></i></span>
|
||||
<input type="text" class="form-control @error('phone') is-invalid @enderror" id="phone" placeholder="Phone" name="phone" value="{{ old('phone',$o->phone) }}" @cannot($action,$o)readonly @endcannot>
|
||||
<span class="invalid-feedback" role="alert">
|
||||
@error('phone')
|
||||
{{ $message }}
|
||||
@enderror
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Poll Mode -->
|
||||
<div class="offset-1 col-3">
|
||||
@can('update',$o)
|
||||
<label for="pollmode" class="form-label">Poll Mode <i class="bi bi-info-circle" title="Poll node when mail available, poll on a schedule or hold mail for collection"></i></label>
|
||||
<div class="input-group has-validation">
|
||||
<div class="btn-group @error('pollmode') is-invalid @enderror" role="group">
|
||||
<input type="radio" class="btn-check" name="pollmode" id="poll_crash" value="2" @if((int)old('pollmode',($o->pollmode === TRUE) ? 2 : 0) === 2)checked @endif>
|
||||
<label class="btn btn-outline-success" for="poll_crash">Crash</label>
|
||||
|
||||
<input type="radio" class="btn-check btn-danger" name="pollmode" id="poll_normal" value="1" @if((int)old('pollmode',($o->pollmode === FALSE) ? 1 : 0) === 1)checked @endif>
|
||||
<label class="btn btn-outline-secondary" for="poll_normal">Normal</label>
|
||||
|
||||
<input type="radio" class="btn-check btn-danger" name="pollmode" id="poll_hold" value="0" @if((int)old('pollmode',is_null($o->pollmode) ? 0 : 1) === 0)checked @endif>
|
||||
<label class="btn btn-outline-warning" for="poll_hold">Hold</label>
|
||||
</div>
|
||||
<span class="invalid-feedback" role="alert">
|
||||
@error('pollmode')
|
||||
{{ $message }}
|
||||
@enderror
|
||||
</span>
|
||||
</div>
|
||||
@endcan
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<!-- Mailer Details -->
|
||||
<div class="col-12">
|
||||
<h4 class="pt-4 mb-0 pb-2">Mailer Details</h4>
|
||||
|
||||
<!-- Mailer Ports -->
|
||||
<div class="pt-0 row">
|
||||
<div class="col-3">
|
||||
@foreach (\App\Models\Mailer::all() as $mo)
|
||||
@php($x=$o->mailers->find($mo))
|
||||
<div class="pt-0 row">
|
||||
<div class="col-12">
|
||||
<label for="mailer_port_{{ $mo->id }}" class="form-label w-100">{{ $mo->name }} <span class="float-end text-warning">{{ $x?->pivot->last_poll }}</span></label>
|
||||
<div class="input-group has-validation">
|
||||
<span class="input-group-text"><i class="bi bi-modem-fill"></i></span>
|
||||
<input type="text" class="form-control text-end @error('mailer_details.'.$mo->id.'.port') is-invalid @enderror" id="mailer_port_{{ $mo->id }}" placeholder="Port" name="mailer_details[{{ $mo->id }}][port]" value="{{ old('mailer_details.'.$mo->id.'.port',$x?->pivot->port) }}" @cannot($action,$o)readonly @endcannot>
|
||||
<div class="input-group-text">
|
||||
<input type="checkbox" class="form-control-input" name="mailer_details[{{ $mo->id }}][active]" value="1" title="Active" @if(old('mailer_details.'.$mo->id.'.active',$x?->pivot->active))checked @endif>
|
||||
</div>
|
||||
<span class="invalid-feedback" role="alert">
|
||||
@error('mailer_details.'.$mo->id.'.port')
|
||||
{{ $message }}
|
||||
@enderror
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
|
||||
<!-- Mail Packet -->
|
||||
<div class="col-2">
|
||||
<label for="pkt_type" class="form-label">Mail Packet</label>
|
||||
<div class="input-group">
|
||||
<span class="input-group-text"><i class="bi bi-ui-radios"></i></span>
|
||||
<select class="form-select @error('pkt_type') is-invalid @enderror" id="pkt_type" name="pkt_type" @cannot($action,$o)readonly @endcannot>
|
||||
@foreach (\App\Classes\FTN\Packet::PACKET_TYPES as $type => $class)
|
||||
<option value="{{ $type }}" @if(old('pkt_type',$o->pkt_type ?: config('fido.packet_default')) === $type)selected @endif>{{ $type }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
<span class="invalid-feedback" role="alert">
|
||||
@error('pkt_type')
|
||||
{{ $message }}
|
||||
@enderror
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="offset-3 col-4 @if((old('pollmode') === "0") || is_null($o->pollmode))d-none @endif" id="heartbeat_option">
|
||||
@can('admin',$o)
|
||||
<div class="row p-0">
|
||||
<div class="offset-3 col-6">
|
||||
<label for="method" class="form-label">Heartbeat <i class="bi bi-info-circle" title="Attempt contact after last seen"></i></label>
|
||||
<div class="input-group has-validation">
|
||||
<span class="input-group-text"><i class="bi bi-hourglass-bottom"></i></span>
|
||||
<input type="text" class="form-control text-end @error('heartbeat') is-invalid @enderror" id="heartbeat" placeholder="Hours" name="heartbeat" value="{{ old('heartbeat',$o->heartbeat) }}">
|
||||
<span class="invalid-feedback" role="alert">
|
||||
@error('heartbeat')
|
||||
{{ $message }}
|
||||
@enderror
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endcan
|
||||
|
||||
@if (! is_null($o->pollmode))
|
||||
<div class="row">
|
||||
<div class="offset-3 col-9 bg-secondary rounded p-2 small">
|
||||
@if($job = $o->poll())
|
||||
<div class="row p-0">
|
||||
<div class="col-4 text-dark">
|
||||
@if($job->attempts)Last: @else Scheduled: @endif
|
||||
</div>
|
||||
<div class="col-8">
|
||||
<strong class="highlight">{{ $job->created_at }}</strong>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-4 text-dark">
|
||||
Attempts:
|
||||
</div>
|
||||
<div class="col-8">
|
||||
<strong class="highlight">{{ $job->attempts ?: 0 }}</strong>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if ($job->attempts)
|
||||
<div class="row">
|
||||
<div class="col-4 text-dark">
|
||||
Next:
|
||||
</div>
|
||||
<div class="col-8">
|
||||
<strong class="highlight">{{ $job->available_at->diffForHumans(now(),$job->available_at->isFuture() ? \Carbon\CarbonInterface::DIFF_ABSOLUTE : \Carbon\CarbonInterface::DIFF_RELATIVE_TO_NOW) }}</strong>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@else
|
||||
<div class="row p-0">
|
||||
<div class="col-4 text-dark">
|
||||
Last Poll:
|
||||
</div>
|
||||
<div class="col-8">
|
||||
<strong class="highlight">{{ ($x=$o->logs->where('originate',TRUE)->last())?->created_at ?: 'Never' }}</strong>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-4 text-dark">
|
||||
Method:
|
||||
</div>
|
||||
<div class="col-8">
|
||||
<strong class="highlight">{{ $x ? $x->mailer->name : '-' }}</strong>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if ($o->heartbeat)
|
||||
<div class="row">
|
||||
<div class="col-4 text-dark">
|
||||
Next Heartbeat:
|
||||
</div>
|
||||
<div class="col-8">
|
||||
<strong class="highlight">{{ $x ? $x->created_at->addHours($o->heartbeat) : Carbon::now() }}</strong>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
@endif
|
||||
|
||||
<div class="row">
|
||||
<div class="col-4 text-dark">
|
||||
Status:
|
||||
</div>
|
||||
<div class="col-8">
|
||||
<strong class="highlight">
|
||||
@if ($job) Queued
|
||||
@elseif ($o->autohold)Auto Hold
|
||||
@else
|
||||
@switch($o->pollmode)
|
||||
@case(TRUE) Crash @break;
|
||||
@case(FALSE) Normal @break;
|
||||
@default Hold
|
||||
@endswitch
|
||||
@endif
|
||||
</strong>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{{--
|
||||
<div class="col-12">
|
||||
<table class="table monotable m-0 p-0 small noborder">
|
||||
<tbody xstyle="border-style:dotted;">
|
||||
|
||||
<tr>
|
||||
<td class="cap text-end">Status :</td>
|
||||
<td>
|
||||
@if ($job) Queued
|
||||
@elseif ($o->autohold)Auto Hold
|
||||
@else
|
||||
@switch($o->pollmode)
|
||||
@case(TRUE) Crash @break;
|
||||
@case(FALSE) Normal @break;
|
||||
@default Hold
|
||||
@endswitch
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
--}}
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<!-- BBS Details -->
|
||||
<div class="col-12">
|
||||
<h4 class="pt-4 mb-0 pb-2">BBS Details</h4>
|
||||
|
||||
<div class="pt-0 row">
|
||||
<div class="col-2">
|
||||
<label for="method" class="form-label">Connection Method</label>
|
||||
<div class="input-group">
|
||||
<span class="input-group-text"><i class="bi bi-wifi"></i></span>
|
||||
<select class="form-select @error('method') is-invalid @enderror" id="method" name="method" @cannot($action,$o)readonly @endcannot>
|
||||
<option></option>
|
||||
<option value="23" @if(old('method',$o->method) == 23)selected @endif>Telnet</option>
|
||||
<option value="22" @if(old('method',$o->method) == 22)selected @endif>SSH</option>
|
||||
<option value="519" @if(old('method',$o->method) == 519)selected @endif>Rlogin</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<label for="method" class="form-label">Port</label>
|
||||
<div class="input-group">
|
||||
<span class="input-group-text"><i class="bi bi-wifi"></i></span>
|
||||
<input type="text" class="form-control text-end @error('port') is-invalid @enderror" id="port" placeholder="Port" name="port" value="{{ old('port',$o->port) }}" @cannot($action,$o)readonly @endcannot>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@can('admin',$o)
|
||||
<div class="row">
|
||||
<!-- Notes -->
|
||||
<div class="row pt-0">
|
||||
<div class="col-12">
|
||||
<label for="notes" class="form-label">Notes</label>
|
||||
<textarea class="form-control" rows=3 name="notes" placeholder="Notes...">{{ old('notes',$o->notes) }}</textarea>
|
||||
<div class="greyframe titledbox shadow0xb0">
|
||||
<h2 class="cap">@can('update',$o) @if($o->exists) Update @else Add @endif @endif System</h2>
|
||||
|
||||
@include('system.widget.system')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endcan
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
@if($o->exists)
|
||||
@can($action,$o)
|
||||
<a href="{{ url('system') }}" class="btn btn-danger">Cancel</a>
|
||||
<button type="submit" name="submit" class="btn btn-success float-end">@if ($o->exists)Save @else Add @endif</button>
|
||||
@else
|
||||
<input type="hidden" name="system_id" value="{{ $o->id }}">
|
||||
<span><small><strong>NOTE:</strong> You'll be able to update these details after registration is completed.</small></span>
|
||||
<button type="submit" class="btn btn-success float-end" name="submit" value="register">Register</button>
|
||||
@endcan
|
||||
@else
|
||||
<button type="submit" class="btn btn-success float-end" name="submit" value="create">Register</button>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@section('page-css')
|
||||
@css('select2')
|
||||
@append
|
||||
@section('page-scripts')
|
||||
@js('select2')
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$('#users').select2({
|
||||
@cannot('admin')disabled: true @endcannot
|
||||
/*multiple: true*/
|
||||
});
|
||||
|
||||
$('#poll_normal').on('click',function() {
|
||||
$('#heartbeat_option').removeClass('d-none');
|
||||
})
|
||||
$('#poll_crash').on('click',function() {
|
||||
$('#heartbeat_option').removeClass('d-none');
|
||||
})
|
||||
$('#poll_hold').on('click',function() {
|
||||
$('#heartbeat_option').addClass('d-none');
|
||||
console.log('hold');
|
||||
})
|
||||
})
|
||||
</script>
|
||||
@append
|
||||
</form>
|
452
resources/views/system/widget/system.blade.php
Normal file
452
resources/views/system/widget/system.blade.php
Normal file
@@ -0,0 +1,452 @@
|
||||
<!-- $o = System::class -->
|
||||
<div class="row pt-0">
|
||||
<div class="col-12">
|
||||
<h4 class="mb-0 pb-2">System Users</h4>
|
||||
|
||||
<div class="row pt-0">
|
||||
<!-- Users -->
|
||||
<div class="col-4">
|
||||
<label for="users" class="form-label">Owners</label>
|
||||
<div class="input-group has-validation">
|
||||
<span class="input-group-text"><i class="bi bi-people-fill"></i></span>
|
||||
<select style="width: 80%;" class="form-select @error('users') is-invalid @enderror" id="users" name="users[]">
|
||||
<option value=""> </option>
|
||||
@foreach (\App\Models\User::orderBy('name')->active()->get() as $uo)
|
||||
<option value="{{ $uo->id }}" @if(in_array($uo->id,old('users',$o->users->pluck('id')->toArray())))selected @endif>{{ $uo->name }} <small>({{ $uo->email }})</small></option>
|
||||
@endforeach
|
||||
</select>
|
||||
|
||||
<span class="invalid-feedback" role="alert">
|
||||
@error('users')
|
||||
{{ $message }}
|
||||
@enderror
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row pt-4">
|
||||
<div class="col-12">
|
||||
<h4 class="mb-0 pb-2">System Details</h4>
|
||||
|
||||
<div class="row pt-0">
|
||||
<!-- Name -->
|
||||
<div class="col-4">
|
||||
<label for="name" class="form-label">BBS Name</label>
|
||||
<div class="input-group has-validation">
|
||||
<span class="input-group-text"><i class="bi bi-pc"></i></span>
|
||||
<input type="text" class="form-control @error('name') is-invalid @enderror" id="name" placeholder="Name" name="name" value="{{ old('name',$o->name) }}" required @cannot('update',$o)readonly @endcannot autofocus>
|
||||
<span id="search-icon" style="width: 0;"><i style="border-radius: 50%;" class="spinner-border spinner-border-sm text-dark d-none"></i></span>
|
||||
<div id="system_search_results"></div>
|
||||
<span class="invalid-feedback" role="alert">
|
||||
@error('name')
|
||||
{{ $message }}
|
||||
@else
|
||||
A name is required.
|
||||
@enderror
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- ZeroTier ID -->
|
||||
<div class="col-3">
|
||||
<label for="zt_id" class="form-label">ZeroTier ID</label>
|
||||
<div class="input-group has-validation">
|
||||
<span class="input-group-text"><i class="bi bi-shield-lock-fill"></i></span>
|
||||
<input type="text" class="form-control @error('zt_id') is-invalid @enderror" id="zt_id" placeholder="ZeroTier" name="zt_id" value="{{ old('zt_id',$o->zt_id) }}" @cannot($action,$o)readonly @endcannot>
|
||||
<span class="invalid-feedback" role="alert">
|
||||
@error('zt_id')
|
||||
{{ $message }}
|
||||
@enderror
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Active -->
|
||||
<div class="offset-2 col-2">
|
||||
@can('update',$o)
|
||||
<label for="active" class="form-label">Active</label>
|
||||
<div class="input-group">
|
||||
<div class="btn-group" role="group">
|
||||
<input type="radio" class="btn-check" name="active" id="active_yes" value="1" required @if(old('active',$o->active))checked @endif>
|
||||
<label class="btn btn-outline-success" for="active_yes">Yes</label>
|
||||
|
||||
<input type="radio" class="btn-check btn-danger" name="active" id="active_no" value="0" required @if(! old('active',$o->active))checked @endif>
|
||||
<label class="btn btn-outline-danger" for="active_no">No</label>
|
||||
</div>
|
||||
</div>
|
||||
@endcan
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<!-- Sysop -->
|
||||
<div class="col-4">
|
||||
<label for="sysop" class="form-label">Sysop</label>
|
||||
<div class="input-group has-validation">
|
||||
<span class="input-group-text"><i class="bi bi-person-fill"></i></span>
|
||||
<input type="text" class="form-control @error('sysop') is-invalid @enderror" id="sysop" placeholder="Sysop" name="sysop" value="{{ old('sysop',$o->sysop) }}" required @cannot('admin',$o)readonly @endcannot autocomplete="name">
|
||||
<span class="invalid-feedback" role="alert">
|
||||
@error('sysop')
|
||||
{{ $message }}
|
||||
@else
|
||||
A Sysop's name is required.
|
||||
@enderror
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Location -->
|
||||
<div class="col-4">
|
||||
<label for="location" class="form-label">Location</label>
|
||||
<div class="input-group has-validation">
|
||||
<span class="input-group-text"><i class="bi bi-globe"></i></span>
|
||||
<input type="text" class="form-control @error('location') is-invalid @enderror" id="location" placeholder="Location" name="location" value="{{ old('location',$o->location) }}" required @cannot($action,$o)readonly @endcannot>
|
||||
<span class="invalid-feedback" role="alert">
|
||||
@error('location')
|
||||
{{ $message }}
|
||||
@else
|
||||
System location is required.
|
||||
@enderror
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Hold -->
|
||||
<div class="offset-1 col-2">
|
||||
@can('update',$o)
|
||||
<label for="hold" class="form-label">Hold Mail <i class="bi bi-info-circle" title="Dont give the node any mail regardless of poll mode"></i></label>
|
||||
<div class="input-group">
|
||||
<div class="btn-group" role="group">
|
||||
<input type="radio" class="btn-check" name="hold" id="hold_yes" value="1" required @if(old('hold',$o->hold))checked @endif>
|
||||
<label class="btn btn-outline-warning" for="hold_yes">Yes</label>
|
||||
|
||||
<input type="radio" class="btn-check btn-danger" name="hold" id="hold_no" value="0" required @if(! old('hold',$o->hold))checked @endif>
|
||||
<label class="btn btn-outline-success" for="hold_no">No</label>
|
||||
</div>
|
||||
</div>
|
||||
@endcan
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<!-- Address -->
|
||||
<div class="col-5">
|
||||
<label for="address" class="form-label">BBS Internet Hostname</label>
|
||||
<div class="input-group has-validation">
|
||||
<span class="input-group-text"><i class="bi bi-globe"></i></span>
|
||||
<input type="text" class="w-75 form-control @error('address') is-invalid @enderror" id="address" placeholder="FQDN" name="address" value="{{ old('address',$o->address) }}" @cannot($action,$o)readonly @endcannot>
|
||||
<span class="invalid-feedback" role="alert">
|
||||
@error('address')
|
||||
{{ $message }}
|
||||
@enderror
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Phone -->
|
||||
<div class="col-3">
|
||||
<label for="phone" class="form-label">Phone</label>
|
||||
<div class="input-group has-validation">
|
||||
<span class="input-group-text"><i class="bi bi-telephone-fill"></i></span>
|
||||
<input type="text" class="form-control @error('phone') is-invalid @enderror" id="phone" placeholder="Phone" name="phone" value="{{ old('phone',$o->phone) }}" @cannot($action,$o)readonly @endcannot>
|
||||
<span class="invalid-feedback" role="alert">
|
||||
@error('phone')
|
||||
{{ $message }}
|
||||
@enderror
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Poll Mode -->
|
||||
<div class="offset-1 col-3">
|
||||
@can('update',$o)
|
||||
<label for="pollmode" class="form-label">Poll Mode <i class="bi bi-info-circle" title="Poll node when mail available, poll on a schedule or hold mail for collection"></i></label>
|
||||
<div class="input-group has-validation">
|
||||
<div class="btn-group @error('pollmode') is-invalid @enderror" role="group">
|
||||
<input type="radio" class="btn-check" name="pollmode" id="poll_crash" value="2" @if((int)old('pollmode',($o->pollmode === TRUE) ? 2 : 0) === 2)checked @endif>
|
||||
<label class="btn btn-outline-success" for="poll_crash">Crash</label>
|
||||
|
||||
<input type="radio" class="btn-check btn-danger" name="pollmode" id="poll_normal" value="1" @if((int)old('pollmode',($o->pollmode === FALSE) ? 1 : 0) === 1)checked @endif>
|
||||
<label class="btn btn-outline-secondary" for="poll_normal">Normal</label>
|
||||
|
||||
<input type="radio" class="btn-check btn-danger" name="pollmode" id="poll_hold" value="0" @if((int)old('pollmode',is_null($o->pollmode) ? 0 : 1) === 0)checked @endif>
|
||||
<label class="btn btn-outline-warning" for="poll_hold">Hold</label>
|
||||
</div>
|
||||
<span class="invalid-feedback" role="alert">
|
||||
@error('pollmode')
|
||||
{{ $message }}
|
||||
@enderror
|
||||
</span>
|
||||
</div>
|
||||
@endcan
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row pt-4">
|
||||
<!-- Mailer Details -->
|
||||
<div class="col-12">
|
||||
<h4 class="mb-0 pb-2">Mailer Details</h4>
|
||||
|
||||
<!-- Mailer Ports -->
|
||||
<div class="row pt-0">
|
||||
<div class="col-3">
|
||||
@foreach (\App\Models\Mailer::all() as $mo)
|
||||
@php($x=$o->mailers->find($mo))
|
||||
<div class="row pt-0">
|
||||
<div class="col-12">
|
||||
<label for="mailer_port_{{ $mo->id }}" class="form-label w-100">{{ $mo->name }} <span class="float-end text-warning">{{ $x?->pivot->last_poll }}</span></label>
|
||||
<div class="input-group has-validation">
|
||||
<span class="input-group-text"><i class="bi bi-modem-fill"></i></span>
|
||||
<input type="text" class="form-control text-end @error('mailer_details.'.$mo->id.'.port') is-invalid @enderror" id="mailer_port_{{ $mo->id }}" placeholder="Port" name="mailer_details[{{ $mo->id }}][port]" value="{{ old('mailer_details.'.$mo->id.'.port',$x?->pivot->port) }}" @cannot($action,$o)readonly @endcannot>
|
||||
<div class="input-group-text">
|
||||
<input type="checkbox" class="form-control-input" name="mailer_details[{{ $mo->id }}][active]" value="1" title="Active" @if(old('mailer_details.'.$mo->id.'.active',$x?->pivot->active))checked @endif>
|
||||
</div>
|
||||
<span class="invalid-feedback" role="alert">
|
||||
@error('mailer_details.'.$mo->id.'.port')
|
||||
{{ $message }}
|
||||
@enderror
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
|
||||
<!-- Mail Packet -->
|
||||
<div class="col-2">
|
||||
<label for="pkt_type" class="form-label">Mail Packet</label>
|
||||
<div class="input-group">
|
||||
<span class="input-group-text"><i class="bi bi-ui-radios"></i></span>
|
||||
<select class="form-select @error('pkt_type') is-invalid @enderror" id="pkt_type" name="pkt_type" @cannot($action,$o)readonly @endcannot>
|
||||
@foreach (\App\Classes\FTN\Packet::PACKET_TYPES as $type => $class)
|
||||
<option value="{{ $type }}" @if(old('pkt_type',$o->pkt_type ?: config('fido.packet_default')) === $type)selected @endif>{{ $type }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
<span class="invalid-feedback" role="alert">
|
||||
@error('pkt_type')
|
||||
{{ $message }}
|
||||
@enderror
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="offset-3 col-4 @if((old('pollmode') === "0") || is_null($o->pollmode))d-none @endif" id="heartbeat_option">
|
||||
@can('admin',$o)
|
||||
<div class="row p-0">
|
||||
<div class="offset-3 col-6">
|
||||
<label for="method" class="form-label">Heartbeat <i class="bi bi-info-circle" title="Attempt contact after last seen"></i></label>
|
||||
<div class="input-group has-validation">
|
||||
<span class="input-group-text"><i class="bi bi-hourglass-bottom"></i></span>
|
||||
<input type="text" class="form-control text-end @error('heartbeat') is-invalid @enderror" id="heartbeat" placeholder="Hours" name="heartbeat" value="{{ old('heartbeat',$o->heartbeat) }}">
|
||||
<span class="invalid-feedback" role="alert">
|
||||
@error('heartbeat')
|
||||
{{ $message }}
|
||||
@enderror
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endcan
|
||||
|
||||
@if (! is_null($o->pollmode))
|
||||
<div class="row">
|
||||
<div class="offset-3 col-9 bg-secondary rounded p-2 small">
|
||||
@if($job = $o->poll())
|
||||
<div class="row p-0">
|
||||
<div class="col-4 text-dark">
|
||||
@if($job->attempts)Last: @else Scheduled: @endif
|
||||
</div>
|
||||
<div class="col-8">
|
||||
<strong class="highlight">{{ $job->created_at }}</strong>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-4 text-dark">
|
||||
Attempts:
|
||||
</div>
|
||||
<div class="col-8">
|
||||
<strong class="highlight">{{ $job->attempts ?: 0 }}</strong>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if ($job->attempts)
|
||||
<div class="row">
|
||||
<div class="col-4 text-dark">
|
||||
Next:
|
||||
</div>
|
||||
<div class="col-8">
|
||||
<strong class="highlight">{{ $job->available_at->diffForHumans(now(),$job->available_at->isFuture() ? \Carbon\CarbonInterface::DIFF_ABSOLUTE : \Carbon\CarbonInterface::DIFF_RELATIVE_TO_NOW) }}</strong>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@else
|
||||
<div class="row p-0">
|
||||
<div class="col-4 text-dark">
|
||||
Last Poll:
|
||||
</div>
|
||||
<div class="col-8">
|
||||
<strong class="highlight">{{ ($x=$o->logs->where('originate',TRUE)->last())?->created_at ?: 'Never' }}</strong>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-4 text-dark">
|
||||
Method:
|
||||
</div>
|
||||
<div class="col-8">
|
||||
<strong class="highlight">{{ $x ? $x->mailer->name : '-' }}</strong>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if ($o->heartbeat)
|
||||
<div class="row">
|
||||
<div class="col-4 text-dark">
|
||||
Next Heartbeat:
|
||||
</div>
|
||||
<div class="col-8">
|
||||
<strong class="highlight">{{ $x ? $x->created_at->addHours($o->heartbeat) : Carbon::now() }}</strong>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
@endif
|
||||
|
||||
<div class="row">
|
||||
<div class="col-4 text-dark">
|
||||
Status:
|
||||
</div>
|
||||
<div class="col-8">
|
||||
<strong class="highlight">
|
||||
@if ($job) Queued
|
||||
@elseif ($o->autohold)Auto Hold
|
||||
@else
|
||||
@switch($o->pollmode)
|
||||
@case(TRUE) Crash @break;
|
||||
@case(FALSE) Normal @break;
|
||||
@default Hold
|
||||
@endswitch
|
||||
@endif
|
||||
</strong>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{{--
|
||||
<div class="col-12">
|
||||
<table class="table monotable m-0 p-0 small noborder">
|
||||
<tbody xstyle="border-style:dotted;">
|
||||
|
||||
<tr>
|
||||
<td class="cap text-end">Status :</td>
|
||||
<td>
|
||||
@if ($job) Queued
|
||||
@elseif ($o->autohold)Auto Hold
|
||||
@else
|
||||
@switch($o->pollmode)
|
||||
@case(TRUE) Crash @break;
|
||||
@case(FALSE) Normal @break;
|
||||
@default Hold
|
||||
@endswitch
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
--}}
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row pt-4">
|
||||
<!-- BBS Details -->
|
||||
<div class="col-12">
|
||||
<h4 class="mb-0 pb-2">BBS Details</h4>
|
||||
|
||||
<div class="row pt-0">
|
||||
<div class="col-2">
|
||||
<label for="method" class="form-label">Connection Method</label>
|
||||
<div class="input-group">
|
||||
<span class="input-group-text"><i class="bi bi-wifi"></i></span>
|
||||
<select class="form-select @error('method') is-invalid @enderror" id="method" name="method" @cannot($action,$o)readonly @endcannot>
|
||||
<option></option>
|
||||
<option value="23" @if(old('method',$o->method) == 23)selected @endif>Telnet</option>
|
||||
<option value="22" @if(old('method',$o->method) == 22)selected @endif>SSH</option>
|
||||
<option value="519" @if(old('method',$o->method) == 519)selected @endif>Rlogin</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<label for="method" class="form-label">Port</label>
|
||||
<div class="input-group">
|
||||
<span class="input-group-text"><i class="bi bi-wifi"></i></span>
|
||||
<input type="text" class="form-control text-end @error('port') is-invalid @enderror" id="port" placeholder="Port" name="port" value="{{ old('port',$o->port) }}" @cannot($action,$o)readonly @endcannot>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@can('admin',$o)
|
||||
<div class="row">
|
||||
<!-- Notes -->
|
||||
<div class="col-12">
|
||||
<label for="notes" class="form-label">Notes</label>
|
||||
<textarea class="form-control" rows=3 name="notes" placeholder="Notes...">{{ old('notes',$o->notes) }}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
@endcan
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
@if($o->exists)
|
||||
@can($action,$o)
|
||||
<a href="{{ url('system') }}" class="btn btn-danger">Cancel</a>
|
||||
<button type="submit" name="submit" class="btn btn-success float-end">@if ($o->exists)Save @else Add @endif</button>
|
||||
@else
|
||||
<input type="hidden" name="system_id" value="{{ $o->id }}">
|
||||
<span><small><strong>NOTE:</strong> You'll be able to update these details after registration is completed.</small></span>
|
||||
<button type="submit" class="btn btn-success float-end" name="submit" value="register">Register</button>
|
||||
@endcan
|
||||
@else
|
||||
<button type="submit" class="btn btn-success float-end" name="submit" value="create">Register</button>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@section('page-css')
|
||||
@css('select2')
|
||||
@append
|
||||
@section('page-scripts')
|
||||
@js('select2')
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$('#users').select2({
|
||||
@cannot('admin')disabled: true @endcannot
|
||||
/*multiple: true*/
|
||||
});
|
||||
|
||||
$('#poll_normal').on('click',function() {
|
||||
$('#heartbeat_option').removeClass('d-none');
|
||||
})
|
||||
$('#poll_crash').on('click',function() {
|
||||
$('#heartbeat_option').removeClass('d-none');
|
||||
})
|
||||
$('#poll_hold').on('click',function() {
|
||||
$('#heartbeat_option').addClass('d-none');
|
||||
console.log('hold');
|
||||
})
|
||||
})
|
||||
</script>
|
||||
@append
|
Reference in New Issue
Block a user