mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-07-25 10:10:14 +00:00
Add edit dialog for audio device
Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
This commit is contained in:
parent
c1e4addd71
commit
da97bd3d88
@ -156,6 +156,7 @@ JSSRC= \
|
||||
qemu/SSHKey.js \
|
||||
qemu/IPConfigEdit.js \
|
||||
qemu/SystemEdit.js \
|
||||
qemu/AudioEdit.js \
|
||||
lxc/Summary.js \
|
||||
lxc/Network.js \
|
||||
lxc/Resources.js \
|
||||
|
65
www/manager6/qemu/AudioEdit.js
Normal file
65
www/manager6/qemu/AudioEdit.js
Normal file
@ -0,0 +1,65 @@
|
||||
Ext.define('PVE.qemu.AudioInputPanel', {
|
||||
extend: 'Proxmox.panel.InputPanel',
|
||||
xtype: 'pveAudioInputPanel',
|
||||
|
||||
onlineHelp: 'qm_audio_device',
|
||||
|
||||
onGetValues: function(values) {
|
||||
var ret = PVE.Parser.printPropertyString(values);
|
||||
if (ret === '') {
|
||||
return {
|
||||
'delete': 'audio0'
|
||||
};
|
||||
}
|
||||
return {
|
||||
audio0: ret
|
||||
};
|
||||
},
|
||||
|
||||
items: [{
|
||||
name: 'device',
|
||||
xtype: 'proxmoxKVComboBox',
|
||||
value: 'ich9-intel-hda',
|
||||
fieldLabel: gettext('Audio Device'),
|
||||
comboItems: [
|
||||
['ich9-intel-hda', 'ich9-intel-hda'],
|
||||
['intel-hda', 'intel-hda'],
|
||||
['AC97', 'AC97']
|
||||
]
|
||||
}, {
|
||||
name: 'driver',
|
||||
xtype: 'displayfield',
|
||||
value: 'spice',
|
||||
submitValue: true,
|
||||
fieldLabel: gettext('Backend Driver'),
|
||||
}]
|
||||
});
|
||||
|
||||
Ext.define('PVE.qemu.AudioEdit', {
|
||||
extend: 'Proxmox.window.Edit',
|
||||
|
||||
vmconfig: undefined,
|
||||
|
||||
subject: gettext('Audio Device'),
|
||||
|
||||
items: [{
|
||||
xtype: 'pveAudioInputPanel'
|
||||
}],
|
||||
|
||||
initComponent : function() {
|
||||
var me = this;
|
||||
|
||||
me.callParent();
|
||||
|
||||
me.load({
|
||||
success: function(response) {
|
||||
me.vmconfig = response.result.data;
|
||||
|
||||
var audio0 = me.vmconfig.audio0;
|
||||
if (audio0) {
|
||||
me.setValues(PVE.Parser.parsePropertyString(audio0));
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
Loading…
Reference in New Issue
Block a user