pve-manager/www/manager6/form/ScsiHwSelector.js
Dominik Csapak f2782813cd ext6migrate: fix model behaviour for KVComboBox
we used an empty value for the Key-Value ComboBox for defaults.
With extjs6, if the idProperty of a model is empty, they generate
a name for it, which breaks our logic for submitting
(currently we checked if this is empty, and send a delete command
to our api)
instead, we use the value 'default' and check for it when we submit

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-02-29 15:27:15 +01:00

21 lines
628 B
JavaScript

Ext.define('PVE.form.ScsiHwSelector', {
extend: 'PVE.form.KVComboBox',
alias: ['widget.pveScsiHwSelector'],
initComponent: function() {
var me = this;
me.data = [
['__default__', PVE.Utils.render_scsihw('')],
['lsi', PVE.Utils.render_scsihw('lsi')],
['lsi53c810', PVE.Utils.render_scsihw('lsi53c810')],
['megasas', PVE.Utils.render_scsihw('megasas')],
['virtio-scsi-pci', PVE.Utils.render_scsihw('virtio-scsi-pci')],
['virtio-scsi-single', PVE.Utils.render_scsihw('virtio-scsi-single')],
['pvscsi', PVE.Utils.render_scsihw('pvscsi')]
];
me.callParent();
}
});