[pve-devel] [PATCH manager 2/7] gui: add qemu/SystemEdit
Thomas Lamprecht
t.lamprecht at proxmox.com
Wed Mar 27 16:35:30 CET 2019
On 3/27/19 2:13 PM, Dominik Csapak wrote:
> contains the inputpanel for the coming system tab in the vm creation
> wizard, where the user can configure the vm system hardware like
> the scsi controller, display, etc.
>
> Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
> ---
> www/manager6/Makefile | 1 +
> www/manager6/Utils.js | 4 ++
> www/manager6/qemu/SystemEdit.js | 86 +++++++++++++++++++++++++++++++++++++++++
> 3 files changed, 91 insertions(+)
> create mode 100644 www/manager6/qemu/SystemEdit.js
>
> diff --git a/www/manager6/Makefile b/www/manager6/Makefile
> index f1d59c46..962a3f4d 100644
> --- a/www/manager6/Makefile
> +++ b/www/manager6/Makefile
> @@ -151,6 +151,7 @@ JSSRC= \
> qemu/CIDriveEdit.js \
> qemu/SSHKey.js \
> qemu/IPConfigEdit.js \
> + qemu/SystemEdit.js \
> lxc/Summary.js \
> lxc/Network.js \
> lxc/Resources.js \
> diff --git a/www/manager6/Utils.js b/www/manager6/Utils.js
> index 50e8c297..d8e6f275 100644
> --- a/www/manager6/Utils.js
> +++ b/www/manager6/Utils.js
> @@ -228,6 +228,10 @@ Ext.define('PVE.Utils', { utilities: {
> return agentstring;
> },
>
> + render_qemu_machine: function(value) {
> + return value || (Proxmox.Utils.defaultText + ' (i440fx)');
> + },
> +
> render_qemu_bios: function(value) {
> if (!value) {
> return Proxmox.Utils.defaultText + ' (SeaBIOS)';
> diff --git a/www/manager6/qemu/SystemEdit.js b/www/manager6/qemu/SystemEdit.js
> new file mode 100644
> index 00000000..89e348bb
> --- /dev/null
> +++ b/www/manager6/qemu/SystemEdit.js
> @@ -0,0 +1,86 @@
> +/*jslint confusion: true*/
> +Ext.define('PVE.qemu.SystemInputPanel', {
> + extend: 'Proxmox.panel.InputPanel',
> + xtype: 'pveQemuSystemPanel',
> +
> + onlineHelp: 'qm_virtual_machines_settings',
> +
> + onGetValues: function(values) {
> + if (values.vga && values.vga.substr(0,6) === 'serial') {
> + values['serial' + values.vga.substr(6,1)] = 'socket';
> + }
> +
> + return values;
> + },
> +
> + controller: {
> + xclass: 'Ext.app.ViewController',
> +
> + scsihwChange: function(field, value) {
> + var me = this;
> + if (me.getView().inisdeWizard) {
s/inisdeWizard/insideWizard/
> + me.getViewModel().set('current.scsihw', value);
> + }
> + },
> +
> + control: {
> + 'pveScsiHwSelector': {
> + change: 'scsihwChange'
> + }
> + }
> + },
> +
> + column1: [
> + {
> + xtype: 'proxmoxKVComboBox',
> + value: '__default__',
> + deleteEmpty: false,
> + fieldLabel: gettext('Graphic card'),
> + name: 'vga',
> + comboItems: PVE.Utils.kvm_vga_driver_array()
> + },
> + {
> + xtype: 'proxmoxcheckbox',
> + name: 'agent',
> + uncheckedValue: 0,
> + defaultValue: 0,
> + deleteDefaultValue: true,
> + fieldLabel: gettext('Qemu Agent')
> + }
> + ],
> +
> + column2: [
> + {
> + xtype: 'pveScsiHwSelector',
> + name: 'scsihw',
> + value: '__default__',
> + bind: {
> + value: '{current.scsihw}'
> + },
> + fieldLabel: gettext('SCSI Controller')
> + }
> + ],
> +
> + advancedColumn1: [
> + {
> + xtype: 'pveQemuBiosSelector',
> + name: 'bios',
> + value: '__default__',
> + fieldLabel: 'BIOS'
> + }
> + ],
> +
> + advancedColumn2: [
> + {
> + xtype: 'proxmoxKVComboBox',
> + name: 'machine',
> + value: '__default__',
> + fieldLabel: gettext('Machine'),
> + comboItems: [
> + ['__default__', PVE.Utils.render_qemu_machine('')],
> + ['q35', 'q35']
> + ]
> + }
> + ]
> +
> +});
>
More information about the pve-devel
mailing list