[pve-devel] [PATCH manager 7/7] gui: qemu/HardwareView: add machine to HardwareView

Dominik Csapak d.csapak at proxmox.com
Wed Mar 27 14:13:23 CET 2019


so the user can edit this via the gui

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 www/manager6/qemu/HardwareView.js | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/www/manager6/qemu/HardwareView.js b/www/manager6/qemu/HardwareView.js
index 3db466ee..bfa06927 100644
--- a/www/manager6/qemu/HardwareView.js
+++ b/www/manager6/qemu/HardwareView.js
@@ -52,6 +52,7 @@ Ext.define('PVE.qemu.HardwareView', {
 
 	var caps = Ext.state.Manager.get('GuiCap');
 
+	/*jslint confusion: true */
 	var rows = {
 	    memory: {
 		header: gettext('Memory'),
@@ -145,6 +146,28 @@ Ext.define('PVE.qemu.HardwareView', {
 		defaultValue: '',
 		renderer: PVE.Utils.render_kvm_vga_driver		
 	    },
+	    machine: {
+		header: gettext('Machine'),
+		editor: caps.vms['VM.Config.HWType'] ?  {
+		    xtype: 'proxmoxWindowEdit',
+		    subject: gettext('Machine'),
+		    width: 350,
+		    items: [{
+			xtype: 'proxmoxKVComboBox',
+			name: 'machine',
+			value: '__default__',
+			fieldLabel: gettext('Machine'),
+			comboItems: [
+			    ['__default__', PVE.Utils.render_qemu_machine('')],
+			    ['q35', 'q35']
+			]
+		    }]} : undefined,
+		iconCls: 'cogs',
+		never_delete: true,
+		group: 6,
+		defaultValue: '',
+		renderer: PVE.Utils.render_qemu_machine
+	    },
 	    scsihw: {
 		header: gettext('SCSI Controller'),
 		iconCls: 'database',
@@ -182,6 +205,7 @@ Ext.define('PVE.qemu.HardwareView', {
 		visible: false
 	    }
 	};
+	/*jslint confusion: false */
 
 	PVE.Utils.forEachBus(undefined, function(type, id) {
 	    var confid = type + id;
-- 
2.11.0





More information about the pve-devel mailing list