mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-07 16:47:46 +00:00
Ext6migrate: move static configuration from instantiation time to class declaration time.
This fixes the problem that this ComboGrid was displayed with an empty value ( similar the to the Keyboard Selection and Realm Selection in the login window)
This commit is contained in:
parent
ebc1f47c4c
commit
a13842bf0e
@ -3,6 +3,25 @@ Ext.define('PVE.form.GroupSelector', {
|
|||||||
alias: ['widget.pveGroupSelector'],
|
alias: ['widget.pveGroupSelector'],
|
||||||
|
|
||||||
allowBlank: false,
|
allowBlank: false,
|
||||||
|
autoSelect: false,
|
||||||
|
valueField: 'groupid',
|
||||||
|
displayField: 'groupid',
|
||||||
|
listConfig: {
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
header: gettext('Group'),
|
||||||
|
sortable: true,
|
||||||
|
dataIndex: 'groupid',
|
||||||
|
flex: 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
header: gettext('Comment'),
|
||||||
|
sortable: false,
|
||||||
|
dataIndex: 'comment',
|
||||||
|
flex: 1
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
|
||||||
initComponent: function() {
|
initComponent: function() {
|
||||||
var me = this;
|
var me = this;
|
||||||
@ -13,25 +32,6 @@ Ext.define('PVE.form.GroupSelector', {
|
|||||||
|
|
||||||
Ext.apply(me, {
|
Ext.apply(me, {
|
||||||
store: store,
|
store: store,
|
||||||
autoSelect: false,
|
|
||||||
valueField: 'groupid',
|
|
||||||
displayField: 'groupid',
|
|
||||||
listConfig: {
|
|
||||||
columns: [
|
|
||||||
{
|
|
||||||
header: gettext('Group'),
|
|
||||||
sortable: true,
|
|
||||||
dataIndex: 'groupid',
|
|
||||||
flex: 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
header: gettext('Comment'),
|
|
||||||
sortable: false,
|
|
||||||
dataIndex: 'comment',
|
|
||||||
flex: 1
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
me.callParent();
|
me.callParent();
|
||||||
|
@ -2,6 +2,37 @@ Ext.define('PVE.form.StorageSelector', {
|
|||||||
extend: 'PVE.form.ComboGrid',
|
extend: 'PVE.form.ComboGrid',
|
||||||
alias: ['widget.PVE.form.StorageSelector'],
|
alias: ['widget.PVE.form.StorageSelector'],
|
||||||
|
|
||||||
|
allowBlank: false,
|
||||||
|
valueField: 'storage',
|
||||||
|
displayField: 'storage',
|
||||||
|
listConfig: {
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
header: gettext('Name'),
|
||||||
|
dataIndex: 'storage',
|
||||||
|
hideable: false,
|
||||||
|
flex: 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
header: gettext('Type'),
|
||||||
|
width: 60,
|
||||||
|
dataIndex: 'type'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
header: gettext('Avail'),
|
||||||
|
width: 80,
|
||||||
|
dataIndex: 'avail',
|
||||||
|
renderer: PVE.Utils.format_size
|
||||||
|
},
|
||||||
|
{
|
||||||
|
header: gettext('Capacity'),
|
||||||
|
width: 80,
|
||||||
|
dataIndex: 'total',
|
||||||
|
renderer: PVE.Utils.format_size
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
|
||||||
reloadStorageList: function() {
|
reloadStorageList: function() {
|
||||||
var me = this;
|
var me = this;
|
||||||
if (!me.nodename) {
|
if (!me.nodename) {
|
||||||
@ -67,36 +98,6 @@ Ext.define('PVE.form.StorageSelector', {
|
|||||||
|
|
||||||
Ext.apply(me, {
|
Ext.apply(me, {
|
||||||
store: store,
|
store: store,
|
||||||
allowBlank: false,
|
|
||||||
valueField: 'storage',
|
|
||||||
displayField: 'storage',
|
|
||||||
listConfig: {
|
|
||||||
columns: [
|
|
||||||
{
|
|
||||||
header: gettext('Name'),
|
|
||||||
dataIndex: 'storage',
|
|
||||||
hideable: false,
|
|
||||||
flex: 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
header: gettext('Type'),
|
|
||||||
width: 60,
|
|
||||||
dataIndex: 'type'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
header: gettext('Avail'),
|
|
||||||
width: 80,
|
|
||||||
dataIndex: 'avail',
|
|
||||||
renderer: PVE.Utils.format_size
|
|
||||||
},
|
|
||||||
{
|
|
||||||
header: gettext('Capacity'),
|
|
||||||
width: 80,
|
|
||||||
dataIndex: 'total',
|
|
||||||
renderer: PVE.Utils.format_size
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
me.callParent();
|
me.callParent();
|
||||||
|
Loading…
Reference in New Issue
Block a user