mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-07-27 05:52:32 +00:00
fix HA Group Selector display
displayField must now be set in class body, take opportunity to move out other config properties from initComponent()
This commit is contained in:
parent
9ccd656a61
commit
7fc52dff20
@ -2,48 +2,42 @@ Ext.define('PVE.ha.GroupSelector', {
|
|||||||
extend: 'PVE.form.ComboGrid',
|
extend: 'PVE.form.ComboGrid',
|
||||||
alias: ['widget.pveHAGroupSelector'],
|
alias: ['widget.pveHAGroupSelector'],
|
||||||
|
|
||||||
initComponent: function() {
|
autoSelect: false,
|
||||||
var me = this;
|
valueField: 'group',
|
||||||
|
displayField: 'group',
|
||||||
var store = new Ext.data.Store({
|
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',
|
model: 'pve-ha-groups',
|
||||||
sorters: {
|
sorters: {
|
||||||
property: 'group',
|
property: 'group',
|
||||||
order: 'DESC'
|
order: 'DESC'
|
||||||
}
|
}
|
||||||
});
|
},
|
||||||
|
|
||||||
Ext.apply(me, {
|
initComponent: function() {
|
||||||
store: store,
|
var me = this;
|
||||||
autoSelect: false,
|
me.callParent();
|
||||||
valueField: 'group',
|
me.getStore().load();
|
||||||
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();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}, function() {
|
}, function() {
|
||||||
|
Loading…
Reference in New Issue
Block a user