[pve-devel] [PATCH manager 2/4] ui: pool create: allow selecting parent pool via selector
Dominik Csapak
d.csapak at proxmox.com
Thu Jan 22 14:58:32 CET 2026
instead of having to type out the full path, e.g. 'foo/bar/baz',
show a 'pool selector' to select the parent pool.
This makes creating nested pools more obvious and easier.
Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
www/manager6/dc/PoolEdit.js | 48 +++++++++++++++++++++++++++----------
1 file changed, 35 insertions(+), 13 deletions(-)
diff --git a/www/manager6/dc/PoolEdit.js b/www/manager6/dc/PoolEdit.js
index 72a084ac..325f649b 100644
--- a/www/manager6/dc/PoolEdit.js
+++ b/www/manager6/dc/PoolEdit.js
@@ -17,20 +17,42 @@ Ext.define('PVE.dc.PoolEdit', {
items: [
{
- xtype: 'pmxDisplayEditField',
- fieldLabel: gettext('Name'),
- cbind: {
- editable: '{isCreate}',
- value: '{poolid}',
+ xtype: 'inputpanel',
+ onGetValues: function (values) {
+ if (values.parentPool) {
+ values.poolid = values.parentPool + '/' + values.poolid;
+ delete values.parentPool;
+ }
+ return values;
},
- name: 'poolid',
- allowBlank: false,
- },
- {
- xtype: 'textfield',
- fieldLabel: gettext('Comment'),
- name: 'comment',
- allowBlank: true,
+ items: [
+ {
+ xtype: 'pmxDisplayEditField',
+ fieldLabel: gettext('Name'),
+ cbind: {
+ editable: '{isCreate}',
+ value: '{poolid}',
+ },
+ name: 'poolid',
+ allowBlank: false,
+ },
+ {
+ xtype: 'pvePoolSelector',
+ name: 'parentPool',
+ fieldLabel: gettext('Parent Pool'),
+ allowBlank: true,
+ cbind: {
+ disabled: '{!isCreate}',
+ hidden: '{!isCreate}',
+ },
+ },
+ {
+ xtype: 'textfield',
+ fieldLabel: gettext('Comment'),
+ name: 'comment',
+ allowBlank: true,
+ },
+ ],
},
],
--
2.47.3
More information about the pve-devel
mailing list