diff --git a/src/etc/inc/plugins.inc.d/core.inc b/src/etc/inc/plugins.inc.d/core.inc index 7530bba8b..5f639d8d8 100644 --- a/src/etc/inc/plugins.inc.d/core.inc +++ b/src/etc/inc/plugins.inc.d/core.inc @@ -191,6 +191,23 @@ function core_devices() 'type' => 'gre', ]; + $vlan_names = []; + + foreach (config_read_array('vlans', 'vlan') as $dev) { + $vlan_names[$dev['vlanif']] = [ + 'descr' => sprintf(gettext('%s %s (Parent: %s, Tag: %s)'), $dev['vlanif'], $dev['descr'], $dev['if'], $dev['tag']), + 'ifdescr' => sprintf('%s', $dev['descr']), + 'name' => $dev['vlanif'], + ]; + } + + $devices[] = [ + 'pattern' => '_vlan|^vlan|^qinq', + 'names' => $vlan_names, + 'volatile' => true, + 'type' => 'vlan', + ]; + $wlan_names = []; foreach (config_read_array('wireless', 'clone') as $dev) { @@ -245,7 +262,6 @@ function core_devices() $devices[] = array('pattern' => '^wg', 'volatile' => true); $devices[] = array('pattern' => '^zt', 'volatile' => true); $devices[] = array('pattern' => '_stf', 'volatile' => true); - $devices[] = array('pattern' => '_vlan|^vlan|^qinq', 'volatile' => true); return $devices; } diff --git a/src/www/interfaces_assign.php b/src/www/interfaces_assign.php index d5a022bce..e66abab3e 100644 --- a/src/www/interfaces_assign.php +++ b/src/www/interfaces_assign.php @@ -62,7 +62,6 @@ function list_interfaces($devices) /* XXX suppose this should plug into plugins_devices() eventually */ $config_sections['laggs.lagg'] = ['descr' => 'laggif,descr', 'key' => 'laggif', 'format' => '%s (%s)', 'fields' => 'members']; $config_sections['ppps.ppp'] = ['descr' => 'if,ports,descr,username', 'key' => 'if','format' => '%s (%s) - %s %s', 'fields' => 'type']; - $config_sections['vlans.vlan'] = ['descr' => 'vlanif,descr,if,tag', 'key' => 'vlanif', 'format' => gettext('%s %s (Parent: %s, Tag: %s)')]; // add physical network interfaces foreach (get_interface_list() as $key => $intf_item) {