[pve-devel] [PATCH pve-manager 1/3] ext6migrate: use Array.prototype.concat() instead of push()

Emmanuel Kasper e.kasper at proxmox.com
Wed Feb 3 12:11:45 CET 2016


Using push here would add an array of elements instead of the elements.
Seems ExtJS6 can't cope with that.

This fix is needed for buttons and columns to be properly displayed when
loading the component.
---
 www/manager6/grid/FirewallRules.js | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/www/manager6/grid/FirewallRules.js b/www/manager6/grid/FirewallRules.js
index c23fc76..37fc262 100644
--- a/www/manager6/grid/FirewallRules.js
+++ b/www/manager6/grid/FirewallRules.js
@@ -121,7 +121,7 @@ Ext.define('PVE.FirewallRulePanel', {
 	    });
 	}
 
-	me.column1.push([
+	me.column1 = me.column1.concat([
 	    {
 		xtype: 'displayfield',
 		fieldLabel: '',
@@ -587,7 +587,7 @@ Ext.define('PVE.FirewallRules', {
 	if (me.groupBtn) {
 	    tbar.push(me.groupBtn);
 	}
-	tbar.push([ me.removeBtn, me.editBtn ]);
+	tbar = tbar.concat([ me.removeBtn, me.editBtn ]);
 
 	var render_errors = function(name, value, metaData, record) {
 	    var errors = record.data.errors;
@@ -675,7 +675,7 @@ Ext.define('PVE.FirewallRules', {
 	    });
 	}
 
-	columns.push([
+	columns = columns.concat([
 	    {
 		header: gettext('Source'),
 		dataIndex: 'source',
-- 
2.1.4





More information about the pve-devel mailing list