]> git.proxmox.com Git - pve-manager.git/commitdiff
ui: guest import: fix internal name for the prepare-for-virtIO feature
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 27 Mar 2024 10:40:21 +0000 (11:40 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 27 Mar 2024 10:45:26 +0000 (11:45 +0100)
Mapping to SATA is only one thing it does, and what we actually want
to do is preparing for VirtIO, the effects are implementation detail,
so name it after the reason not one specific step.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
www/manager6/window/GuestImport.js

index 2386196f6923645f581f698142b673ec0d522651..7b6dce6c227595535099b4fb55a2d135f62d72cd 100644 (file)
@@ -159,8 +159,8 @@ Ext.define('PVE.window.GuestImport', {
 
        mapDisk: function(value, metaData) {
            let me = this;
-           let mapSata = me.lookup('mapSata');
-           if (mapSata.isDisabled() || !mapSata.getValue()) {
+           let prepareForVirtIO = me.lookup('prepareForVirtIO');
+           if (prepareForVirtIO.isDisabled() || !prepareForVirtIO.getValue()) {
                return value;
            }
            if (!value.toLowerCase().startsWith('scsi')) {
@@ -204,7 +204,7 @@ Ext.define('PVE.window.GuestImport', {
                rec.set('hidden', !isWindows);
                rec.commit();
            }
-           let prepareVirtio = me.lookup('mapSata').getValue();
+           let prepareVirtio = me.lookup('prepareForVirtIO').getValue();
            let defaultScsiHw = me.getView().vmConfig.scsihw ?? '__default__';
            me.lookup('scsihw').setValue(prepareVirtio && isWindows ? 'virtio-scsi-single' : defaultScsiHw);
 
@@ -263,7 +263,7 @@ Ext.define('PVE.window.GuestImport', {
            'panel[reference=summaryTab]': {
                activate: 'calculateConfig',
            },
-           'proxmoxcheckbox[reference=mapSata]': {
+           'proxmoxcheckbox[reference=prepareForVirtIO]': {
                change: 'onPrepareVirtioChange',
            },
            'combobox[name=ostype]': {
@@ -667,8 +667,8 @@ Ext.define('PVE.window.GuestImport', {
                        xtype: 'proxmoxcheckbox',
                        fieldLabel: gettext('Prepare for VirtIO-SCSI'),
                        labelWidth: 200,
-                       reference: 'mapSata',
-                       name: 'mapSata',
+                       reference: 'prepareForVirtIO',
+                       name: 'prepareForVirtIO',
                        submitValue: false,
                        disabled: true,
                        bind: {
@@ -970,7 +970,7 @@ Ext.define('PVE.window.GuestImport', {
                me.getViewModel().set('warnings', data.warnings.map(w => renderWarning(w)));
 
                let osinfo = PVE.Utils.get_kvm_osinfo(me.vmConfig.ostype ?? '');
-               let mapSata = (me.vmConfig.ostype ?? '').startsWith('w') && (me.vmConfig.bios ?? '').indexOf('ovmf') !== -1;
+               let prepareForVirtIO = (me.vmConfig.ostype ?? '').startsWith('w') && (me.vmConfig.bios ?? '').indexOf('ovmf') !== -1;
 
                me.setValues({
                    osbase: osinfo.base,
@@ -978,7 +978,7 @@ Ext.define('PVE.window.GuestImport', {
                });
 
 
-               me.lookup('mapSata').setValue(mapSata);
+               me.lookup('prepareForVirtIO').setValue(prepareForVirtIO);
            },
        });
     },