diff --git a/app/Classes/Protocol.php b/app/Classes/Protocol.php index 8093a05..cba7c4a 100644 --- a/app/Classes/Protocol.php +++ b/app/Classes/Protocol.php @@ -275,7 +275,7 @@ abstract class Protocol Log::info(sprintf('%s: Total: %s - %d:%02d:%02d online, (%d) %lu%s sent, (%d) %lu%s received - %s', __METHOD__, - $this->node->address, + $this->node->address->ftn, $this->node->session_time/3600, $this->node->session_time%3600/60, $this->node->session_time%60, diff --git a/app/Models/System.php b/app/Models/System.php index 20d2ed8..e5dc662 100644 --- a/app/Models/System.php +++ b/app/Models/System.php @@ -47,6 +47,14 @@ class System extends Model return $this->hasOne(Setup::class); } + /** + * This system is the ZC for the following zones + */ + public function zcs() + { + return $this->belongsToMany(Zone::class); + } + /** * Zones a system has addresses for * diff --git a/resources/views/domain/view.blade.php b/resources/views/domain/view.blade.php index 369c69b..3121c3a 100644 --- a/resources/views/domain/view.blade.php +++ b/resources/views/domain/view.blade.php @@ -206,6 +206,8 @@ paging: true, pageLength: 25, searching: true, + ordering: true, + order: [], conditionalPaging: { style: 'fade', speed: 500 // optional diff --git a/resources/views/system/addedit.blade.php b/resources/views/system/addedit.blade.php index aee5065..d518cfd 100644 --- a/resources/views/system/addedit.blade.php +++ b/resources/views/system/addedit.blade.php @@ -9,11 +9,15 @@ use App\Http\Controllers\DomainController as DC; @endphp @section('content') - @if ($o->exists) + @if($o->exists)

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

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

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

+ @endif +
@if ($o->exists) diff --git a/resources/views/system/home.blade.php b/resources/views/system/home.blade.php index dc4658a..7f3f93f 100644 --- a/resources/views/system/home.blade.php +++ b/resources/views/system/home.blade.php @@ -32,6 +32,7 @@ Connect Address ZeroTier ID + Addresses @@ -52,6 +53,7 @@ {{ $oo->addresses->pluck('ftn')->join(', ') }} {{ $oo->zt_id }} + {{ $oo->addresses->count() }} @endforeach diff --git a/resources/views/system/moveaddr.blade.php b/resources/views/system/moveaddr.blade.php index 662b96b..e21451b 100644 --- a/resources/views/system/moveaddr.blade.php +++ b/resources/views/system/moveaddr.blade.php @@ -50,10 +50,10 @@ Move Address
- system->setup || $o->system->addresses->count() > 1)disabled @endif @if(old('remove',FALSE))checked @endif> + system->setup || $o->system->addresses->count()+$o->system->zcs->count() > 1)disabled @endif @if(old('remove',FALSE))checked @endif> - system->addresses->count() > 1)disabled @endif @if(! old('remove',FALSE))checked @endif> + system->addresses->count()+$o->system->zcs->count() > 1)disabled @endif @if(! old('remove',FALSE))checked @endif>