Commit df7fd59d authored by Wolfgang Link's avatar Wolfgang Link Committed by Dietmar Maurer

Gui storage: change input method

change input method in Add:ZFS Storage at ZFS Pool from string to combobox.
Signed-off-by: 's avatarWolfgang Link <w.link@proxmox.com>
parent 51c0218e
...@@ -11,17 +11,17 @@ Ext.define('PVE.storage.ZFSPoolSelector', { ...@@ -11,17 +11,17 @@ Ext.define('PVE.storage.ZFSPoolSelector', {
var store = Ext.create('Ext.data.Store', { var store = Ext.create('Ext.data.Store', {
autoLoad: {}, // true, autoLoad: {}, // true,
fields: [ 'vg', 'size', 'free' ], fields: [ 'pool', 'size', 'free' ],
proxy: { proxy: {
type: 'pve', type: 'pve',
url: '/api2/json/nodes/' + me.nodename + '/scan/lvm' url: '/api2/json/nodes/' + me.nodename + '/scan/zfs'
} }
}); });
Ext.apply(me, { Ext.apply(me, {
store: store, store: store,
valueField: 'vg', valueField: 'pool',
displayField: 'vg', displayField: 'pool',
queryMode: 'local', queryMode: 'local',
editable: false, editable: false,
listConfig: { listConfig: {
...@@ -72,17 +72,30 @@ Ext.define('PVE.storage.ZFSPoolInputPanel', { ...@@ -72,17 +72,30 @@ Ext.define('PVE.storage.ZFSPoolInputPanel', {
fieldLabel: 'ID', fieldLabel: 'ID',
vtype: 'StorageId', vtype: 'StorageId',
allowBlank: false allowBlank: false
},
{
xtype: me.create ? 'textfield' : 'displayfield',
name: 'pool',
height: 22, // hack: set same height as text fields
value: '',
fieldLabel: gettext('Pool'),
allowBlank: false
} }
]; ];
var zfspoolnameField = Ext.createWidget(me.create ? 'textfield' : 'displayfield', {
height: 22, // hack: set same height as text fields
name: 'poolname',
hidden: !!me.create,
disabled: !!me.create,
value: '',
fieldLabel: gettext('ZFS Pool'),
allowBlank: false
});
if (me.create) {
var zfspoolField = Ext.create('PVE.storage.ZFSPoolSelector', {
name: 'pool',
fieldLabel: gettext('ZFS Pool'),
allowBlank: false
});
me.column1.push(zfspoolField);
}
me.column1.push(zfspoolnameField);
me.column2 = [ me.column2 = [
{ {
xtype: 'pvecheckbox', xtype: 'pvecheckbox',
......
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