},
},
data: [
- { release: "octopus", version: "15.2" },
- { release: "pacific", version: "16.2" },
{ release: "quincy", version: "17.2" },
+ { release: "reef", version: "18.2" },
],
},
});
15: 'octopus',
16: 'pacific',
17: 'quincy',
+ 18: 'reef',
+ 19: 'squid',
};
let release = major2release[maxversion[0]] || 'unknown';
let newestVersionTxt = `${Ext.String.capitalize(release)} (${maxversiontext})`;
resizable: false,
nodename: undefined,
+ width: 760, // 4:3
+ height: 570,
+
viewModel: {
data: {
nodename: '',
- cephRelease: 'pacific',
+ cephRelease: 'quincy',
+ cephRepo: 'enterprise',
configuration: true,
isInstalled: false,
+ nodeHasSubscription: true, // avoid warning hint until fully loaded
+ allHaveSubscription: true, // avoid warning hint until fully loaded
+ },
+ formulas: {
+ repoHintHidden: get => get('allHaveSubscription') && get('cephRepo') === 'enterprise',
+ repoHint: function(get) {
+ let repo = get('cephRepo');
+ let nodeSub = get('nodeHasSubscription'), allSub = get('allHaveSubscription');
+
+ if (repo === 'enterprise') {
+ if (!nodeSub) {
+ return gettext('The enterprise repository is enabled, but there is no active subscription!');
+ } else if (!allSub) {
+ return gettext('Not all nodes have an active subscription, which is required for cluster-wide enterprise repo access');
+ }
+ return ''; // should be hidden
+ } else if (repo === 'no-subscription') {
+ return allSub
+ ? gettext("Cluster has active subscriptions and would be elligible for using the enterprise repository.")
+ : gettext("The no-subscription repository is not the best choice for production setups.");
+ } else {
+ return gettext('The test repository should only be used for test setups or after consulting the official Proxmox support!');
+ }
+ },
},
},
cbindData: {
tp.setActiveTab(initialTab);
},
onShow: function() {
- this.callParent(arguments);
- var isInstalled = this.getViewModel().get('isInstalled');
- if (isInstalled) {
- this.getViewModel().set('configuration', false);
- this.setInitialTab(2);
- }
+ this.callParent(arguments);
+ let viewModel = this.getViewModel();
+ var isInstalled = this.getViewModel().get('isInstalled');
+ if (isInstalled) {
+ viewModel.set('configuration', false);
+ this.setInitialTab(2);
+ }
+
+ PVE.Utils.getClusterSubscriptionLevel().then(subcriptionMap => {
+ viewModel.set('nodeHasSubscription', !!subcriptionMap[this.nodename]);
+
+ let allHaveSubscription = Object.values(subcriptionMap).every(level => !!level);
+ viewModel.set('allHaveSubscription', allHaveSubscription);
+ });
},
items: [
{
{
flex: 1,
},
+ {
+ xtype: 'displayfield',
+ fieldLabel: gettext('Hint'),
+ labelClsExtra: 'pmx-hint',
+ submitValue: false,
+ labelWidth: 50,
+ bind: {
+ value: '{repoHint}',
+ hidden: '{repoHintHidden}',
+ },
+ },
{
xtype: 'pveCephHighestVersionDisplay',
- labelWidth: 180,
+ labelWidth: 150,
cbind: {
nodename: '{nodename}',
},
},
},
{
- 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: {
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',
},