[pve-devel] [PATCH v5 manager 2/5] ui: utils: add nextFreeMP
Aaron Lauterer
a.lauterer at proxmox.com
Fri Mar 25 15:00:14 CET 2022
Signed-off-by: Aaron Lauterer <a.lauterer at proxmox.com>
---
www/manager6/Utils.js | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/www/manager6/Utils.js b/www/manager6/Utils.js
index 34cf49b3..519faac5 100644
--- a/www/manager6/Utils.js
+++ b/www/manager6/Utils.js
@@ -1803,6 +1803,21 @@ Ext.define('PVE.Utils', {
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,
--
2.30.2
More information about the pve-devel
mailing list