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', { ...@@ -9,7 +9,7 @@ Ext.define('PVE.form.BusTypeSelector', {
initComponent: function() { initComponent: function() {
var me = this; var me = this;
me.data = [['ide', 'IDE']]; me.data = [['ide', 'IDE'], ['sata', 'SATA']];
if (!me.noVirtIO) { if (!me.noVirtIO) {
me.data.push(['virtio', 'VIRTIO']); me.data.push(['virtio', 'VIRTIO']);
......
...@@ -5,6 +5,7 @@ Ext.define('PVE.form.ControllerSelector', { ...@@ -5,6 +5,7 @@ Ext.define('PVE.form.ControllerSelector', {
statics: { statics: {
maxIds: { maxIds: {
ide: 3, ide: 3,
sata: 5,
virtio: 15, virtio: 15,
scsi: 13 scsi: 13
} }
...@@ -21,16 +22,16 @@ Ext.define('PVE.form.ControllerSelector', { ...@@ -21,16 +22,16 @@ Ext.define('PVE.form.ControllerSelector', {
me.vmconfig = Ext.apply({}, vmconfig); me.vmconfig = Ext.apply({}, vmconfig);
if (autoSelect) { if (autoSelect) {
var clist = ['ide', 'virtio', 'scsi']; var clist = ['ide', 'virtio', 'scsi', 'sata'];
if (autoSelect === 'cdrom') { if (autoSelect === 'cdrom') {
clist = ['ide', 'scsi']; clist = ['ide', 'scsi', 'sata'];
if (!Ext.isDefined(me.vmconfig.ide2)) { if (!Ext.isDefined(me.vmconfig.ide2)) {
me.down('field[name=controller]').setValue('ide'); me.down('field[name=controller]').setValue('ide');
me.down('field[name=deviceid]').setValue(2); me.down('field[name=deviceid]').setValue(2);
return; return;
} }
} else if (me.vmconfig.ostype === 'l26') { } else if (me.vmconfig.ostype === 'l26') {
clist = ['virtio', 'ide', 'scsi']; clist = ['virtio', 'ide', 'scsi', 'sata'];
} }
Ext.Array.each(clist, function(controller) { Ext.Array.each(clist, function(controller) {
......
...@@ -60,7 +60,7 @@ Ext.define('PVE.qemu.BootOrderPanel', { ...@@ -60,7 +60,7 @@ Ext.define('PVE.qemu.BootOrderPanel', {
if (sel1 !== 'c' && (sel2 !== 'c')) { if (sel1 !== 'c' && (sel2 !== 'c')) {
Ext.Object.each(me.vmconfig, function(key, value) { 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)) { !(/media=cdrom/).test(value)) {
list.push([key, "Disk '" + key + "'"]); list.push([key, "Disk '" + key + "'"]);
} }
...@@ -135,7 +135,7 @@ Ext.define('PVE.qemu.BootOrderPanel', { ...@@ -135,7 +135,7 @@ Ext.define('PVE.qemu.BootOrderPanel', {
}); });
me.mon(me.kv1, 'change', function(t, value) { 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.curSel1 = 'c';
me.bootdisk = value; me.bootdisk = value;
} else { } else {
...@@ -145,7 +145,7 @@ Ext.define('PVE.qemu.BootOrderPanel', { ...@@ -145,7 +145,7 @@ Ext.define('PVE.qemu.BootOrderPanel', {
}); });
me.mon(me.kv2, 'change', function(t, value) { 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.curSel2 = 'c';
me.bootdisk = value; me.bootdisk = value;
} else { } else {
...@@ -155,7 +155,7 @@ Ext.define('PVE.qemu.BootOrderPanel', { ...@@ -155,7 +155,7 @@ Ext.define('PVE.qemu.BootOrderPanel', {
}); });
me.mon(me.kv3, 'change', function(t, value) { 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.curSel3 = 'c';
me.bootdisk = value; me.bootdisk = value;
} else { } else {
......
...@@ -105,6 +105,17 @@ Ext.define('PVE.qemu.HardwareView', { ...@@ -105,6 +105,17 @@ Ext.define('PVE.qemu.HardwareView', {
cdheader: gettext('CD/DVD Drive') + ' (' + confid +')' 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++) { for (i = 0; i < 16; i++) {
confid = "scsi" + i; confid = "scsi" + i;
rows[confid] = { 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