displayField must now be set in class body, take opportunity to move out other config properties from initComponent() --- www/manager6/ha/GroupSelector.js | 66 ++++++++++++++++++---------------------- 1 file changed, 30 insertions(+), 36 deletions(-)
diff --git a/www/manager6/ha/GroupSelector.js b/www/manager6/ha/GroupSelector.js index 01e97b4..1f74b77 100644 --- a/www/manager6/ha/GroupSelector.js +++ b/www/manager6/ha/GroupSelector.js @@ -2,48 +2,42 @@ Ext.define('PVE.ha.GroupSelector', { extend: 'PVE.form.ComboGrid', alias: ['widget.pveHAGroupSelector'], - initComponent: function() { - var me = this; - - var store = new Ext.data.Store({ + autoSelect: false, + valueField: 'group', + displayField: 'group', + listConfig: { + columns: [ + { + header: gettext('Group'), + width: 100, + sortable: true, + dataIndex: 'group' + }, + { + header: gettext('Nodes'), + width: 100, + sortable: false, + dataIndex: 'nodes' + }, + { + header: gettext('Comment'), + flex: 1, + dataIndex: 'comment' + } + ] + }, + store: { model: 'pve-ha-groups', sorters: { property: 'group', order: 'DESC' } - }); + }, - Ext.apply(me, { - store: store, - autoSelect: false, - valueField: 'group', - displayField: 'group', - listConfig: { - columns: [ - { - header: gettext('Group'), - width: 100, - sortable: true, - dataIndex: 'group' - }, - { - header: gettext('Nodes'), - width: 100, - sortable: false, - dataIndex: 'nodes' - }, - { - header: gettext('Comment'), - flex: 1, - dataIndex: 'comment' - } - ] - } - }); - - me.callParent(); - - store.load(); + initComponent: function() { + var me = this; + me.callParent(); + me.getStore().load(); } }, function() { -- 2.1.4 _______________________________________________ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel