WebUI - Filter FDB and ARP tabs in port page if empty (#15653)

Tested OK

---------

* filter FDB and ARP tabs in port page
* style
* Use relationships

---------

Co-authored-by: Tony Murray <murraytony@gmail.com>
This commit is contained in:
PipoCanaja
2023-12-18 08:08:56 +01:00
committed by GitHub
parent b12ee04bda
commit 759390ba4b

View File

@@ -74,9 +74,14 @@ $link_array = [
$menu_options['graphs'] = 'Graphs';
$menu_options['realtime'] = 'Real time';
// FIXME CONDITIONAL
$menu_options['arp'] = 'ARP Table';
$menu_options['fdb'] = 'FDB Table';
if ($port->macs()->exists()) {
$menu_options['arp'] = 'ARP Table';
}
if ($port->fdbEntries()->exists()) {
$menu_options['fdb'] = 'FDB Table';
}
$menu_options['events'] = 'Eventlog';
$menu_options['notes'] = (get_dev_attrib($device, 'port_id_notes:' . $port->port_id) ?? '') == '' ? 'Notes' : 'Notes*';