Only show managed networks when exploring

This commit is contained in:
Deon George 2022-12-17 14:00:41 +11:00
parent eca9f257eb
commit 5f6e202a3f
2 changed files with 14 additions and 7 deletions

View File

@ -136,12 +136,17 @@ If you have more than 1 BBS, then the Clearing Houz can receive all your mail fr
} }
}, },
series: [ series: [
@foreach (\App\Models\Domain::active()->public()->orderBy('name')->with(['echoareas'])->get() as $o) @foreach (\App\Models\Domain::active()
{ ->when(((! $user) || (! $user->isAdmin())),function($query) { return $query->public()->active(); })
name: '{{ $o->name }}', ->orderBy('name')
data: {!! $o->daily_area_stats() !!}, ->with(['echoareas'])->get() as $o)
dashStyle: 'ShortDot', @if ($o->managed())
}, {
name: '{{ $o->name }}',
data: {!! $o->daily_area_stats() !!},
dashStyle: 'ShortDot',
},
@endif
@endforeach @endforeach
], ],
}); });

View File

@ -6,7 +6,9 @@
@foreach (\App\Models\Domain::select(['id','name']) @foreach (\App\Models\Domain::select(['id','name'])
->when(((! $user) || (! $user->isAdmin())),function($query) { return $query->public()->active(); }) ->when(((! $user) || (! $user->isAdmin())),function($query) { return $query->public()->active(); })
->orderBy('name')->get() as $o) ->orderBy('name')->get() as $o)
<dd><a href="{{ url('network',['id'=>$o->id]) }}" title="{{ $o->description }}">{{ $o->name }}</a></dd> @if ($o->managed())
<dd><a href="{{ url('network',['id'=>$o->id]) }}" title="{{ $o->description }}">{{ $o->name }}</a></dd>
@endif
@endforeach @endforeach
</dl> </dl>