ui: rbd: cephfs: add keyring/secret field for external clusters

Manual switching of xtype because binding 'hidden' does not work with
pmxDisplayEditField.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
This commit is contained in:
Aaron Lauterer 2022-01-26 11:18:42 +01:00 committed by Fabian Ebner
parent 85df37251f
commit 42c455fcd7
2 changed files with 37 additions and 13 deletions

View File

@ -101,20 +101,33 @@ Ext.define('PVE.storage.CephFSInputPanel', {
}, },
]; ];
me.columnB = [{ me.columnB = [
xtype: 'proxmoxcheckbox', {
name: 'pveceph', xtype: me.isCreate ? 'textfield' : 'displayfield',
reference: 'pvecephRef', name: 'keyring',
bind: { fieldLabel: 'Secret',
disabled: '{!pvecephPossible}', value: me.isCreate ? '' : '***********',
value: '{pveceph}', allowBlank: false,
bind: {
hidden: '{pveceph}',
disabled: '{pveceph}',
},
}, },
checked: true, {
uncheckedValue: 0, xtype: 'proxmoxcheckbox',
submitValue: false, name: 'pveceph',
hidden: !me.isCreate, reference: 'pvecephRef',
boxLabel: gettext('Use Proxmox VE managed hyper-converged cephFS'), bind: {
}]; disabled: '{!pvecephPossible}',
value: '{pveceph}',
},
checked: true,
uncheckedValue: 0,
submitValue: false,
hidden: !me.isCreate,
boxLabel: gettext('Use Proxmox VE managed hyper-converged cephFS'),
},
];
me.callParent(); me.callParent();
}, },

View File

@ -201,6 +201,17 @@ Ext.define('PVE.storage.RBDInputPanel', {
]; ];
me.columnB = [ me.columnB = [
{
xtype: me.isCreate ? 'textarea' : 'displayfield',
name: 'keyring',
fieldLabel: 'Keyring',
value: me.isCreate ? '' : '***********',
allowBlank: false,
bind: {
hidden: '{pveceph}',
disabled: '{pveceph}',
},
},
{ {
xtype: 'proxmoxcheckbox', xtype: 'proxmoxcheckbox',
name: 'pveceph', name: 'pveceph',