Upgrade to Laravel 11, begining of enabling network join functionality, removed QueryCacheable

This commit is contained in:
2024-04-26 16:18:40 +10:00
parent 6e376100a5
commit 79b180f453
16 changed files with 1086 additions and 1018 deletions

View File

@@ -18,7 +18,7 @@
<label for="name" class="form-label">Name</label>
<div class="input-group has-validation">
<span class="input-group-text"><i class="bi bi-tag-fill"></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('admin',$o)disabled @endcannot autofocus>
<input type="text" class="form-control @error('name') is-invalid @enderror" id="name" placeholder="Name" name="name" value="{{ old('name',$o->name) }}" required @cannot('admin',$o)disabled @endcannot autofocus autocomplete="off">
<span class="invalid-feedback" role="alert">
@error('name')
{{ $message }}
@@ -30,7 +30,7 @@
</div>
<div class="col-2">
<label for="active" class="form-label">Active</label>
<label 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 @cannot('admin',$o)disabled @endcannot @if(old('active',$o->active))checked @endif>
@@ -44,7 +44,7 @@
<div class="col-2">
@if ($o->zones->count() > 1)
<label for="flatten" class="form-label">Flatten Zones <i class="bi bi-info-circle" title="Treat this domain as a 2D domain"></i></label>
<label class="form-label">Flatten Zones <i class="bi bi-info-circle" title="Treat this domain as a 2D domain"></i></label>
<div class="input-group">
<div class="btn-group" role="group">
<input type="radio" class="btn-check" name="flatten" id="flatten_yes" value="1" required @if(old('flatten',$o->flatten))checked @endif>
@@ -88,8 +88,8 @@
</div>
</div>
<div class="col-4">
<label for="public" class="form-label">Public</label>
<div class="col-2">
<label class="form-label">Public</label>
<div class="input-group">
<div class="btn-group" role="group">
<input type="radio" class="btn-check" name="public" id="public_yes" value="1" required @cannot('admin',$o)disabled @endcannot @if(old('public',$o->public))checked @endif>
@@ -101,6 +101,19 @@
</div>
</div>
<div class="col-2">
<label class="form-label">Applications</label>
<div class="input-group">
<div class="btn-group" role="group">
<input type="radio" class="btn-check" name="accept_app" id="accept_app_yes" value="1" required @cannot('admin',$o)disabled @endcannot @if(old('accept_app',$o->accept_app))checked @endif>
<label class="btn btn-outline-success" for="accept_app_yes">Yes</label>
<input type="radio" class="btn-check btn-danger" name="accept_app" id="accept_app_no" value="0" required @cannot('admin',$o)disabled @endcannot @if(! old('accept_app',$o->accept_app))checked @endif>
<label class="btn btn-outline-danger" for="accept_app_no">No</label>
</div>
</div>
</div>
@if ($o->nodelist_filename)
<div class="col-4">
<label for="name" class="form-label">Nodelist File Area</label>
@@ -117,7 +130,7 @@
<div class="row">
<div class="col-12">
<label for="notes" class="form-label">Notes</label>
<textarea class="form-control" rows=3 name="notes" placeholder="Notes..." @cannot('admin',$o)disabled @endcannot>{{ old('notes',$o->notes) }}</textarea>
<textarea class="form-control" rows=3 id="notes" name="notes" placeholder="Notes..." @cannot('admin',$o)disabled @endcannot>{{ old('notes',$o->notes) }}</textarea>
</div>
</div>
</div>

View File

@@ -156,24 +156,41 @@
</div>
<!-- Sign up -->
<div class="accordion-item">
<h3 class="accordion-header">
<span class="accordion-button collapsed" id="signup" data-bs-toggle="collapse" data-bs-target="#collapse_signup" aria-expanded="false" aria-controls="collapse_signup">Join Network</span>
</h3>
@if ($o->can_accept_app)
<div class="accordion-item">
<h3 class="accordion-header">
<span class="accordion-button collapsed" id="signup" data-bs-toggle="collapse" data-bs-target="#collapse_signup" aria-expanded="false" aria-controls="collapse_signup">Join Network</span>
</h3>
<div id="collapse_signup" class="accordion-collapse collapse" aria-labelledby="signup" data-bs-parent="#accordion_homepage">
<div class="accordion-body">
@guest
To start an application to join this network please <a href="{{ url('login') }}">login</a>.
@else
@if($user->isMember($o))
@else
This website is not ready to take applications yet, check back soon!
@endif
@endguest
<div id="collapse_signup" class="accordion-collapse collapse" aria-labelledby="signup" data-bs-parent="#accordion_homepage">
<div class="accordion-body">
<p>Your system(s) <strong class="highlight">{!! $o->userHasSystemsNotInNet(Auth::user())->pluck('name')->join('</strong>, <strong class="highlight">') !!}</strong> can join this network.</p>
<p>
If you want to join it/them to this network, make sure:
</p>
<ul>
<li>it is online and can accept mailer calls</li>
<li>you have the <strong class="highlight">BBS Internet Hostname</strong> configured with the correct hostname</li>
<li>you have selected either <strong class="highlight">BINKP</strong> or <strong class="highlight">EMSI</strong> in the mailer settings, with the correct TCP port</li>
</ul>
<p>Here's what will happen next</p>
<ul>
<li>You complete the application form (see the button below)</li>
<li>We'll poll your system to make sure it is connectable</li>
<li>Your applicaiton will then be forwarded to the <strong class="highlight">ZC</strong> of the domain</li>
<li>You'll hear back from your assigned hub to configure your system with your assigned FTN address</li>
<li>Configure your system, subscribe to file and echo areas</li>
<li>Enjoy!</li>
</ul>
<button class="btn btn-success">Lets Do It</button>
</div>
</div>
</div>
</div>
@endif
</div>
</div>
</div>
@@ -181,15 +198,8 @@
@section('page-css')
@css('datatables')
<style>
div#collapse_about {
min-height: 25em;
}
div#collapse_about .collapse{
min-height: 0;
}
</style>
@append
@section('page-scripts')
@js('datatables')
@js('highcharts')
@@ -253,6 +263,19 @@
}
}
});
@if ($o->can_accept_app)
$('#join_top').on('click',function(item) {
$('.accordion-collapse').each(function(){
if ($(this).hasClass('show')) {
$(this).toggle();
}
});
$('#collapse_signup').toggle();
return false;
});
@endif
});
Highcharts.chart('network_traffic', {

View File

@@ -15,12 +15,10 @@
</ul>
</div>
</li>
<li><a href="{{ url('status') }}" class="@if(preg_match('#^status#',request()->path()))thispage disabled @endif"><span>Status</span></a></li>
{{--
<li><a href="{{ url('help') }}" class="@if(preg_match('#^help#',request()->path()))thispage @endif disabled"><span>Help</span></a></li>
--}}
@if(preg_match('#^/network/#',request()->path()))
<li><a href="{{ url('join') }}" class="@if(preg_match('#^join#',request()->path()))thispage @endif"><span>Join</span></a></li>
@if(preg_match('#^domain/#',request()->path()) && $o->can_accept_app)
<li><a href="{{ url('join') }}" id="join_top" class="@if(preg_match('#^join#',request()->path()))thispage @endif"><span>Join</span></a></li>
@else
<li><a href="{{ url('status') }}" class="@if(preg_match('#^status#',request()->path()))thispage disabled @endif"><span>Status</span></a></li>
@endif
</ul>