DB query performance fixes

This commit is contained in:
Deon George
2021-06-25 23:38:57 +10:00
parent 64215ebcea
commit 17a44a0945
8 changed files with 29 additions and 943 deletions

View File

@@ -11,6 +11,8 @@ class HomeController extends Controller
{
public function network(Domain $o)
{
$o->load(['zones.system','zones.domain']);
return view('domain.view')
->with('o',$o);
}

View File

@@ -121,7 +121,7 @@ class SystemController extends Controller
$oo = new Address;
$oo->zone_id = $request->post('zone_id');
$oo->region_id = ($x=$request->post('region_id')) == 'no' ? 0 : $x;
$oo->region_id = $request->post('region_id');
$oo->host_id = $request->post('host_id_new');
$oo->node_id = $request->post('node_id_new');
$oo->point_id = 0;
@@ -163,11 +163,11 @@ class SystemController extends Controller
$oo = new Address;
$oo->zone_id = $request->post('zone_id');
$oo->region_id = ($x=$request->post('region_id')) == 'no' ? 0 : $x;
$oo->region_id = $request->post('region_id');
$oo->host_id = $request->post('host_id');
$oo->node_id = $request->post('node_id');
$oo->point_id = $request->post('point_id');
$oo->hub_id = $request->post('hub_id');
$oo->hub_id = $request->post('hub_id') > 0 ? $request->post('hub_id') : NULL;
$oo->role = (! $oo->point_id) && $request->post('hub') ? DomainController::NODE_HC : NULL;
$oo->active = TRUE;