[pve-devel] [PATCH manager v7 02/14] ui: parser: add helper for lists of property strings
Dominik Csapak
d.csapak at proxmox.com
Fri Jun 16 15:05:29 CEST 2023
namely the filtering while preserving the original string,
it's just one line, but having a shorthand for it still makes it a bit
nicer
Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
www/manager6/Parser.js | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/www/manager6/Parser.js b/www/manager6/Parser.js
index c3772d3b..bc6a4338 100644
--- a/www/manager6/Parser.js
+++ b/www/manager6/Parser.js
@@ -604,5 +604,9 @@ Ext.define('PVE.Parser', {
});
return [res, extradata];
},
+
+ filterPropertyStringList: function(list, filterFn, defaultKey) {
+ return list.filter((entry) => filterFn(PVE.Parser.parsePropertyString(entry, defaultKey)));
+ },
},
});
--
2.30.2
More information about the pve-devel
mailing list