]> git.proxmox.com Git - pve-manager.git/commitdiff
ui: pci passthrough: editor for pci-id overrides
authorNicholas Sherlock <n.sherlock@gmail.com>
Tue, 18 Jan 2022 21:38:40 +0000 (21:38 +0000)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 25 Jan 2022 10:17:05 +0000 (11:17 +0100)
Signed-off-by: Nicholas Sherlock <n.sherlock@gmail.com>
www/manager6/Toolkit.js
www/manager6/qemu/PCIEdit.js

index 1b6085a49cf381c86c5b8d294b9752de135a69c9..f69c376adc537b6cd8313748279d3387e2b1f4de 100644 (file)
@@ -13,6 +13,8 @@ Ext.apply(Ext.form.field.VTypes, {
     IP64AddressWithSuffixList: v => PVE.Utils.verify_ip64_address_list(v, true),
     IP64AddressListText: gettext('Example') + ': 192.168.1.1,192.168.1.2',
     IP64AddressListMask: /[A-Fa-f0-9,:.; ]/,
+    PciIdText: gettext('Example') + ': 0x8086',
+    PciId: v => /^0x[0-9a-fA-F]{4}$/.test(v),
 });
 
 Ext.define('PVE.form.field.Display', {
index f505e34f54aacd56bc637051b9dbfca5d1cadb9e..ec22a89ccc14ebb6fece797d2806bbd6ecb19d53 100644 (file)
@@ -190,6 +190,24 @@ Ext.define('PVE.qemu.PCIInputPanel', {
                fieldLabel: 'ROM-File',
                name: 'romfile',
            },
+           {
+               xtype: 'textfield',
+               name: 'vendor-id',
+               fieldLabel: gettext('Set vendor ID'),
+               vtype: 'PciId',
+               allowBlank: true,
+               emptyText: Proxmox.Utils.defaultText,
+               submitEmpty: false,
+           },
+           {
+               xtype: 'textfield',
+               name: 'device-id',
+               fieldLabel: gettext('Set device ID'),
+               vtype: 'PciId',
+               allowBlank: true,
+               emptyText: Proxmox.Utils.defaultText,
+               submitEmpty: false,
+           },
        ];
 
        me.advancedColumn2 = [
@@ -198,6 +216,24 @@ Ext.define('PVE.qemu.PCIInputPanel', {
                fieldLabel: 'PCI-Express',
                name: 'pcie',
            },
+           {
+               xtype: 'textfield',
+               name: 'sub-vendor-id',
+               fieldLabel: gettext('Set sub-vendor ID'),
+               vtype: 'PciId',
+               allowBlank: true,
+               emptyText: Proxmox.Utils.defaultText,
+               submitEmpty: false,
+           },
+           {
+               xtype: 'textfield',
+               name: 'sub-device-id',
+               fieldLabel: gettext('Set sub-device ID'),
+               vtype: 'PciId',
+               allowBlank: true,
+               emptyText: Proxmox.Utils.defaultText,
+               submitEmpty: false,
+           },
        ];
 
        me.callParent();