[pve-devel] [PATCH pve-manager] First beta of FreeNAS storage plugin
Michael Rasmussen
mir at datanom.net
Tue Jun 13 09:01:32 CEST 2017
On Mon, 12 Jun 2017 14:18:59 +0200
Dominik Csapak <d.csapak at proxmox.com> wrote:
> i just gave this patch a quick glance, here a few remarks:
>
> a bit nitpicky, but your indentation needs fixing, the FreeNASEdit.js seems mostly ok, but nearly every other file you touched has wrong indentation
>
The reason is that all the *.js files uses a mix of either tabs for
indentation or spaces, in some cases used intertwined so until somebody
normalizes all *.js files it seems the only safe way is to stick
exclusively with spaces as indentation and instruct your editor to
leave tabs untouched for not changes text.
> > + xtype: 'textfield',
> > + name: 'password',
> > + emptyText: '',
> > + inputType: 'password',
> > + fieldLabel: gettext('Password'),
> > + allowBlank: false
> > + },
>
> not really a gui problem, but it is probably a bad idea to save/load passwords from/to a textfield, at least do not load and insert it in the field, but leave it empty
>
How would you suggest fixing this? If you don't enter something then
the password will be change if the user presses save (I am not a
javascript guru;-)
> > +Ext.define('PVE.storage.FreeNASEdit', {
> > + extend: 'PVE.window.Edit',
> > +
> > + initComponent : function() {
> > + var me = this;
> > +
> > + me.isCreate = !me.storageId;
> > +
> > + if (me.isCreate) {
> > + me.url = '/api2/extjs/storage';
> > + me.method = 'POST';
> > + } else {
> > + me.url = '/api2/extjs/storage/' + me.storageId;
> > + me.method = 'PUT';
> > + }
> > +
> > + var ipanel = Ext.create('PVE.storage.FreeNASInputPanel', {
> > + isCreate: me.isCreate,
> > + storageId: me.storageId
> > + });
> > +
> > + Ext.apply(me, {
> > + subject: 'FreeNAS Storage',
>
> you add the storage type to format_storage_type, but here you do not use it, is there a reason?
>
I don't get this. Please elaborate?
--
Hilsen/Regards
Michael Rasmussen
Get my public GnuPG keys:
michael <at> rasmussen <dot> cc
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xD3C9A00E
mir <at> datanom <dot> net
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xE501F51C
mir <at> miras <dot> org
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xE3E80917
--------------------------------------------------------------
/usr/games/fortune -es says:
Government [is] an illusion the governed should not encourage.
-- John Updike, "Couples"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.proxmox.com/pipermail/pve-devel/attachments/20170613/5e64cda3/attachment.sig>
More information about the pve-devel
mailing list