ui: ceph: differentiate between install & configure only
Signed-off-by: Tim Marx <t.marx@proxmox.com>
This commit is contained in:
parent
b14d9045b5
commit
b8f48f8a15
@ -1138,9 +1138,11 @@ Ext.define('PVE.Utils', { utilities: {
|
||||
if (Proxmox.UserName === 'root@pam') {
|
||||
container.el.mask();
|
||||
if (!container.down('pveCephInstallWindow')){
|
||||
var isInstalled = msg.match(/not initialized/i) ? true : false;
|
||||
var win = Ext.create('PVE.ceph.Install', {
|
||||
nodename: nodename
|
||||
});
|
||||
win.getViewModel().set('isInstalled', isInstalled);
|
||||
container.add(win);
|
||||
win.show();
|
||||
callback(win);
|
||||
|
@ -8,13 +8,14 @@ Ext.define('PVE.ceph.CephInstallWizard', {
|
||||
viewModel: {
|
||||
data: {
|
||||
nodename: '',
|
||||
configuration: true
|
||||
configuration: true,
|
||||
isInstalled: false
|
||||
}
|
||||
},
|
||||
cbindData: {
|
||||
nodename: undefined
|
||||
},
|
||||
title: gettext('Installation'),
|
||||
title: gettext('Setup'),
|
||||
navigateNext: function() {
|
||||
var tp = this.down('#wizcontent');
|
||||
var atab = tp.getActiveTab();
|
||||
@ -63,10 +64,15 @@ Ext.define('PVE.ceph.CephInstallWizard', {
|
||||
cbind:{
|
||||
nodename: '{nodename}'
|
||||
},
|
||||
viewModel: {}, // needed to inherit parent viewModel data
|
||||
listeners: {
|
||||
afterrender: function() {
|
||||
var me = this;
|
||||
me.down('pveNoVncConsole').fireEvent('activate');
|
||||
if (this.getViewModel().get('isInstalled')) {
|
||||
this.mask("Ceph is already installed, click next to create your configuration.",['pve-static-mask']);
|
||||
} else {
|
||||
me.down('pveNoVncConsole').fireEvent('activate');
|
||||
}
|
||||
},
|
||||
activate: function() {
|
||||
var me = this;
|
||||
|
@ -22,20 +22,36 @@ Ext.define('PVE.ceph.Install', {
|
||||
type: 'vbox'
|
||||
},
|
||||
viewModel: {
|
||||
parent: null,
|
||||
data: {
|
||||
cephVersion: 'luminous'
|
||||
cephVersion: 'luminous',
|
||||
isInstalled: false
|
||||
},
|
||||
formulas: {
|
||||
buttonText: function (get){
|
||||
return gettext('Install Ceph-') + get('cephVersion');
|
||||
if (get('isInstalled')) {
|
||||
return gettext('Configure Ceph');
|
||||
} else {
|
||||
return gettext('Install Ceph-') + get('cephVersion');
|
||||
}
|
||||
},
|
||||
windowText: function (get) {
|
||||
if (get('isInstalled')) {
|
||||
return '<p class="install-mask">' +
|
||||
Ext.String.format(gettext('{0} is not initialized.'), 'Ceph') + ' '+
|
||||
gettext('You need to create a initial config once.') + '</p>';
|
||||
} else {
|
||||
return '<p class="install-mask">' +
|
||||
Ext.String.format(gettext('{0} is not installed on this node.'), 'Ceph') + '<br>' +
|
||||
gettext('Would you like to install it now?') + '</p>';
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
items: [
|
||||
{
|
||||
html: '<p class="install-mask">' + Ext.String.format(gettext('{0} is not installed on this node.'), 'Ceph') + '<br>' +
|
||||
gettext('Would you like to install it now?') + '</p>',
|
||||
bind: {
|
||||
html: '{windowText}'
|
||||
},
|
||||
border: false,
|
||||
padding: 5,
|
||||
bodyCls: 'install-mask'
|
||||
@ -46,6 +62,7 @@ Ext.define('PVE.ceph.Install', {
|
||||
bind: {
|
||||
text: '{buttonText}'
|
||||
},
|
||||
viewModel: {},
|
||||
cbind: {
|
||||
nodename: '{nodename}'
|
||||
},
|
||||
@ -54,6 +71,7 @@ Ext.define('PVE.ceph.Install', {
|
||||
var win = Ext.create('PVE.ceph.CephInstallWizard',{
|
||||
nodename: me.nodename
|
||||
});
|
||||
win.getViewModel().set('isInstalled', this.getViewModel().get('isInstalled'));
|
||||
win.show();
|
||||
me.mon(win,'beforeClose', function(){
|
||||
me.fireEvent("cephInstallWindowClosed");
|
||||
|
Loading…
x
Reference in New Issue
Block a user