]> git.proxmox.com Git - pve-manager.git/commitdiff
ui: vm/machine: show notice about effects of machine version change
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 5 Mar 2021 20:13:48 +0000 (21:13 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 5 Mar 2021 20:31:32 +0000 (21:31 +0100)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
www/manager6/qemu/MachineEdit.js

index 573a8c0f38e98de18da9f2b14af1536c03e277c8..c50fd9aafb1026d28a81df6bb692b4ca550fee2e 100644 (file)
@@ -60,33 +60,40 @@ Ext.define('PVE.qemu.MachineInputPanel', {
        ],
     },
 
-    advancedItems: {
-       xtype: 'combobox',
-       name: 'version',
-       reference: 'version',
-       fieldLabel: gettext('Version'),
-       emptyText: gettext('Latest'),
-       value: 'latest',
-       editable: false,
-       valueField: 'id',
-       displayField: 'version',
-       queryParam: false,
-       store: {
-           autoLoad: true,
-           fields: ['id', 'type', 'version'],
-           proxy: {
-               type: 'proxmox',
-               url: "/api2/json/nodes/localhost/capabilities/qemu/machines",
-           },
-           listeners: {
-               load: function(records) {
-                   if (!this.isWindows) {
-                       this.insert(0, { id: 'latest', type: 'any', version: gettext('Latest') });
-                   }
+    advancedItems: [
+       {
+           xtype: 'combobox',
+           name: 'version',
+           reference: 'version',
+           fieldLabel: gettext('Version'),
+           emptyText: gettext('Latest'),
+           value: 'latest',
+           editable: false,
+           valueField: 'id',
+           displayField: 'version',
+           queryParam: false,
+           store: {
+               autoLoad: true,
+               fields: ['id', 'type', 'version'],
+               proxy: {
+                   type: 'proxmox',
+                   url: "/api2/json/nodes/localhost/capabilities/qemu/machines",
+               },
+               listeners: {
+                   load: function(records) {
+                       if (!this.isWindows) {
+                           this.insert(0, { id: 'latest', type: 'any', version: gettext('Latest') });
+                       }
+                   },
                },
            },
        },
-    },
+       {
+           xtype: 'displayfield',
+           fieldLabel: gettext('Note'),
+           value: gettext('Machine version change may affect hardware layout and settings in the guest OS.'),
+       },
+    ],
 });
 
 Ext.define('PVE.qemu.MachineEdit', {
@@ -98,6 +105,8 @@ Ext.define('PVE.qemu.MachineEdit', {
        xtype: 'pveMachineInputPanel',
     },
 
+    width: 400,
+
     initComponent: function() {
        let me = this;