Commit 73b139cd authored by Dietmar Maurer's avatar Dietmar Maurer

coding style cleanups

parent 7afb2ab5
...@@ -2,6 +2,8 @@ pve-manager (3.1-19) unstable; urgency=low ...@@ -2,6 +2,8 @@ pve-manager (3.1-19) unstable; urgency=low
* vzdump: remove temporary directories (revert bug introduced by * vzdump: remove temporary directories (revert bug introduced by
commit 1bb6e88fd65bb44a745065d2d899832f6ea0a2f5) commit 1bb6e88fd65bb44a745065d2d899832f6ea0a2f5)
* add Editor for new ZFSPlugin
-- Proxmox Support Team <support@proxmox.com> Fri, 04 Oct 2013 06:55:58 +0200 -- Proxmox Support Team <support@proxmox.com> Fri, 04 Oct 2013 06:55:58 +0200
......
...@@ -2,85 +2,83 @@ Ext.define('PVE.storage.ZFSInputPanel', { ...@@ -2,85 +2,83 @@ Ext.define('PVE.storage.ZFSInputPanel', {
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 = 'zfs';
values.content = 'images'; values.content = 'images';
} else {
} else { delete values.storage;
delete values.storage; }
}
values.disable = values.enable ? 0 : 1;
values.disable = values.enable ? 0 : 1; delete values.enable;
delete values.enable;
return values;
return values;
}, },
initComponent : function() { initComponent : function() {
var me = this; var me = this;
me.column1 = [ me.column1 = [
{ {
xtype: me.create ? 'textfield' : 'displayfield', xtype: me.create ? 'textfield' : 'displayfield',
name: 'storage', name: 'storage',
height: 22, // hack: set same height as text fields height: 22, // hack: set same height as text fields
value: me.storageId || '', value: me.storageId || '',
fieldLabel: 'ID', fieldLabel: 'ID',
vtype: 'StorageId', vtype: 'StorageId',
allowBlank: false allowBlank: false
}, },
{ {
xtype: me.create ? 'textfield' : 'displayfield', xtype: me.create ? 'textfield' : 'displayfield',
name: 'portal', name: 'portal',
height: 22, // hack: set same height as text fields height: 22, // hack: set same height as text fields
value: '', value: '',
fieldLabel: gettext('Portal'), fieldLabel: gettext('Portal'),
allowBlank: false allowBlank: false
}, },
{ {
xtype: me.create ? 'textfield' : 'displayfield', xtype: me.create ? 'textfield' : 'displayfield',
name: 'pool', name: 'pool',
height: 22, // hack: set same height as text fields height: 22, // hack: set same height as text fields
value: '', value: '',
fieldLabel: gettext('Pool'), fieldLabel: gettext('Pool'),
allowBlank: false allowBlank: false
}, },
{ {
xtype: me.create ? 'textfield' : 'displayfield', xtype: me.create ? 'textfield' : 'displayfield',
name: 'blocksize', name: 'blocksize',
height: 22, // hack: set same height as text fields height: 22, // hack: set same height as text fields
value: '4k', value: '4k',
fieldLabel: gettext('Block Size'), fieldLabel: gettext('Block Size'),
allowBlank: false allowBlank: false
}, },
{ {
xtype: me.create ? 'textfield' : 'displayfield', xtype: me.create ? 'textfield' : 'displayfield',
name: 'target', name: 'target',
height: 22, // hack: set same height as text fields height: 22, // hack: set same height as text fields
value: 'iqn.2010-09.org.openindiana:omnios:....', value: 'iqn.2010-09.org.openindiana:omnios:....',
fieldLabel: gettext('Target'), fieldLabel: gettext('Target'),
allowBlank: false allowBlank: false
} }
]; ];
me.column2 = [ me.column2 = [
{ {
xtype: 'pvecheckbox', xtype: 'pvecheckbox',
name: 'enable', name: 'enable',
checked: true, checked: true,
uncheckedValue: 0, uncheckedValue: 0,
fieldLabel: gettext('Enable') fieldLabel: gettext('Enable')
}, },
{ {
xtype: me.create ? 'textfield' : 'displayfield', xtype: me.create ? 'textfield' : 'displayfield',
name: 'iscsiprovider', name: 'iscsiprovider',
height: 22, // hack: set same height as text fields height: 22, // hack: set same height as text fields
value: 'Comstar', value: 'Comstar',
fieldLabel: gettext('iSCSI Provider'), fieldLabel: gettext('iSCSI Provider'),
allowBlank: false allowBlank: false
} }
]; ];
...@@ -89,7 +87,7 @@ Ext.define('PVE.storage.ZFSInputPanel', { ...@@ -89,7 +87,7 @@ Ext.define('PVE.storage.ZFSInputPanel', {
xtype: 'PVE.form.NodeSelector', xtype: 'PVE.form.NodeSelector',
name: 'nodes', name: 'nodes',
fieldLabel: gettext('Nodes'), fieldLabel: gettext('Nodes'),
emptyText: gettext('All') + ' (' + emptyText: gettext('All') + ' (' +
gettext('No restrictions') +')', gettext('No restrictions') +')',
multiSelect: true, multiSelect: true,
autoSelect: false autoSelect: false
...@@ -102,10 +100,10 @@ Ext.define('PVE.storage.ZFSInputPanel', { ...@@ -102,10 +100,10 @@ Ext.define('PVE.storage.ZFSInputPanel', {
Ext.define('PVE.storage.ZFSEdit', { Ext.define('PVE.storage.ZFSEdit', {
extend: 'PVE.window.Edit', extend: 'PVE.window.Edit',
initComponent : function() { initComponent : function() {
var me = this; var me = this;
me.create = !me.storageId; me.create = !me.storageId;
if (me.create) { if (me.create) {
...@@ -126,7 +124,7 @@ Ext.define('PVE.storage.ZFSEdit', { ...@@ -126,7 +124,7 @@ Ext.define('PVE.storage.ZFSEdit', {
isAdd: true, isAdd: true,
items: [ ipanel ] items: [ ipanel ]
}); });
me.callParent(); me.callParent();
if (!me.create) { if (!me.create) {
......
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