From: Oguz Bektas <o.bek...@proxmox.com>

Signed-off-by: Oguz Bektas <o.bek...@proxmox.com>
---
 www/manager6/Utils.js                   | 3 ++-
 www/manager6/form/BusTypeSelector.js    | 2 ++
 www/manager6/form/ControllerSelector.js | 2 +-
 www/manager6/qemu/CloudInit.js          | 4 ++--
 www/mobile/QemuSummary.js               | 2 +-
 5 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/www/manager6/Utils.js b/www/manager6/Utils.js
index db86fa9a..aba72135 100644
--- a/www/manager6/Utils.js
+++ b/www/manager6/Utils.js
@@ -13,7 +13,7 @@ Ext.define('PVE.Utils', {
 
     toolkit: undefined, // (extjs|touch), set inside Toolkit.js
 
-    bus_match: /^(ide|sata|virtio|scsi)(\d+)$/,
+    bus_match: /^(ide|sata|virtio|scsi|nvme)\d+$/,
 
     log_severity_hash: {
        0: "panic",
@@ -1560,6 +1560,7 @@ Ext.define('PVE.Utils', {
        ide: 4,
        sata: 6,
        scsi: 31,
+       nvme: 8,
        virtio: 16,
        unused: 256,
     },
diff --git a/www/manager6/form/BusTypeSelector.js 
b/www/manager6/form/BusTypeSelector.js
index 0f040229..fbc6f222 100644
--- a/www/manager6/form/BusTypeSelector.js
+++ b/www/manager6/form/BusTypeSelector.js
@@ -16,6 +16,8 @@ Ext.define('PVE.form.BusTypeSelector', {
 
        me.comboItems.push(['scsi', 'SCSI']);
 
+       me.comboItems.push(['nvme', 'NVMe']);
+
        if (me.withUnused) {
            me.comboItems.push(['unused', 'Unused']);
        }
diff --git a/www/manager6/form/ControllerSelector.js 
b/www/manager6/form/ControllerSelector.js
index d7c2625d..8c766598 100644
--- a/www/manager6/form/ControllerSelector.js
+++ b/www/manager6/form/ControllerSelector.js
@@ -39,7 +39,7 @@ Ext.define('PVE.form.ControllerSelector', {
                deviceid.setValue(2);
                return;
            }
-           clist = ['ide', 'scsi', 'sata'];
+           clist = ['ide', 'scsi', 'sata', 'nvme'];
        } else {
            // in most cases we want to add a disk to the same controller we 
previously used
            clist = PVE.Utils.sortByPreviousUsage(me.vmconfig);
diff --git a/www/manager6/qemu/CloudInit.js b/www/manager6/qemu/CloudInit.js
index 49519726..4ea58641 100644
--- a/www/manager6/qemu/CloudInit.js
+++ b/www/manager6/qemu/CloudInit.js
@@ -135,7 +135,7 @@ Ext.define('PVE.qemu.CloudInit', {
            var id = record.data.key;
            var value = record.data.value;
            var ciregex = new RegExp("vm-" + me.pveSelNode.data.vmid + 
"-cloudinit");
-               if (id.match(/^(ide|scsi|sata)\d+$/) && ciregex.test(value)) {
+               if (id.match(/^(ide|scsi|sata|nvme)\d+$/) && 
ciregex.test(value)) {
                    found = id;
                    me.ciDriveId = found;
                    me.ciDrive = value;
@@ -330,7 +330,7 @@ Ext.define('PVE.qemu.CloudInit', {
            };
        }
 
-       PVE.Utils.forEachBus(['ide', 'scsi', 'sata'], function(type, id) {
+       PVE.Utils.forEachBus(['ide', 'scsi', 'sata', 'nvme'], function(type, 
id) {
            me.rows[type+id] = {
                visible: false,
            };
diff --git a/www/mobile/QemuSummary.js b/www/mobile/QemuSummary.js
index c416ea7d..a484fcb6 100644
--- a/www/mobile/QemuSummary.js
+++ b/www/mobile/QemuSummary.js
@@ -12,7 +12,7 @@ Ext.define('PVE.QemuSummary', {
 
     config_keys: [
        'name', 'memory', 'sockets', 'cores', 'ostype', 'bootdisk', /^net\d+/,
-       /^ide\d+/, /^virtio\d+/, /^sata\d+/, /^scsi\d+/, /^unused\d+/,
+       /^ide\d+/, /^virtio\d+/, /^sata\d+/, /^scsi\d+/, /^nvme\d+/, 
/^unused\d+/
     ],
 
     initialize: function() {
-- 
2.39.2



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to