]> git.proxmox.com Git - pve-manager.git/commit - www/manager6/storage/IScsiEdit.js
ui: add storage plugin base class
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 27 Mar 2018 12:19:46 +0000 (14:19 +0200)
committerDominik Csapak <d.csapak@proxmox.com>
Wed, 28 Mar 2018 11:19:41 +0000 (13:19 +0200)
commitf28ec3e4b3e6cca1f45630e75f9858c558680979
tree7da265ca4a249c01339f15eef763716642067385
parentc93ce0adf83931c8a8bb2e11d718da4e843405b4
ui: add storage plugin base class

This removes *a lot* of code duplication.

I add a base class for the storage edit window and for its containing
input panel, they implement the shared stuff. Especially the window
was mostly a 1:1 copy...

I look hard for a way to split up this patch, but I did not really
found one which would not generate a lot of work for no value added
(value being 'revertability' and better git history here).
nd actually not too much happens, the same thing happens just over
and over again.
Thus, I've thrown in the dynamic creation of the storage add menu
items here too.

I remove all storage specific Edit windows, they where all just >95%
duplicates of each other.
Special functionallity, i.e. some data deletion/transforming before
submitting gets done with onGetValues.

For the RBD external vs PVE plugin I just added a minimal child class
to RBD which only tells it'S parent that it is the pve one, this is
nice for the mapping and should be easy to understand when reading
the code.

Tried to test an add and an edit of all visible storage plugins,
seems to be OK now.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
14 files changed:
www/manager6/Makefile
www/manager6/dc/StorageView.js
www/manager6/storage/Base.js [new file with mode: 0644]
www/manager6/storage/CIFSEdit.js
www/manager6/storage/DirEdit.js
www/manager6/storage/GlusterFsEdit.js
www/manager6/storage/IScsiEdit.js
www/manager6/storage/LVMEdit.js
www/manager6/storage/LvmThinEdit.js
www/manager6/storage/NFSEdit.js
www/manager6/storage/RBDEdit.js
www/manager6/storage/SheepdogEdit.js
www/manager6/storage/ZFSEdit.js
www/manager6/storage/ZFSPoolEdit.js