Compare commits
2 Commits
37adb14b9e
...
b02c1f07a2
Author | SHA1 | Date | |
---|---|---|---|
b02c1f07a2 | |||
c694280081 |
@ -10,7 +10,7 @@ use App\Models\{Address,Zone};
|
|||||||
class ZoneController extends Controller
|
class ZoneController extends Controller
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Add or edit a node
|
* Add or edit a zone
|
||||||
*/
|
*/
|
||||||
public function add_edit(Request $request,Zone $o)
|
public function add_edit(Request $request,Zone $o)
|
||||||
{
|
{
|
||||||
|
@ -8,12 +8,10 @@ use Illuminate\Support\Facades\Gate;
|
|||||||
use Illuminate\Validation\Rule;
|
use Illuminate\Validation\Rule;
|
||||||
|
|
||||||
use App\Classes\FTN\Packet;
|
use App\Classes\FTN\Packet;
|
||||||
use App\Models\{Setup,System};
|
use App\Models\Setup;
|
||||||
|
|
||||||
class SystemRegisterRequest extends FormRequest
|
class SystemRegisterRequest extends FormRequest
|
||||||
{
|
{
|
||||||
private System $so;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determine if the user is authorized to make this request.
|
* Determine if the user is authorized to make this request.
|
||||||
*
|
*
|
||||||
|
@ -122,20 +122,17 @@ class Domain extends Model
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public function isManaged(): bool
|
|
||||||
{
|
|
||||||
return our_address()->pluck('zone.domain')->pluck('id')->contains($this->id);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determine if this zone is managed by this host
|
* Determine if this zone is managed by this host
|
||||||
*
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
* @deprecated use self::isManaged();
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public function managed(): bool
|
public function isManaged(): bool
|
||||||
{
|
{
|
||||||
return our_address($this)->count() > 0;
|
$x = our_address();
|
||||||
|
|
||||||
|
return $x && $x->pluck('zone.domain')->pluck('id')->contains($this->id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -178,7 +178,7 @@
|
|||||||
->orderBy('name')
|
->orderBy('name')
|
||||||
->with(['echoareas'])
|
->with(['echoareas'])
|
||||||
->get() as $o)
|
->get() as $o)
|
||||||
@if ($o->managed())
|
@if ($o->isManaged())
|
||||||
{
|
{
|
||||||
name: '{{ $o->name }}',
|
name: '{{ $o->name }}',
|
||||||
data: [],
|
data: [],
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
<!-- $o=Domain::class -->
|
||||||
@extends('layouts.app')
|
@extends('layouts.app')
|
||||||
|
|
||||||
@section('htmlheader_title')
|
@section('htmlheader_title')
|
||||||
@ -47,7 +48,7 @@ use App\Models\Echoarea;
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-2">
|
<div class="col-2">
|
||||||
@if ($o->zones->count() > 1)
|
@if ($o->zones?->count() > 1)
|
||||||
<label 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="input-group">
|
||||||
<div class="btn-group" role="group">
|
<div class="btn-group" role="group">
|
||||||
@ -62,7 +63,7 @@ use App\Models\Echoarea;
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-4">
|
<div class="col-4">
|
||||||
@if ($o->managed())
|
@if ($o->isManaged())
|
||||||
@if ($o->nodelist_filename)
|
@if ($o->nodelist_filename)
|
||||||
<label for="nodelist_filename" class="form-label">Nodelist File</label>
|
<label for="nodelist_filename" class="form-label">Nodelist File</label>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
|
@ -3,6 +3,10 @@
|
|||||||
Known FTN Networks
|
Known FTN Networks
|
||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
|
@php
|
||||||
|
use App\Models\Domain;
|
||||||
|
@endphp
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
@ -22,7 +26,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach (\App\Models\Domain::public()->orderBy('name')->with(['zones.addresses.system'])->get() as $do)
|
@foreach (Domain::public()->orderBy('name')->with(['zones.addresses.system'])->get() as $do)
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
@if($do->active)
|
@if($do->active)
|
||||||
@ -33,7 +37,7 @@
|
|||||||
</td>
|
</td>
|
||||||
<td>{{ $do->zones->where('active',TRUE)->pluck('zone_id')->sort()->join(', ') }}</td>
|
<td>{{ $do->zones->where('active',TRUE)->pluck('zone_id')->sort()->join(', ') }}</td>
|
||||||
<td class="text-end">{{ $do->active ? 'Active' : 'Not Active' }}</td>
|
<td class="text-end">{{ $do->active ? 'Active' : 'Not Active' }}</td>
|
||||||
<td class="text-end">{{ $do->managed() ? 'YES' : 'NO' }}</td>
|
<td class="text-end">{{ $do->isManaged() ? 'YES' : 'NO' }}</td>
|
||||||
<td>
|
<td>
|
||||||
@foreach (($x=$do->zones->pluck('addresses')->flatten())->where('role',\App\Models\Address::NODE_ZC)->sortBy('zone.zone_id') as $ao)
|
@foreach (($x=$do->zones->pluck('addresses')->flatten())->where('role',\App\Models\Address::NODE_ZC)->sortBy('zone.zone_id') as $ao)
|
||||||
{{ $ao->system->sysop }}, <a href="{{ url('system/view',$ao->system_id) }}">{{ $ao->system->name }}</a><br>
|
{{ $ao->system->sysop }}, <a href="{{ url('system/view',$ao->system_id) }}">{{ $ao->system->name }}</a><br>
|
||||||
|
Loading…
Reference in New Issue
Block a user