2021-06-24 10:16:37 +00:00
|
|
|
@php
|
|
|
|
use App\Models\Setup;
|
|
|
|
@endphp
|
|
|
|
|
2021-06-17 14:08:30 +00:00
|
|
|
@extends('layouts.app')
|
|
|
|
@section('htmlheader_title')
|
|
|
|
Setup
|
|
|
|
@endsection
|
|
|
|
|
|
|
|
@section('content')
|
2021-06-24 10:16:37 +00:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-12">
|
|
|
|
<h2>Site Setup</h2>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="row pt-0">
|
|
|
|
<div class="col-12">
|
|
|
|
<div class="greyframe titledbox shadow0xb0">
|
|
|
|
<h2 class="cap">@if($o->exists) Update @else Initial @endif Setup</h2>
|
|
|
|
|
|
|
|
<form class="row g-0 needs-validation" method="post" novalidate>
|
|
|
|
@csrf
|
|
|
|
|
|
|
|
<div class="row">
|
2021-07-18 12:10:21 +00:00
|
|
|
<!-- System -->
|
2021-06-24 10:16:37 +00:00
|
|
|
<div class="col-4">
|
|
|
|
<label for="system_id" class="form-label">System</label>
|
|
|
|
<div class="input-group has-validation">
|
|
|
|
<span class="input-group-text"><i class="bi bi-tag-fill"></i></span>
|
|
|
|
<select style="width: 80%;" class="form-select @error('system_id') is-invalid @enderror" id="system_id" name="system_id" required @cannot('admin',$o)disabled @endcannot>
|
|
|
|
<option value=""> </option>
|
|
|
|
@foreach (\App\Models\System::active()->orderBy('name')->cursor() as $oo)
|
|
|
|
<option value="{{ $oo->id }}" @if(old('system_id',$o->system_id)==$oo->id)selected @endif>{{ $oo->name }}</option>
|
|
|
|
@endforeach
|
|
|
|
</select>
|
|
|
|
<span class="invalid-feedback" role="alert">
|
|
|
|
@error('system_id')
|
|
|
|
{{ $message }}
|
|
|
|
@else
|
|
|
|
A system is required.
|
|
|
|
@enderror
|
2021-07-01 11:56:55 +00:00
|
|
|
</span>
|
2021-07-30 14:41:42 +00:00
|
|
|
<span class="input-helper">
|
|
|
|
@if(! $o->system_id)
|
|
|
|
Add a <a href="{{ url('ftn/system/addedit') }}">NEW System</a>
|
|
|
|
@else
|
2021-08-08 07:27:22 +00:00
|
|
|
<a href="{{ url('ftn/system/addedit',[$o->system_id]) }}">Edit</a> System
|
2021-07-30 14:41:42 +00:00
|
|
|
@endif
|
|
|
|
</span>
|
2021-06-24 10:16:37 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2021-07-18 12:10:21 +00:00
|
|
|
<!-- System Addresses -->
|
2021-06-24 10:16:37 +00:00
|
|
|
<div class="col-4 ms-auto">
|
|
|
|
@if ($o->exists)
|
|
|
|
<table class="table monotable">
|
|
|
|
<thead>
|
|
|
|
<tr><th colspan="2">System Addresses</th></tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
@foreach ($o->system->addresses->groupBy('zone_id') as $zones)
|
|
|
|
<tr>
|
|
|
|
<th>{{ $zones->first()->zone->domain->name }}</th>
|
2021-08-14 01:22:45 +00:00
|
|
|
<th class="text-end">{!! $zones->pluck('ftn')->join('<br>') !!}</th>
|
2021-06-24 10:16:37 +00:00
|
|
|
</tr>
|
|
|
|
@endforeach
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
@endif
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="row">
|
2021-07-18 12:10:21 +00:00
|
|
|
<!-- Site Permissions -->
|
2021-06-24 10:16:37 +00:00
|
|
|
<div class="col-6">
|
|
|
|
<h3>Site Permissions</h3>
|
2021-07-18 12:10:21 +00:00
|
|
|
|
2021-06-24 10:16:37 +00:00
|
|
|
<div class="form-check form-switch">
|
2021-08-14 06:14:22 +00:00
|
|
|
<input class="form-check-input" type="checkbox" id="hideaka" name="options[hideaka]" value="{{ Setup::O_HIDEAKA }}" @if(old('options.hideaka',$o->optionGet(Setup::O_HIDEAKA))) checked @endif>
|
|
|
|
<label class="form-check-label" for="hideaka">Hide AKA to different Domains</label>
|
2021-06-24 10:16:37 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2021-07-18 12:10:21 +00:00
|
|
|
<!-- ZeroTier -->
|
2021-06-24 10:16:37 +00:00
|
|
|
<div class="col-6">
|
|
|
|
<h3>ZeroTier API</h3>
|
|
|
|
<!-- @todo
|
|
|
|
* Host/Port/Key
|
|
|
|
-->
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-12">
|
|
|
|
<h4>Protocol Configuration</h4>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="row">
|
2021-07-18 12:10:21 +00:00
|
|
|
<!-- Binkp Settings -->
|
2021-06-24 10:16:37 +00:00
|
|
|
<div class="col-6">
|
|
|
|
<h3>BINKP Settings</h3>
|
2021-08-14 04:10:29 +00:00
|
|
|
<p>BINKD has been configured to listen on <strong>{{ Setup::BINKP_BIND }}</strong>:<strong>{{ Setup::BINKP_PORT }}</strong></p>
|
2021-06-24 10:16:37 +00:00
|
|
|
|
|
|
|
<div class="form-check form-switch">
|
|
|
|
<input class="form-check-input" type="checkbox" id="startbinkd" name="options[binkd]" value="{{ Setup::O_BINKP }}" @if(old('options.binkd',$o->optionGet(Setup::O_BINKP))) checked @endif>
|
|
|
|
<label class="form-check-label" for="startbinkd">Listen for BINKP connections</label>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="mt-1 form-check form-switch">
|
|
|
|
<input class="form-check-input" type="checkbox" id="opt_cht" name="binkp[cht]" value="{{ Setup::BINKP_OPT_CHT }}" @if(old('binkp.cht',$o->binkpOptionGet(Setup::BINKP_OPT_CHT))) checked @endif disabled>
|
|
|
|
<label class="form-check-label" for="opt_cht">Chat Mode <sup>not implemented</sup></label>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="mt-1 form-check form-switch">
|
|
|
|
<input class="form-check-input" type="checkbox" id="opt_md" name="binkp[md]" value="{{ Setup::BINKP_OPT_MD }}" @if(old('binkp.md',$o->binkpOptionGet(Setup::BINKP_OPT_MD))) checked @endif>
|
|
|
|
<label class="form-check-label" for="opt_md">CRAM-MD5 Mode</label>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="mt-1 form-check form-switch">
|
|
|
|
<input class="form-check-input" type="checkbox" id="opt_cr" name="binkp[cr]" value="{{ Setup::BINKP_OPT_CR }}" @if(old('binkp.cr',$o->binkpOptionGet(Setup::BINKP_OPT_CR))) checked @endif disabled>
|
|
|
|
<label class="form-check-label" for="opt_cr">Crypt mode <sup>not implemented</sup></label>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="mt-1 form-check form-switch">
|
|
|
|
<input class="form-check-input" type="checkbox" id="opt_mb" name="binkp[mb]" value="{{ Setup::BINKP_OPT_MB }}" @if(old('binkp.mb',$o->binkpOptionGet(Setup::BINKP_OPT_MB))) checked @endif>
|
|
|
|
<label class="form-check-label" for="opt_mb">Multi-Batch mode<sup>*</sup></label>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="mt-1 form-check form-switch">
|
|
|
|
<input class="form-check-input" type="checkbox" id="opt_mpwd" name="binkp[mpwd]" value="{{ Setup::BINKP_OPT_MPWD }}" @if(old('binkp.mpwd',$o->binkpOptionGet(Setup::BINKP_OPT_MPWD))) checked @endif disabled>
|
|
|
|
<label class="form-check-label" for="opt_mpwd">Multi-Password Mode <sup>not implemented</sup></label>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="mt-1 form-check form-switch">
|
|
|
|
<input class="form-check-input" type="checkbox" id="opt_nd" name="binkp[nd]" value="{{ Setup::BINKP_OPT_ND }}" @if(old('binkp.nd',$o->binkpOptionGet(Setup::BINKP_OPT_ND))) checked @endif>
|
|
|
|
<label class="form-check-label" for="opt_nd">No Dupes Mode</label>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="mt-1 form-check form-switch">
|
|
|
|
<input class="form-check-input" type="checkbox" id="opt_nda" name="binkp[nda]" value="{{ Setup::BINKP_OPT_NDA }}" @if(old('binkp.nda',$o->binkpOptionGet(Setup::BINKP_OPT_NDA))) checked @endif>
|
|
|
|
<label class="form-check-label" for="opt_nda">No Dupes Mode - Asymmetric<sup>*</sup></label>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="mt-1 form-check form-switch">
|
|
|
|
<input class="form-check-input" type="checkbox" id="opt_nr" name="binkp[nr]" value="{{ Setup::BINKP_OPT_NR }}" @if(old('binkp.nr',$o->binkpOptionGet(Setup::BINKP_OPT_NR))) checked @endif>
|
|
|
|
<label class="form-check-label" for="opt_nr">Non-Reliable Mode<sup>*</sup></label>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<p class="pt-3"><sup>*</sup> Recommended Defaults</p>
|
|
|
|
|
2021-08-14 04:10:29 +00:00
|
|
|
<!-- @todo What's this for again? -->
|
2021-06-24 10:16:37 +00:00
|
|
|
<table class="table monotable">
|
|
|
|
{{--
|
|
|
|
$this->binkp_options = ['m','d','r','b'];
|
|
|
|
--}}
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
|
2021-07-18 12:10:21 +00:00
|
|
|
<!-- EMSI Settings -->
|
2021-06-24 10:16:37 +00:00
|
|
|
<div class="col-6">
|
|
|
|
<h3>EMSI Settings</h3>
|
2021-08-14 04:10:29 +00:00
|
|
|
<p>EMSI has been configured to listen on <strong>{{ Setup::EMSI_BIND }}</strong>:<strong>{{ Setup::EMSI_PORT }}</strong></p>
|
2021-06-24 10:16:37 +00:00
|
|
|
|
|
|
|
<div class="form-check form-switch">
|
|
|
|
<input class="form-check-input" type="checkbox" id="startemsi" name="options[emsi]" value="{{ Setup::O_EMSI }}" @if(old('options.emsi',$o->optionGet(Setup::O_EMSI))) checked @endif>
|
|
|
|
<label class="form-check-label" for="startemsi">Listen for EMSI connections</label>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="row">
|
2021-07-24 04:12:10 +00:00
|
|
|
<div class="col-2">
|
2021-06-24 10:16:37 +00:00
|
|
|
<a href="{{ url('ftn/domain') }}" class="btn btn-danger">Cancel</a>
|
2021-07-24 04:12:10 +00:00
|
|
|
</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.
|
|
|
|
@dump($errors)
|
|
|
|
</span>
|
|
|
|
@endif
|
|
|
|
</span>
|
|
|
|
|
|
|
|
@can('admin',$o)
|
|
|
|
<div class="col-2">
|
|
|
|
<button type="submit" name="submit" class="btn btn-success float-end">@if ($o->exists)Save @else Add @endif</button>
|
|
|
|
</div>
|
|
|
|
@endcan
|
2021-06-24 10:16:37 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2021-06-17 14:08:30 +00:00
|
|
|
@endsection
|
2021-06-24 10:16:37 +00:00
|
|
|
|
|
|
|
@section('page-css')
|
|
|
|
<link type="text/css" rel="stylesheet" href="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/css/select2.min.css">
|
|
|
|
@append
|
|
|
|
@section('page-scripts')
|
|
|
|
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/js/select2.min.js"></script>
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
$(document).ready(function() {
|
|
|
|
$('#system_id').select2();
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
@append
|