From b686fd3774d87ca1e47fb841544a33cc3dad1ba4 Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Mon, 5 Jun 2023 18:02:41 +0200 Subject: [PATCH] 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 --- www/manager6/ceph/CephInstallWizard.js | 54 +++++++++++++++++++------- 1 file changed, 41 insertions(+), 13 deletions(-) diff --git a/www/manager6/ceph/CephInstallWizard.js b/www/manager6/ceph/CephInstallWizard.js index cbe9cca0..2a7bb381 100644 --- a/www/manager6/ceph/CephInstallWizard.js +++ b/www/manager6/ceph/CephInstallWizard.js @@ -146,6 +146,7 @@ Ext.define('PVE.ceph.CephInstallWizard', { data: { nodename: '', cephRelease: 'quincy', + cephRepo: 'enterprise', configuration: true, isInstalled: false, }, @@ -205,7 +206,7 @@ Ext.define('PVE.ceph.CephInstallWizard', { }, { xtype: 'pveCephHighestVersionDisplay', - labelWidth: 180, + labelWidth: 150, cbind: { nodename: '{nodename}', }, @@ -218,20 +219,46 @@ Ext.define('PVE.ceph.CephInstallWizard', { }, }, { - xtype: 'pveCephVersionSelector', - labelWidth: 180, - submitValue: false, - bind: { - value: '{cephRelease}', + xtype: 'container', + layout: 'hbox', + defaults: { + border: false, + layout: 'anchor', + flex: 1, }, - listeners: { - change: function(field, release) { - let wizard = this.up('pveCephInstallWizard'); - wizard.down('#next').setText( - Ext.String.format(gettext('Start {0} installation'), release), - ); + items: [{ + xtype: 'pveCephVersionSelector', + labelWidth: 150, + padding: '0 10 0 0', + 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: { @@ -323,7 +350,8 @@ Ext.define('PVE.ceph.CephInstallWizard', { let me = this; let wizard = me.up('pveCephInstallWizard'); 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', },