forEachLxcMP: function(func, includeUnused) {
for (let i = 0; i < PVE.Utils.lxc_mp_counts.mp; i++) {
- let cont = func('mp', i);
+ let cont = func('mp', i, `mp${i}`);
if (!cont && cont !== undefined) {
return;
}
}
for (let i = 0; i < PVE.Utils.lxc_mp_counts.unused; i++) {
- let cont = func('unused', i);
+ let cont = func('unused', i, `unused${i}`);
if (!cont && cont !== undefined) {
return;
}
forEachLxcDev: function(func) {
for (let i = 0; i < PVE.Utils.lxc_dev_count; i++) {
- let cont = func(i);
+ let cont = func(i, `dev${i}`);
if (!cont && cont !== undefined) {
return;
}
me.vmconfig = vmconfig;
if (me.isCreate) {
- PVE.Utils.forEachLxcDev((i) => {
- let name = "dev" + i.toString();
+ PVE.Utils.forEachLxcDev((i, name) => {
if (!Ext.isDefined(vmconfig[name])) {
me.confid = name;
me.down('field[name=devid]').setValue(i);
let me = this;
me.updateVMConfig(vmconfig);
- PVE.Utils.forEachLxcMP((bus, i) => {
- let name = "mp" + i.toString();
+ PVE.Utils.forEachLxcMP((bus, i, name) => {
if (!Ext.isDefined(vmconfig[name])) {
me.down('field[name=mpid]').setValue(i);
return false;
initComponent: function() {
var me = this;
- let confid;
var nodename = me.pveSelNode.data.node;
if (!nodename) {
},
};
- PVE.Utils.forEachLxcMP(function(bus, i) {
- confid = bus + i;
+ PVE.Utils.forEachLxcMP(function(bus, i, confid) {
var group = 5;
var header;
if (bus === 'mp') {
let deveditor = Proxmox.UserName === 'root@pam' ? 'PVE.lxc.DeviceEdit' : undefined;
- PVE.Utils.forEachLxcDev(function(i) {
- confid = 'dev' + i;
+ PVE.Utils.forEachLxcDev(function(i, confid) {
rows[confid] = {
group: 7,
order: i,