mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-10-05 03:15:31 +00:00
ui: utils: add nextFreeMP
Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com> Reviewed-by: Fabian Ebner <f.ebner@proxmox.com>
This commit is contained in:
parent
5747fef3d9
commit
000b5537fc
@ -1800,6 +1800,21 @@ Ext.define('PVE.Utils', {
|
|||||||
|
|
||||||
return undefined;
|
return undefined;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
nextFreeMP: function(type, config) {
|
||||||
|
for (let i = 0; i < PVE.Utils.mp_counts[type]; i++) {
|
||||||
|
let confid = `${type}${i}`;
|
||||||
|
if (!Ext.isDefined(config[confid])) {
|
||||||
|
return {
|
||||||
|
type,
|
||||||
|
id: i,
|
||||||
|
confid,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return undefined;
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
singleton: true,
|
singleton: true,
|
||||||
|
Loading…
Reference in New Issue
Block a user