Commit c8abee0d authored by Dietmar Maurer's avatar Dietmar Maurer

add SATA to GUI

parent e6bbc6d4
......@@ -9,7 +9,7 @@ Ext.define('PVE.form.BusTypeSelector', {
initComponent: function() {
var me = this;
me.data = [['ide', 'IDE']];
me.data = [['ide', 'IDE'], ['sata', 'SATA']];
if (!me.noVirtIO) {
me.data.push(['virtio', 'VIRTIO']);
......
......@@ -5,6 +5,7 @@ Ext.define('PVE.form.ControllerSelector', {
statics: {
maxIds: {
ide: 3,
sata: 5,
virtio: 15,
scsi: 13
}
......@@ -21,16 +22,16 @@ Ext.define('PVE.form.ControllerSelector', {
me.vmconfig = Ext.apply({}, vmconfig);
if (autoSelect) {
var clist = ['ide', 'virtio', 'scsi'];
var clist = ['ide', 'virtio', 'scsi', 'sata'];
if (autoSelect === 'cdrom') {
clist = ['ide', 'scsi'];
clist = ['ide', 'scsi', 'sata'];
if (!Ext.isDefined(me.vmconfig.ide2)) {
me.down('field[name=controller]').setValue('ide');
me.down('field[name=deviceid]').setValue(2);
return;
}
} else if (me.vmconfig.ostype === 'l26') {
clist = ['virtio', 'ide', 'scsi'];
clist = ['virtio', 'ide', 'scsi', 'sata'];
}
Ext.Array.each(clist, function(controller) {
......
......@@ -60,7 +60,7 @@ Ext.define('PVE.qemu.BootOrderPanel', {
if (sel1 !== 'c' && (sel2 !== 'c')) {
Ext.Object.each(me.vmconfig, function(key, value) {
if ((/^(ide|scsi|virtio)\d+$/).test(key) &&
if ((/^(ide|sata|scsi|virtio)\d+$/).test(key) &&
!(/media=cdrom/).test(value)) {
list.push([key, "Disk '" + key + "'"]);
}
......@@ -135,7 +135,7 @@ Ext.define('PVE.qemu.BootOrderPanel', {
});
me.mon(me.kv1, 'change', function(t, value) {
if ((/^(ide|scsi|virtio)\d+$/).test(value)) {
if ((/^(ide|sata|scsi|virtio)\d+$/).test(value)) {
me.curSel1 = 'c';
me.bootdisk = value;
} else {
......@@ -145,7 +145,7 @@ Ext.define('PVE.qemu.BootOrderPanel', {
});
me.mon(me.kv2, 'change', function(t, value) {
if ((/^(ide|scsi|virtio)\d+$/).test(value)) {
if ((/^(ide|sata|scsi|virtio)\d+$/).test(value)) {
me.curSel2 = 'c';
me.bootdisk = value;
} else {
......@@ -155,7 +155,7 @@ Ext.define('PVE.qemu.BootOrderPanel', {
});
me.mon(me.kv3, 'change', function(t, value) {
if ((/^(ide|scsi|virtio)\d+$/).test(value)) {
if ((/^(ide|sata|scsi|virtio)\d+$/).test(value)) {
me.curSel3 = 'c';
me.bootdisk = value;
} else {
......
......@@ -105,6 +105,17 @@ Ext.define('PVE.qemu.HardwareView', {
cdheader: gettext('CD/DVD Drive') + ' (' + confid +')'
};
}
for (i = 0; i < 6; i++) {
confid = "sata" + i;
rows[confid] = {
group: 1,
tdCls: 'pve-itype-icon-storage',
editor: 'PVE.qemu.HDEdit',
never_delete: caps.vms['VM.Config.Disk'] ? false : true,
header: gettext('Hard Disk') + ' (' + confid +')',
cdheader: gettext('CD/DVD Drive') + ' (' + confid +')'
};
}
for (i = 0; i < 16; i++) {
confid = "scsi" + i;
rows[confid] = {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment