Ports by device group (#14175)

* Add devicegroup filterFields

* add Devicegroup to post function

* StyleCI

* Add GUI Element

* Less wordy

Dropped "View" from the link. Made it too wordy for such a small GUI insertion.

* Moved DeviceGroup Ports link to a separate column

I realized how it could be confusing to have links to two different items in the same column, so I separated the Ports out.
This commit is contained in:
electrocret
2022-08-04 18:09:21 -05:00
committed by GitHub
parent 06e699d5e8
commit 1d1b2b1c8b
3 changed files with 12 additions and 0 deletions
@@ -63,6 +63,13 @@ class PortsController extends TableController
'port_descr_type',
'ports.disabled' => 'disabled',
'ports.ignore' => 'ignore',
'devicegroup' => function ($query, $devicegroup) {
return $query->whereHas('device', function ($query) use ($devicegroup) {
return $query->whereHas('groups', function ($query) use ($devicegroup) {
return $query->where('id', $devicegroup);
});
});
},
];
}