]> git.proxmox.com Git - pve-manager.git/commitdiff
ui: ceph crush: code cleanups
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 23 Apr 2021 16:55:46 +0000 (18:55 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 23 Apr 2021 16:55:46 +0000 (18:55 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
www/manager6/ceph/Crush.js

index cbd835ba1641351da6d6c970d9ae888cec4d6f02..c0bdfa27681940f74b6189ce38a1eb12d82276dd 100644 (file)
@@ -16,12 +16,11 @@ Ext.define('PVE.node.CephCrushMap', {
            failure: function(response, opts) {
                me.update(gettext('Error') + " " + response.htmlStatus);
                var msg = response.htmlStatus;
-               PVE.Utils.showCephInstallOrMask(me.ownerCt, msg, me.pveSelNode.data.node,
-                   function(win) {
-                       me.mon(win, 'cephInstallWindowClosed', function() {
-                           me.load();
-                       });
-                   },
+               PVE.Utils.showCephInstallOrMask(
+                   me.ownerCt,
+                   msg,
+                   me.pveSelNode.data.node,
+                   win => me.mon(win, 'cephInstallWindowClosed', () => me.load()),
                );
            },
            success: function(response, opts) {
@@ -32,20 +31,17 @@ Ext.define('PVE.node.CephCrushMap', {
     },
 
     initComponent: function() {
-        var me = this;
+       let me = this;
 
-       var nodename = me.pveSelNode.data.node;
+       let nodename = me.pveSelNode.data.node;
        if (!nodename) {
            throw "no node name specified";
        }
 
        Ext.apply(me, {
-           url: '/nodes/' + nodename + '/ceph/crush',
-
+           url: `/nodes/${nodename}/ceph/crush`,
            listeners: {
-               activate: function() {
-                   me.load();
-               },
+               activate: () => me.load(),
            },
        });