Commit 51c0218e authored by Wolfgang Link's avatar Wolfgang Link Committed by Dietmar Maurer

Gui storage: copy selector methode

from LVMEdit.js to ZFSPoolEdit.js
Signed-off-by: 's avatarWolfgang Link <w.link@proxmox.com>
parent 85bf26b1
Ext.define('PVE.storage.ZFSPoolSelector', {
extend: 'Ext.form.field.ComboBox',
alias: 'widget.pveZFSPoolSelector',
initComponent : function() {
var me = this;
if (!me.nodename) {
me.nodename = 'localhost';
}
var store = Ext.create('Ext.data.Store', {
autoLoad: {}, // true,
fields: [ 'vg', 'size', 'free' ],
proxy: {
type: 'pve',
url: '/api2/json/nodes/' + me.nodename + '/scan/lvm'
}
});
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));
}
}
}
});
me.callParent();
}
});
Ext.define('PVE.storage.ZFSPoolInputPanel', {
extend: 'PVE.panel.InputPanel',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment