layout: {
align: 'stretch',
pack: 'center',
- type: 'vbox'
+ type: 'vbox',
},
viewModel: {
data: {
- cephVersion: 'nautilus',
- isInstalled: false
+ isInstalled: false,
},
formulas: {
- buttonText: function (get){
+ buttonText: function(get) {
if (get('isInstalled')) {
return gettext('Configure Ceph');
} else {
- return gettext('Install Ceph-') + get('cephVersion');
+ return gettext('Install Ceph');
}
},
- windowText: function (get) {
+ windowText: function(get) {
if (get('isInstalled')) {
return '<p class="install-mask">' +
Ext.String.format(gettext('{0} is not initialized.'), 'Ceph') + ' '+
Ext.String.format(gettext('{0} is not installed on this node.'), 'Ceph') + '<br>' +
gettext('Would you like to install it now?') + '</p>';
}
- }
- }
+ },
+ },
},
items: [
{
bind: {
- html: '{windowText}'
+ html: '{windowText}',
},
border: false,
padding: 5,
- bodyCls: 'install-mask'
+ bodyCls: 'install-mask',
},
{
xtype: 'button',
bind: {
- text: '{buttonText}'
+ text: '{buttonText}',
},
viewModel: {},
cbind: {
- nodename: '{nodename}'
+ nodename: '{nodename}',
},
handler: function() {
- var me = this.up('pveCephInstallWindow');
- var win = Ext.create('PVE.ceph.CephInstallWizard',{
- nodename: me.nodename
+ let view = this.up('pveCephInstallWindow');
+ let wizzard = Ext.create('PVE.ceph.CephInstallWizard', {
+ nodename: view.nodename,
});
- win.getViewModel().set('isInstalled', this.getViewModel().get('isInstalled'));
- win.show();
- me.mon(win,'beforeClose', function(){
- me.fireEvent("cephInstallWindowClosed");
- me.close();
+ wizzard.getViewModel().set('isInstalled', this.getViewModel().get('isInstalled'));
+ wizzard.show();
+ view.mon(wizzard, 'beforeClose', function() {
+ view.fireEvent("cephInstallWindowClosed");
+ view.close();
});
-
- }
- }
- ]
+ },
+ },
+ ],
});