]> git.proxmox.com Git - proxmox-widget-toolkit.git/commitdiff
follouwp: code cleanup for bond_mode_array
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 10 Jul 2019 10:36:57 +0000 (12:36 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 10 Jul 2019 10:36:57 +0000 (12:36 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Utils.js

index 929de6ee47980c1cb168323a1e4e8532fe63a301..3c6e8713b06c17bd1e37f5b25093239b6e70c3af 100644 (file)
--- a/Utils.js
+++ b/Utils.js
@@ -114,12 +114,7 @@ Ext.define('Proxmox.Utils', { utilities: {
     },
 
     bond_mode_array: function(modes) {
-       var arr = [];
-       var i;
-       for (i = 0; i < modes.length; i++) {
-           arr.push([modes[i], Proxmox.Utils.render_bond_mode(modes[i])]);
-       }
-       return arr;
+       return modes.map(mode => [mode, Proxmox.Utils.render_bond_mode(mode)]);
     },
 
     getNoSubKeyHtml: function(url) {