diff --git a/www/manager6/storage/GlusterFsEdit.js b/www/manager6/storage/GlusterFsEdit.js index 01c7ca2e..26822f33 100644 --- a/www/manager6/storage/GlusterFsEdit.js +++ b/www/manager6/storage/GlusterFsEdit.js @@ -4,6 +4,13 @@ Ext.define('PVE.storage.GlusterFsScan', { queryParam: 'server', + valueField: 'volname', + displayField: 'volname', + matchFieldWidth: false, + listConfig: { + loadingText: 'Scanning...', + width: 350 + }, doRawQuery: function() { }, @@ -42,21 +49,6 @@ Ext.define('PVE.storage.GlusterFsScan', { Ext.apply(me, { 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(); diff --git a/www/manager6/storage/IScsiEdit.js b/www/manager6/storage/IScsiEdit.js index 60c9b85a..6d099ea2 100644 --- a/www/manager6/storage/IScsiEdit.js +++ b/www/manager6/storage/IScsiEdit.js @@ -3,7 +3,13 @@ Ext.define('PVE.storage.IScsiScan', { alias: 'widget.pveIScsiScan', queryParam: 'portal', - + valueField: 'target', + displayField: 'target', + matchFieldWidth: false, + listConfig: { + loadingText: gettext('Scanning...'), + width: 350 + }, doRawQuery: function() { }, @@ -42,21 +48,6 @@ Ext.define('PVE.storage.IScsiScan', { Ext.apply(me, { 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(); diff --git a/www/manager6/storage/LVMEdit.js b/www/manager6/storage/LVMEdit.js index 577f317d..e7756a1a 100644 --- a/www/manager6/storage/LVMEdit.js +++ b/www/manager6/storage/LVMEdit.js @@ -1,7 +1,10 @@ Ext.define('PVE.storage.VgSelector', { extend: 'Ext.form.field.ComboBox', alias: 'widget.pveVgSelector', - + valueField: 'vg', + displayField: 'vg', + queryMode: 'local', + editable: false, initComponent : function() { var me = this; @@ -20,20 +23,8 @@ Ext.define('PVE.storage.VgSelector', { Ext.apply(me, { store: store, - valueField: 'vg', - displayField: 'vg', - 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)); - } - } } }); @@ -46,7 +37,11 @@ Ext.define('PVE.storage.BaseStorageSelector', { alias: 'widget.pveBaseStorageSelector', existingGroupsText: gettext("Existing volume groups"), - + queryMode: 'local', + editable: false, + value: '', + valueField: 'storage', + displayField: 'text', initComponent : function() { var me = this; @@ -78,11 +73,6 @@ Ext.define('PVE.storage.BaseStorageSelector', { Ext.apply(me, { store: store, - queryMode: 'local', - editable: false, - value: '', - valueField: 'storage', - displayField: 'text' }); me.callParent(); diff --git a/www/manager6/storage/LvmThinEdit.js b/www/manager6/storage/LvmThinEdit.js index a2c3ee75..a6f7cdb4 100644 --- a/www/manager6/storage/LvmThinEdit.js +++ b/www/manager6/storage/LvmThinEdit.js @@ -3,6 +3,9 @@ Ext.define('PVE.storage.TPoolSelector', { alias: 'widget.pveTPSelector', queryParam: 'vg', + valueField: 'lv', + displayField: 'lv', + editable: false, doRawQuery: function() { }, @@ -42,19 +45,8 @@ Ext.define('PVE.storage.TPoolSelector', { Ext.apply(me, { store: store, - valueField: 'lv', - displayField: 'lv', - 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)); - } - } } }); @@ -66,6 +58,10 @@ Ext.define('PVE.storage.BaseVGSelector', { extend: 'Ext.form.field.ComboBox', alias: 'widget.pveBaseVGSelector', + valueField: 'vg', + displayField: 'vg', + queryMode: 'local', + editable: false, initComponent : function() { var me = this; @@ -84,20 +80,8 @@ Ext.define('PVE.storage.BaseVGSelector', { Ext.apply(me, { store: store, - valueField: 'vg', - displayField: 'vg', - 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)); - } - } } }); diff --git a/www/manager6/storage/NFSEdit.js b/www/manager6/storage/NFSEdit.js index e9c93d0c..4b50a6f2 100644 --- a/www/manager6/storage/NFSEdit.js +++ b/www/manager6/storage/NFSEdit.js @@ -4,6 +4,13 @@ Ext.define('PVE.storage.NFSScan', { queryParam: 'server', + valueField: 'path', + displayField: 'path', + matchFieldWidth: false, + listConfig: { + loadingText: gettext('Scanning...'), + width: 350 + }, doRawQuery: function() { }, @@ -42,21 +49,6 @@ Ext.define('PVE.storage.NFSScan', { Ext.apply(me, { 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(); diff --git a/www/manager6/storage/ZFSPoolEdit.js b/www/manager6/storage/ZFSPoolEdit.js index 0319299b..7dcb7c03 100644 --- a/www/manager6/storage/ZFSPoolEdit.js +++ b/www/manager6/storage/ZFSPoolEdit.js @@ -1,7 +1,13 @@ Ext.define('PVE.storage.ZFSPoolSelector', { extend: 'Ext.form.field.ComboBox', alias: 'widget.pveZFSPoolSelector', - + valueField: 'pool', + displayField: 'pool', + queryMode: 'local', + editable: false, + listConfig: { + loadingText: gettext('Scanning...'), + }, initComponent : function() { var me = this; @@ -20,21 +26,6 @@ Ext.define('PVE.storage.ZFSPoolSelector', { Ext.apply(me, { 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();