]> git.proxmox.com Git - pve-manager.git/blobdiff - www/manager6/window/CephInstall.js
ui: add edit window for usb mappings
[pve-manager.git] / www / manager6 / window / CephInstall.js
index a2c19c4256afde3735bf34853123425fd400205b..432c6719fa7111f2fcfaaf431e6d3878d59ee759 100644 (file)
@@ -1,4 +1,3 @@
-/*jslint confusion: true*/
 Ext.define('PVE.ceph.Install', {
     extend: 'Ext.window.Window',
     xtype: 'pveCephInstallWindow',
@@ -19,66 +18,64 @@ Ext.define('PVE.ceph.Install', {
     layout: {
         align: 'stretch',
         pack: 'center',
-       type: 'vbox'
+       type: 'vbox',
     },
     viewModel: {
        data: {
-             cephVersion: 'luminous',
-             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') + ' '+
-                   gettext('You need to create a initial config once.') + '</p>';
+                   return `<p class="install-mask">
+                   ${Ext.String.format(gettext('{0} is not initialized.'), 'Ceph')}
+                   ${gettext('You need to create an 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: [
        {
            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();
                });
-
-           }
-       }
-    ]
+           },
+       },
+    ],
 });