ui: ceph install wizard: allow selecting repository

provide a second combo box that allows one to select which specific
repository out of enterprise, no-subscription or test one would like
to use.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2023-06-05 18:02:41 +02:00
parent 35ff09a46e
commit b686fd3774

View File

@ -146,6 +146,7 @@ Ext.define('PVE.ceph.CephInstallWizard', {
data: { data: {
nodename: '', nodename: '',
cephRelease: 'quincy', cephRelease: 'quincy',
cephRepo: 'enterprise',
configuration: true, configuration: true,
isInstalled: false, isInstalled: false,
}, },
@ -205,7 +206,7 @@ Ext.define('PVE.ceph.CephInstallWizard', {
}, },
{ {
xtype: 'pveCephHighestVersionDisplay', xtype: 'pveCephHighestVersionDisplay',
labelWidth: 180, labelWidth: 150,
cbind: { cbind: {
nodename: '{nodename}', nodename: '{nodename}',
}, },
@ -218,20 +219,46 @@ Ext.define('PVE.ceph.CephInstallWizard', {
}, },
}, },
{ {
xtype: 'pveCephVersionSelector', xtype: 'container',
labelWidth: 180, layout: 'hbox',
submitValue: false, defaults: {
bind: { border: false,
value: '{cephRelease}', layout: 'anchor',
flex: 1,
}, },
listeners: { items: [{
change: function(field, release) { xtype: 'pveCephVersionSelector',
let wizard = this.up('pveCephInstallWizard'); labelWidth: 150,
wizard.down('#next').setText( padding: '0 10 0 0',
Ext.String.format(gettext('Start {0} installation'), release), submitValue: false,
); bind: {
value: '{cephRelease}',
},
listeners: {
change: function(field, release) {
let wizard = this.up('pveCephInstallWizard');
wizard.down('#next').setText(
Ext.String.format(gettext('Start {0} installation'), release),
);
},
}, },
}, },
{
xtype: 'proxmoxKVComboBox',
fieldLabel: gettext('Repository'),
padding: '0 0 0 10',
comboItems: [
['enterprise', gettext('Enterprise (recommended)')],
['no-subscription', gettext('No-Subscription')],
['test', gettext('Test')],
],
labelWidth: 150,
submitValue: false,
value: 'enterprise',
bind: {
value: '{cephRepo}',
},
}],
}, },
], ],
listeners: { listeners: {
@ -323,7 +350,8 @@ Ext.define('PVE.ceph.CephInstallWizard', {
let me = this; let me = this;
let wizard = me.up('pveCephInstallWizard'); let wizard = me.up('pveCephInstallWizard');
let release = wizard.getViewModel().get('cephRelease'); let release = wizard.getViewModel().get('cephRelease');
me.cmdOpts = `--version\0${release}`; let repo = wizard.getViewModel().get('cephRepo');
me.cmdOpts = `--version\0${release}\0--repository\0${repo}`;
}, },
cmd: 'ceph_install', cmd: 'ceph_install',
}, },