Commit 5f7b9719 authored by Wolfgang Link's avatar Wolfgang Link Committed by Dietmar Maurer

Gui storage: modify ZFSPoolEdit.js

Change intput description to the needed.
Signed-off-by: 's avatarWolfgang Link <w.link@proxmox.com>
parent 8e8259f7
Ext.define('PVE.storage.ZFSInputPanel', { Ext.define('PVE.storage.ZFSPoolInputPanel', {
extend: 'PVE.panel.InputPanel', extend: 'PVE.panel.InputPanel',
onGetValues: function(values) { onGetValues: function(values) {
var me = this; var me = this;
if (me.create) { if (me.create) {
values.type = 'zfs'; values.type = 'zfspool';
values.content = 'images'; values.content = 'images';
} else { } else {
delete values.storage; delete values.storage;
...@@ -30,14 +30,6 @@ Ext.define('PVE.storage.ZFSInputPanel', { ...@@ -30,14 +30,6 @@ Ext.define('PVE.storage.ZFSInputPanel', {
vtype: 'StorageId', vtype: 'StorageId',
allowBlank: false allowBlank: false
}, },
{
xtype: me.create ? 'textfield' : 'displayfield',
name: 'portal',
height: 22, // hack: set same height as text fields
value: '',
fieldLabel: gettext('Portal'),
allowBlank: false
},
{ {
xtype: me.create ? 'textfield' : 'displayfield', xtype: me.create ? 'textfield' : 'displayfield',
name: 'pool', name: 'pool',
...@@ -45,30 +37,6 @@ Ext.define('PVE.storage.ZFSInputPanel', { ...@@ -45,30 +37,6 @@ Ext.define('PVE.storage.ZFSInputPanel', {
value: '', value: '',
fieldLabel: gettext('Pool'), fieldLabel: gettext('Pool'),
allowBlank: false allowBlank: false
},
{
xtype: me.create ? 'textfield' : 'displayfield',
name: 'blocksize',
height: 22, // hack: set same height as text fields
value: '4k',
fieldLabel: gettext('Block Size'),
allowBlank: false
},
{
xtype: me.create ? 'textfield' : 'displayfield',
name: 'target',
height: 22, // hack: set same height as text fields
value: '',
fieldLabel: gettext('Target'),
allowBlank: false
},
{
xtype: me.create ? 'textfield' : 'displayfield',
name: 'comstar_tg',
height: 22, // hack: set same height as text fields
value: '',
fieldLabel: gettext('Target group'),
allowBlank: true
} }
]; ];
...@@ -80,36 +48,13 @@ Ext.define('PVE.storage.ZFSInputPanel', { ...@@ -80,36 +48,13 @@ Ext.define('PVE.storage.ZFSInputPanel', {
uncheckedValue: 0, uncheckedValue: 0,
fieldLabel: gettext('Enable') fieldLabel: gettext('Enable')
}, },
{
xtype: me.create ? 'pveiScsiProviderSelector' : 'displayfield',
name: 'iscsiprovider',
height: 22, // hack: set same height as text fields
value: 'comstar',
fieldLabel: gettext('iSCSI Provider'),
allowBlank: false
},
{ {
xtype: 'pvecheckbox', xtype: 'pvecheckbox',
name: 'sparse', name: 'sparse',
checked: false, checked: false,
uncheckedValue: 0, uncheckedValue: 0,
fieldLabel: gettext('Thin provision') fieldLabel: gettext('Thin provision')
}, }
{
xtype: 'pvecheckbox',
name: 'nowritecache',
checked: true,
uncheckedValue: 0,
fieldLabel: gettext('Write cache')
},
{
xtype: me.create ? 'textfield' : 'displayfield',
name: 'comstar_hg',
height: 22, // hack: set same height as text fields
value: '',
fieldLabel: gettext('Host group'),
allowBlank: true
}
]; ];
if (me.create || me.storageId !== 'local') { if (me.create || me.storageId !== 'local') {
...@@ -128,7 +73,7 @@ Ext.define('PVE.storage.ZFSInputPanel', { ...@@ -128,7 +73,7 @@ Ext.define('PVE.storage.ZFSInputPanel', {
} }
}); });
Ext.define('PVE.storage.ZFSEdit', { Ext.define('PVE.storage.ZFSPoolEdit', {
extend: 'PVE.window.Edit', extend: 'PVE.window.Edit',
initComponent : function() { initComponent : function() {
...@@ -144,13 +89,13 @@ Ext.define('PVE.storage.ZFSEdit', { ...@@ -144,13 +89,13 @@ Ext.define('PVE.storage.ZFSEdit', {
me.method = 'PUT'; me.method = 'PUT';
} }
var ipanel = Ext.create('PVE.storage.ZFSInputPanel', { var ipanel = Ext.create('PVE.storage.ZFSPoolInputPanel', {
create: me.create, create: me.create,
storageId: me.storageId storageId: me.storageId
}); });
Ext.apply(me, { Ext.apply(me, {
subject: 'ZFS Storage', subject: 'ZFSPool Storage',
isAdd: true, isAdd: true,
items: [ ipanel ] items: [ ipanel ]
}); });
......
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