mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-07-26 02:41:30 +00:00
ext6migrate: fix dropboxes in Storage Edit windows
we fix this by moving the static configuration (especially value and displayfield) to the class definition also we remove the scrollbar hack (it works properly now) Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
3f90858ace
commit
c2317525f0
@ -4,6 +4,13 @@ Ext.define('PVE.storage.GlusterFsScan', {
|
|||||||
|
|
||||||
queryParam: 'server',
|
queryParam: 'server',
|
||||||
|
|
||||||
|
valueField: 'volname',
|
||||||
|
displayField: 'volname',
|
||||||
|
matchFieldWidth: false,
|
||||||
|
listConfig: {
|
||||||
|
loadingText: 'Scanning...',
|
||||||
|
width: 350
|
||||||
|
},
|
||||||
doRawQuery: function() {
|
doRawQuery: function() {
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -42,21 +49,6 @@ Ext.define('PVE.storage.GlusterFsScan', {
|
|||||||
|
|
||||||
Ext.apply(me, {
|
Ext.apply(me, {
|
||||||
store: store,
|
store: store,
|
||||||
valueField: 'volname',
|
|
||||||
displayField: 'volname',
|
|
||||||
matchFieldWidth: false,
|
|
||||||
listConfig: {
|
|
||||||
loadingText: 'Scanning...',
|
|
||||||
listeners: {
|
|
||||||
// hack: call setHeight to show scroll bars correctly
|
|
||||||
refresh: function(list) {
|
|
||||||
var lh = PVE.Utils.gridLineHeigh();
|
|
||||||
var count = store.getCount();
|
|
||||||
list.setHeight(lh * ((count > 10) ? 10 : count));
|
|
||||||
}
|
|
||||||
},
|
|
||||||
width: 350
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
me.callParent();
|
me.callParent();
|
||||||
|
@ -3,7 +3,13 @@ Ext.define('PVE.storage.IScsiScan', {
|
|||||||
alias: 'widget.pveIScsiScan',
|
alias: 'widget.pveIScsiScan',
|
||||||
|
|
||||||
queryParam: 'portal',
|
queryParam: 'portal',
|
||||||
|
valueField: 'target',
|
||||||
|
displayField: 'target',
|
||||||
|
matchFieldWidth: false,
|
||||||
|
listConfig: {
|
||||||
|
loadingText: gettext('Scanning...'),
|
||||||
|
width: 350
|
||||||
|
},
|
||||||
doRawQuery: function() {
|
doRawQuery: function() {
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -42,21 +48,6 @@ Ext.define('PVE.storage.IScsiScan', {
|
|||||||
|
|
||||||
Ext.apply(me, {
|
Ext.apply(me, {
|
||||||
store: store,
|
store: store,
|
||||||
valueField: 'target',
|
|
||||||
displayField: 'target',
|
|
||||||
matchFieldWidth: false,
|
|
||||||
listConfig: {
|
|
||||||
loadingText: gettext('Scanning...'),
|
|
||||||
listeners: {
|
|
||||||
// hack: call setHeight to show scroll bars correctly
|
|
||||||
refresh: function(list) {
|
|
||||||
var lh = PVE.Utils.gridLineHeigh();
|
|
||||||
var count = store.getCount();
|
|
||||||
list.setHeight(lh * ((count > 10) ? 10 : count));
|
|
||||||
}
|
|
||||||
},
|
|
||||||
width: 350
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
me.callParent();
|
me.callParent();
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
Ext.define('PVE.storage.VgSelector', {
|
Ext.define('PVE.storage.VgSelector', {
|
||||||
extend: 'Ext.form.field.ComboBox',
|
extend: 'Ext.form.field.ComboBox',
|
||||||
alias: 'widget.pveVgSelector',
|
alias: 'widget.pveVgSelector',
|
||||||
|
valueField: 'vg',
|
||||||
|
displayField: 'vg',
|
||||||
|
queryMode: 'local',
|
||||||
|
editable: false,
|
||||||
initComponent : function() {
|
initComponent : function() {
|
||||||
var me = this;
|
var me = this;
|
||||||
|
|
||||||
@ -20,20 +23,8 @@ Ext.define('PVE.storage.VgSelector', {
|
|||||||
|
|
||||||
Ext.apply(me, {
|
Ext.apply(me, {
|
||||||
store: store,
|
store: store,
|
||||||
valueField: 'vg',
|
|
||||||
displayField: 'vg',
|
|
||||||
queryMode: 'local',
|
|
||||||
editable: false,
|
|
||||||
listConfig: {
|
listConfig: {
|
||||||
loadingText: gettext('Scanning...'),
|
loadingText: gettext('Scanning...'),
|
||||||
listeners: {
|
|
||||||
// hack: call setHeight to show scroll bars correctly
|
|
||||||
refresh: function(list) {
|
|
||||||
var lh = PVE.Utils.gridLineHeigh();
|
|
||||||
var count = store.getCount();
|
|
||||||
list.setHeight(lh * ((count > 10) ? 10 : count));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -46,7 +37,11 @@ Ext.define('PVE.storage.BaseStorageSelector', {
|
|||||||
alias: 'widget.pveBaseStorageSelector',
|
alias: 'widget.pveBaseStorageSelector',
|
||||||
|
|
||||||
existingGroupsText: gettext("Existing volume groups"),
|
existingGroupsText: gettext("Existing volume groups"),
|
||||||
|
queryMode: 'local',
|
||||||
|
editable: false,
|
||||||
|
value: '',
|
||||||
|
valueField: 'storage',
|
||||||
|
displayField: 'text',
|
||||||
initComponent : function() {
|
initComponent : function() {
|
||||||
var me = this;
|
var me = this;
|
||||||
|
|
||||||
@ -78,11 +73,6 @@ Ext.define('PVE.storage.BaseStorageSelector', {
|
|||||||
|
|
||||||
Ext.apply(me, {
|
Ext.apply(me, {
|
||||||
store: store,
|
store: store,
|
||||||
queryMode: 'local',
|
|
||||||
editable: false,
|
|
||||||
value: '',
|
|
||||||
valueField: 'storage',
|
|
||||||
displayField: 'text'
|
|
||||||
});
|
});
|
||||||
|
|
||||||
me.callParent();
|
me.callParent();
|
||||||
|
@ -3,6 +3,9 @@ Ext.define('PVE.storage.TPoolSelector', {
|
|||||||
alias: 'widget.pveTPSelector',
|
alias: 'widget.pveTPSelector',
|
||||||
|
|
||||||
queryParam: 'vg',
|
queryParam: 'vg',
|
||||||
|
valueField: 'lv',
|
||||||
|
displayField: 'lv',
|
||||||
|
editable: false,
|
||||||
|
|
||||||
doRawQuery: function() {
|
doRawQuery: function() {
|
||||||
},
|
},
|
||||||
@ -42,19 +45,8 @@ Ext.define('PVE.storage.TPoolSelector', {
|
|||||||
|
|
||||||
Ext.apply(me, {
|
Ext.apply(me, {
|
||||||
store: store,
|
store: store,
|
||||||
valueField: 'lv',
|
|
||||||
displayField: 'lv',
|
|
||||||
editable: false,
|
|
||||||
listConfig: {
|
listConfig: {
|
||||||
loadingText: gettext('Scanning...'),
|
loadingText: gettext('Scanning...'),
|
||||||
listeners: {
|
|
||||||
// hack: call setHeight to show scroll bars correctly
|
|
||||||
refresh: function(list) {
|
|
||||||
var lh = PVE.Utils.gridLineHeigh();
|
|
||||||
var count = store.getCount();
|
|
||||||
list.setHeight(lh * ((count > 10) ? 10 : count));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -66,6 +58,10 @@ Ext.define('PVE.storage.BaseVGSelector', {
|
|||||||
extend: 'Ext.form.field.ComboBox',
|
extend: 'Ext.form.field.ComboBox',
|
||||||
alias: 'widget.pveBaseVGSelector',
|
alias: 'widget.pveBaseVGSelector',
|
||||||
|
|
||||||
|
valueField: 'vg',
|
||||||
|
displayField: 'vg',
|
||||||
|
queryMode: 'local',
|
||||||
|
editable: false,
|
||||||
initComponent : function() {
|
initComponent : function() {
|
||||||
var me = this;
|
var me = this;
|
||||||
|
|
||||||
@ -84,20 +80,8 @@ Ext.define('PVE.storage.BaseVGSelector', {
|
|||||||
|
|
||||||
Ext.apply(me, {
|
Ext.apply(me, {
|
||||||
store: store,
|
store: store,
|
||||||
valueField: 'vg',
|
|
||||||
displayField: 'vg',
|
|
||||||
queryMode: 'local',
|
|
||||||
editable: false,
|
|
||||||
listConfig: {
|
listConfig: {
|
||||||
loadingText: gettext('Scanning...'),
|
loadingText: gettext('Scanning...'),
|
||||||
listeners: {
|
|
||||||
// hack: call setHeight to show scroll bars correctly
|
|
||||||
refresh: function(list) {
|
|
||||||
var lh = PVE.Utils.gridLineHeigh();
|
|
||||||
var count = store.getCount();
|
|
||||||
list.setHeight(lh * ((count > 10) ? 10 : count));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -4,6 +4,13 @@ Ext.define('PVE.storage.NFSScan', {
|
|||||||
|
|
||||||
queryParam: 'server',
|
queryParam: 'server',
|
||||||
|
|
||||||
|
valueField: 'path',
|
||||||
|
displayField: 'path',
|
||||||
|
matchFieldWidth: false,
|
||||||
|
listConfig: {
|
||||||
|
loadingText: gettext('Scanning...'),
|
||||||
|
width: 350
|
||||||
|
},
|
||||||
doRawQuery: function() {
|
doRawQuery: function() {
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -42,21 +49,6 @@ Ext.define('PVE.storage.NFSScan', {
|
|||||||
|
|
||||||
Ext.apply(me, {
|
Ext.apply(me, {
|
||||||
store: store,
|
store: store,
|
||||||
valueField: 'path',
|
|
||||||
displayField: 'path',
|
|
||||||
matchFieldWidth: false,
|
|
||||||
listConfig: {
|
|
||||||
loadingText: gettext('Scanning...'),
|
|
||||||
listeners: {
|
|
||||||
// hack: call setHeight to show scroll bars correctly
|
|
||||||
refresh: function(list) {
|
|
||||||
var lh = PVE.Utils.gridLineHeigh();
|
|
||||||
var count = store.getCount();
|
|
||||||
list.setHeight(lh * ((count > 10) ? 10 : count));
|
|
||||||
}
|
|
||||||
},
|
|
||||||
width: 350
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
me.callParent();
|
me.callParent();
|
||||||
|
@ -1,7 +1,13 @@
|
|||||||
Ext.define('PVE.storage.ZFSPoolSelector', {
|
Ext.define('PVE.storage.ZFSPoolSelector', {
|
||||||
extend: 'Ext.form.field.ComboBox',
|
extend: 'Ext.form.field.ComboBox',
|
||||||
alias: 'widget.pveZFSPoolSelector',
|
alias: 'widget.pveZFSPoolSelector',
|
||||||
|
valueField: 'pool',
|
||||||
|
displayField: 'pool',
|
||||||
|
queryMode: 'local',
|
||||||
|
editable: false,
|
||||||
|
listConfig: {
|
||||||
|
loadingText: gettext('Scanning...'),
|
||||||
|
},
|
||||||
initComponent : function() {
|
initComponent : function() {
|
||||||
var me = this;
|
var me = this;
|
||||||
|
|
||||||
@ -20,21 +26,6 @@ Ext.define('PVE.storage.ZFSPoolSelector', {
|
|||||||
|
|
||||||
Ext.apply(me, {
|
Ext.apply(me, {
|
||||||
store: store,
|
store: store,
|
||||||
valueField: 'pool',
|
|
||||||
displayField: 'pool',
|
|
||||||
queryMode: 'local',
|
|
||||||
editable: false,
|
|
||||||
listConfig: {
|
|
||||||
loadingText: gettext('Scanning...'),
|
|
||||||
listeners: {
|
|
||||||
// hack: call setHeight to show scroll bars correctly
|
|
||||||
refresh: function(list) {
|
|
||||||
var lh = PVE.Utils.gridLineHeigh();
|
|
||||||
var count = store.getCount();
|
|
||||||
list.setHeight(lh * ((count > 10) ? 10 : count));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
me.callParent();
|
me.callParent();
|
||||||
|
Loading…
Reference in New Issue
Block a user