[pve-devel] [PATCH manager] fix #2058: show correct pool for external ceph clusters
Dominik Csapak
d.csapak at proxmox.com
Fri Jan 18 14:09:28 CET 2019
instead of having two inputfields and displayfields (where only one gets the
correct value), have two inputfileds but one displayfield when we need it
Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
www/manager6/storage/RBDEdit.js | 28 ++++++++++++++++++++--------
1 file changed, 20 insertions(+), 8 deletions(-)
diff --git a/www/manager6/storage/RBDEdit.js b/www/manager6/storage/RBDEdit.js
index d44a1e9f..33ffcbdc 100644
--- a/www/manager6/storage/RBDEdit.js
+++ b/www/manager6/storage/RBDEdit.js
@@ -100,9 +100,11 @@ Ext.define('PVE.storage.RBDInputPanel', {
}
me.type = 'rbd';
- me.column1 = [
- {
- xtype: me.isCreate ? 'pveCephPoolSelector' : 'displayfield',
+ me.column1 = [];
+
+ if (me.isCreate) {
+ me.column1.push({
+ xtype: 'pveCephPoolSelector',
nodename: me.nodename,
name: 'pool',
bind: {
@@ -112,9 +114,8 @@ Ext.define('PVE.storage.RBDInputPanel', {
},
fieldLabel: gettext('Pool'),
allowBlank: false
- },
- {
- xtype: me.isCreate ? 'textfield' : 'displayfield',
+ },{
+ xtype: 'textfield',
name: 'pool',
value: 'rbd',
bind: {
@@ -124,7 +125,18 @@ Ext.define('PVE.storage.RBDInputPanel', {
},
fieldLabel: gettext('Pool'),
allowBlank: false
- },
+ });
+ } else {
+ me.column1.push({
+ xtype: 'displayfield',
+ nodename: me.nodename,
+ name: 'pool',
+ fieldLabel: gettext('Pool'),
+ allowBlank: false
+ });
+ }
+
+ me.column1.push(
{
xtype: 'textfield',
name: 'monhost',
@@ -159,7 +171,7 @@ Ext.define('PVE.storage.RBDInputPanel', {
fieldLabel: gettext('User name'),
allowBlank: true
}
- ];
+ );
me.column2 = [
{
--
2.11.0
More information about the pve-devel
mailing list