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') {
|
if (Proxmox.UserName === 'root@pam') {
|
||||||
container.el.mask();
|
container.el.mask();
|
||||||
if (!container.down('pveCephInstallWindow')){
|
if (!container.down('pveCephInstallWindow')){
|
||||||
|
var isInstalled = msg.match(/not initialized/i) ? true : false;
|
||||||
var win = Ext.create('PVE.ceph.Install', {
|
var win = Ext.create('PVE.ceph.Install', {
|
||||||
nodename: nodename
|
nodename: nodename
|
||||||
});
|
});
|
||||||
|
win.getViewModel().set('isInstalled', isInstalled);
|
||||||
container.add(win);
|
container.add(win);
|
||||||
win.show();
|
win.show();
|
||||||
callback(win);
|
callback(win);
|
||||||
|
@ -8,13 +8,14 @@ Ext.define('PVE.ceph.CephInstallWizard', {
|
|||||||
viewModel: {
|
viewModel: {
|
||||||
data: {
|
data: {
|
||||||
nodename: '',
|
nodename: '',
|
||||||
configuration: true
|
configuration: true,
|
||||||
|
isInstalled: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
cbindData: {
|
cbindData: {
|
||||||
nodename: undefined
|
nodename: undefined
|
||||||
},
|
},
|
||||||
title: gettext('Installation'),
|
title: gettext('Setup'),
|
||||||
navigateNext: function() {
|
navigateNext: function() {
|
||||||
var tp = this.down('#wizcontent');
|
var tp = this.down('#wizcontent');
|
||||||
var atab = tp.getActiveTab();
|
var atab = tp.getActiveTab();
|
||||||
@ -63,10 +64,15 @@ Ext.define('PVE.ceph.CephInstallWizard', {
|
|||||||
cbind:{
|
cbind:{
|
||||||
nodename: '{nodename}'
|
nodename: '{nodename}'
|
||||||
},
|
},
|
||||||
|
viewModel: {}, // needed to inherit parent viewModel data
|
||||||
listeners: {
|
listeners: {
|
||||||
afterrender: function() {
|
afterrender: function() {
|
||||||
var me = this;
|
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() {
|
activate: function() {
|
||||||
var me = this;
|
var me = this;
|
||||||
|
@ -22,20 +22,36 @@ Ext.define('PVE.ceph.Install', {
|
|||||||
type: 'vbox'
|
type: 'vbox'
|
||||||
},
|
},
|
||||||
viewModel: {
|
viewModel: {
|
||||||
parent: null,
|
|
||||||
data: {
|
data: {
|
||||||
cephVersion: 'luminous'
|
cephVersion: 'luminous',
|
||||||
|
isInstalled: false
|
||||||
},
|
},
|
||||||
formulas: {
|
formulas: {
|
||||||
buttonText: function (get){
|
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: [
|
items: [
|
||||||
{
|
{
|
||||||
html: '<p class="install-mask">' + Ext.String.format(gettext('{0} is not installed on this node.'), 'Ceph') + '<br>' +
|
bind: {
|
||||||
gettext('Would you like to install it now?') + '</p>',
|
html: '{windowText}'
|
||||||
|
},
|
||||||
border: false,
|
border: false,
|
||||||
padding: 5,
|
padding: 5,
|
||||||
bodyCls: 'install-mask'
|
bodyCls: 'install-mask'
|
||||||
@ -46,6 +62,7 @@ Ext.define('PVE.ceph.Install', {
|
|||||||
bind: {
|
bind: {
|
||||||
text: '{buttonText}'
|
text: '{buttonText}'
|
||||||
},
|
},
|
||||||
|
viewModel: {},
|
||||||
cbind: {
|
cbind: {
|
||||||
nodename: '{nodename}'
|
nodename: '{nodename}'
|
||||||
},
|
},
|
||||||
@ -54,6 +71,7 @@ Ext.define('PVE.ceph.Install', {
|
|||||||
var win = Ext.create('PVE.ceph.CephInstallWizard',{
|
var win = Ext.create('PVE.ceph.CephInstallWizard',{
|
||||||
nodename: me.nodename
|
nodename: me.nodename
|
||||||
});
|
});
|
||||||
|
win.getViewModel().set('isInstalled', this.getViewModel().get('isInstalled'));
|
||||||
win.show();
|
win.show();
|
||||||
me.mon(win,'beforeClose', function(){
|
me.mon(win,'beforeClose', function(){
|
||||||
me.fireEvent("cephInstallWindowClosed");
|
me.fireEvent("cephInstallWindowClosed");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user