mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-07-26 06:29:35 +00:00
ui: ceph installer: make replicas & minreplicas fields dependent
Signed-off-by: Tim Marx <t.marx@proxmox.com>
This commit is contained in:
parent
443cb6d78c
commit
836d66f704
@ -124,6 +124,12 @@ Ext.define('PVE.ceph.CephInstallWizard', {
|
|||||||
cbind: {
|
cbind: {
|
||||||
nodename: '{nodename}'
|
nodename: '{nodename}'
|
||||||
},
|
},
|
||||||
|
viewModel: {
|
||||||
|
data: {
|
||||||
|
replicas: undefined,
|
||||||
|
minreplicas: undefined
|
||||||
|
}
|
||||||
|
},
|
||||||
listeners: {
|
listeners: {
|
||||||
activate: function() {
|
activate: function() {
|
||||||
this.up('pveCephInstallWizard').down('#submit').setText(gettext('Next'));
|
this.up('pveCephInstallWizard').down('#submit').setText(gettext('Next'));
|
||||||
@ -164,21 +170,33 @@ Ext.define('PVE.ceph.CephInstallWizard', {
|
|||||||
xtype: 'numberfield',
|
xtype: 'numberfield',
|
||||||
name: 'size',
|
name: 'size',
|
||||||
fieldLabel: 'Number of replicas',
|
fieldLabel: 'Number of replicas',
|
||||||
value: '',
|
bind: {
|
||||||
|
value: '{replicas}',
|
||||||
|
allowBlank : '{!minreplicas}'
|
||||||
|
},
|
||||||
maxValue: 7,
|
maxValue: 7,
|
||||||
minValue: 1,
|
minValue: 1,
|
||||||
allowBlank: true,
|
emptyText: '3',
|
||||||
emptyText: '3'
|
setAllowBlank: function(allowBlank) {
|
||||||
|
this.allowBlank = allowBlank;
|
||||||
|
this.validate();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
xtype: 'numberfield',
|
xtype: 'numberfield',
|
||||||
name: 'min_size',
|
name: 'min_size',
|
||||||
fieldLabel: 'Minimum replicas',
|
fieldLabel: 'Minimum replicas',
|
||||||
value: '',
|
bind: {
|
||||||
maxValue: 7,
|
maxValue: '{replicas}',
|
||||||
|
value: '{minreplicas}',
|
||||||
|
allowBlank: '{!replicas}'
|
||||||
|
},
|
||||||
minValue: 1,
|
minValue: 1,
|
||||||
allowBlank: true,
|
emptyText: '2',
|
||||||
emptyText: '2'
|
setAllowBlank: function(allowBlank) {
|
||||||
|
this.allowBlank = allowBlank;
|
||||||
|
this.validate();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
xtype: 'numberfield',
|
xtype: 'numberfield',
|
||||||
|
Loading…
Reference in New Issue
Block a user