ui: vm-options: add spice enhancements

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
This commit is contained in:
Aaron Lauterer 2019-10-07 15:23:52 +02:00 committed by Thomas Lamprecht
parent c1025d7e31
commit 86b95e11cc
2 changed files with 32 additions and 0 deletions

View File

@ -334,6 +334,24 @@ Ext.define('PVE.Utils', { utilities: {
}
},
render_spice_enhancements: function(values) {
let disabled = Proxmox.Utils.disabledText;
let props = PVE.Parser.parsePropertyString(values);
if (Ext.Object.isEmpty(props)) {
return disabled;
}
let output = [];
if (PVE.Parser.parseBoolean(props.foldersharing)) {
output.push('Folder Sharing: ' + gettext('Enabled'));
}
if (props.videostreaming === 'all' || props.videostreaming === 'filter') {
output.push('Video Streaming: ' + props.videostreaming);
}
return output.join(', ');
},
// fixme: auto-generate this
// for now, please keep in sync with PVE::Tools::kvmkeymaps
kvm_keymaps: {

View File

@ -281,6 +281,20 @@ Ext.define('PVE.qemu.Options', {
}
} : undefined
},
spice_enhancements: {
header: gettext('Spice Enhancements'),
defaultValue: false,
renderer: PVE.Utils.render_spice_enhancements,
editor: caps.vms['VM.Config.Options'] ? {
xtype: 'proxmoxWindowEdit',
subject: gettext('Spice Enhancements'),
onlineHelp: 'qm_spice_enhancements',
items: {
xtype: 'pveSpiceEnhancementSelector',
name: 'spice_enhancements',
}
} : undefined
},
hookscript: {
header: gettext('Hookscript')
}