On the status page, dont show inactive addresses, zones or domains
This commit is contained in:
parent
4c91ed54c0
commit
eab35d4c18
@ -273,17 +273,22 @@ class HomeController extends Controller
|
|||||||
|
|
||||||
$r = Address::select([
|
$r = Address::select([
|
||||||
'a.id',
|
'a.id',
|
||||||
'system_id',
|
'addresses.system_id',
|
||||||
'zone_id',
|
'addresses.zone_id',
|
||||||
'host_id',
|
'addresses.host_id',
|
||||||
'node_id',
|
'addresses.node_id',
|
||||||
DB::raw('sum(a.e) as e'),
|
DB::raw('sum(a.e) as e'),
|
||||||
DB::raw('sum(a.n) as n'),
|
DB::raw('sum(a.n) as n'),
|
||||||
DB::raw('sum(a.f) as f')
|
DB::raw('sum(a.f) as f')
|
||||||
])
|
])
|
||||||
->from($e->union($n)->union($f),'a')
|
->from($e->union($n)->union($f),'a')
|
||||||
|
->where('addresses.active',TRUE)
|
||||||
|
->where('zones.active',TRUE)
|
||||||
|
->where('domains.active',TRUE)
|
||||||
->join('addresses',['addresses.id'=>'a.id'])
|
->join('addresses',['addresses.id'=>'a.id'])
|
||||||
->groupBy('system_id','a.id','zone_id','host_id','node_id')
|
->join('zones',['zones.id'=>'addresses.zone_id'])
|
||||||
|
->join('domains',['domains.id'=>'zones.domain_id'])
|
||||||
|
->groupBy('addresses.system_id','a.id','addresses.zone_id','addresses.host_id','addresses.node_id')
|
||||||
->with(['system','zone.domain']);
|
->with(['system','zone.domain']);
|
||||||
|
|
||||||
return view('status')
|
return view('status')
|
||||||
|
Loading…
Reference in New Issue
Block a user