Add the VLAN column to the search

mgcap

New Member
Oct 8, 2025
1
0
1
Please add the VLAN column to your search officially, I had to do it myself.

prox_vlan.png

proxmox v8.4
in file
/usr/share/pve-manager/js/pvemanagerlib.js

found
JavaScript:
columns: rstore.defaultColumns(),

replace with

JavaScript:
columns: (function() {
    let cols = rstore.defaultColumns();

    cols.push({
        header: 'VLAN Tag',
        dataIndex: 'vlan',
        width: 80,
        renderer: function(value, meta, record) {
            if (record.data.type === 'qemu' || record.data.type === 'lxc') {
                let node = record.data.node;
                let vmid = record.data.vmid;

                Ext.Ajax.request({
                    url: `/api2/json/nodes/${node}/${record.data.type}/${vmid}/config`,
                    success: function(resp) {
                        try {
                            let data = Ext.decode(resp.responseText).data;
                            for (let key in data) {
                                if (key.match(/^net\d+/) && data[key].match(/tag=\d+/)) {
                                    record.set('vlan', data[key].match(/tag=\d+/)[0].replace('tag=', ''));
                                    break;
                                }
                            }
                        } catch (e) {}
                    }
                });
                return record.data.vlan || '';
            }
            return '';
        }
    });

    return cols;
})(),
then
systemctl restart pveproxy
or
reboot node

in browser (Ctrl+Shift+N) or Ctrl+F5 page

see:
Datacenter → Search
Node → Search