[pve-devel] [PATCH manager 1/1] Add 'type' option to AgentFeatureSelector
Matt Dunwoodie
ncon at noconroy.net
Mon Nov 18 07:46:13 CET 2019
This adds an extra field to the AgentFeatureSelector that reflects the
change in qemu-server.
Signed-off-by: Matt Dunwoodie <ncon at noconroy.net>
---
www/manager6/Utils.js | 16 +++++++++++++---
www/manager6/form/AgentFeatureSelector.js | 14 ++++++++++++--
2 files changed, 25 insertions(+), 5 deletions(-)
diff --git a/www/manager6/Utils.js b/www/manager6/Utils.js
index 47f9d297..6c4f4bed 100644
--- a/www/manager6/Utils.js
+++ b/www/manager6/Utils.js
@@ -276,10 +276,20 @@ Ext.define('PVE.Utils', { utilities: {
var keystring = '' ;
agentstring += ', ' + key + ': ';
- if (PVE.Parser.parseBoolean(value)) {
- agentstring += Proxmox.Utils.enabledText;
+ if (key === 'type') {
+ if (value === 'virtio') {
+ agentstring += 'Virtio';
+ } else if (value === 'isa') {
+ agentstring += 'ISA';
+ } else {
+ agentstring += 'Unknown';
+ }
} else {
- agentstring += Proxmox.Utils.disabledText;
+ if (PVE.Parser.parseBoolean(value)) {
+ agentstring += Proxmox.Utils.enabledText;
+ } else {
+ agentstring += Proxmox.Utils.disabledText;
+ }
}
});
diff --git a/www/manager6/form/AgentFeatureSelector.js b/www/manager6/form/AgentFeatureSelector.js
index 44ef2e57..794f179c 100644
--- a/www/manager6/form/AgentFeatureSelector.js
+++ b/www/manager6/form/AgentFeatureSelector.js
@@ -7,20 +7,30 @@ Ext.define('PVE.form.AgentFeatureSelector', {
items: [
{
xtype: 'proxmoxcheckbox',
- boxLabel: Ext.String.format(gettext('Use {0}'), 'QEMU Guest Agent'),
+ fieldLabel: Ext.String.format(gettext('Use {0}'), 'QEMU Guest Agent'),
name: 'enabled',
reference: 'enabled',
uncheckedValue: 0,
},
{
xtype: 'proxmoxcheckbox',
- boxLabel: gettext('Run guest-trim after clone disk'),
+ fieldLabel: gettext('Run guest-trim after clone disk'),
name: 'fstrim_cloned_disks',
bind: {
disabled: '{!enabled.checked}',
},
disabled: true
},
+ {
+ xtype: 'proxmoxKVComboBox',
+ name: 'type',
+ value: 'virtio',
+ fieldLabel: 'Type',
+ comboItems: [
+ ['virtio', 'virtio'],
+ ['isa', 'isa'],
+ ],
+ },
{
xtype: 'displayfield',
userCls: 'pmx-hint',
--
2.23.0
More information about the pve-devel
mailing list