]> git.proxmox.com Git - pve-manager.git/blame - www/manager6/window/CephInstall.js
pveceph install: allow nautilus and use as default
[pve-manager.git] / www / manager6 / window / CephInstall.js
CommitLineData
4616a55b
TM
1/*jslint confusion: true*/
2Ext.define('PVE.ceph.Install', {
3 extend: 'Ext.window.Window',
4 xtype: 'pveCephInstallWindow',
5 mixins: ['Proxmox.Mixin.CBind'],
6
7 width: 220,
8 header: false,
9 resizable: false,
10 draggable: false,
11 modal: true,
12 nodename: undefined,
13 shadow: false,
14 border: false,
15 bodyBorder: false,
16 closable: false,
17 cls: 'install-mask',
18 bodyCls: 'install-mask',
19 layout: {
20 align: 'stretch',
21 pack: 'center',
22 type: 'vbox'
23 },
24 viewModel: {
4616a55b 25 data: {
c3d9c698 26 cephVersion: 'nautilus',
f992ef80 27 isInstalled: false
4616a55b
TM
28 },
29 formulas: {
30 buttonText: function (get){
f992ef80
TM
31 if (get('isInstalled')) {
32 return gettext('Configure Ceph');
33 } else {
34 return gettext('Install Ceph-') + get('cephVersion');
35 }
36 },
37 windowText: function (get) {
38 if (get('isInstalled')) {
7412755d 39 return '<p class="install-mask">' +
f992ef80
TM
40 Ext.String.format(gettext('{0} is not initialized.'), 'Ceph') + ' '+
41 gettext('You need to create a initial config once.') + '</p>';
42 } else {
7412755d 43 return '<p class="install-mask">' +
f992ef80
TM
44 Ext.String.format(gettext('{0} is not installed on this node.'), 'Ceph') + '<br>' +
45 gettext('Would you like to install it now?') + '</p>';
46 }
4616a55b
TM
47 }
48 }
49 },
50 items: [
51 {
f992ef80
TM
52 bind: {
53 html: '{windowText}'
54 },
4616a55b
TM
55 border: false,
56 padding: 5,
57 bodyCls: 'install-mask'
58
59 },
60 {
61 xtype: 'button',
62 bind: {
63 text: '{buttonText}'
64 },
f992ef80 65 viewModel: {},
4616a55b
TM
66 cbind: {
67 nodename: '{nodename}'
68 },
69 handler: function() {
70 var me = this.up('pveCephInstallWindow');
71 var win = Ext.create('PVE.ceph.CephInstallWizard',{
72 nodename: me.nodename
73 });
f992ef80 74 win.getViewModel().set('isInstalled', this.getViewModel().get('isInstalled'));
4616a55b
TM
75 win.show();
76 me.mon(win,'beforeClose', function(){
77 me.fireEvent("cephInstallWindowClosed");
78 me.close();
79 });
80
81 }
82 }
83 ]
84});