24 Commits

Author SHA1 Message Date
Thomas Lamprecht
04389e49d6 ui: factor out not found rendering to common helper
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-01-21 14:32:53 +01:00
Dominik Csapak
713742ec70 ui: storage: LVM panel: modernize & cleanup code
using cbin, gettin rid of initComponent

this is a bit more complicated than the other refactorings in storage
recently, since we have a few fields with non trivial dependecies
between the selected mode (existing vgs/base storage) and isCreate

Because of that, using a cbind for the xtype here instead of the
pmxDisplayEditField is much more convenient
(accessing the pmxDisplayEditField and the editField below is currently
not really ideal)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-01-18 16:01:08 +01:00
Dominik Csapak
d420b29ae3 ui: storage: move node scan selector inside combobox
by converting the relevant selection boxes to combogrids.
This is done to reduce confusion for how/why to select a node, and
doing it this way it is moved closer to the selection of the actual
value we want. It still restricts the nodes when selecting a specific one.

Show it only when there is more than one node according to the
in-memory PVE.data.ResourceStore info, as for single-node setups
there isn't any other node one could scan anyway.

Suggested-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-01-18 16:01:08 +01:00
Stefan Hrdlicka
b9e706fb85 cleanup: "var" to "let", fix some indentation in related files
Signed-off-by: Stefan Hrdlicka <s.hrdlicka@proxmox.com>
2022-12-21 16:24:04 +01:00
Stefan Hrdlicka
14d9ecc416 fix #2822: add iscsi, lvm, lvmthin & zfs storage for all cluster nodes
This adds a dropdown box for iSCSI, LVM, LVMThin & ZFS storage options where a
cluster node needs to be chosen. As default the current node is
selected. It restricts the the storage to be only availabe on the
selected node.

Signed-off-by: Stefan Hrdlicka <s.hrdlicka@proxmox.com>
2022-12-21 16:24:04 +01:00
Thomas Lamprecht
8058410f40 ui: eslint: fix various spacing related issues
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-01-19 17:39:15 +01:00
Thomas Lamprecht
f6710aac38 ui: eslint: fix trailing comma and comma related whitespaces errors
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-01-19 17:31:03 +01:00
Thomas Lamprecht
2a4971d8c9 ui: eslint: fix trailing spaces
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-01-19 17:29:55 +01:00
Thomas Lamprecht
3bbce3b8cd drop jslint lines
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-06-06 18:11:47 +02:00
Dominik Csapak
96988dfae0 fix #2017: add help button to storage input panels
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2018-12-07 14:09:14 +01:00
Thomas Lamprecht
f28ec3e4b3 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>
2018-03-28 13:19:41 +02:00
Thomas Lamprecht
ef4ef788d5 use InputPanel from widget toolkit
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
2018-01-25 13:36:38 +01:00
Thomas Lamprecht
56a353b9e7 use RestProxy from widget toolkit
Split PVE specific models, which where not moved to the general
widget toolkit, in a separate folder: data/models/

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
2018-01-25 13:36:38 +01:00
Thomas Lamprecht
9fccc702ec use windowEdit from widget toolkit
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
2018-01-25 13:36:38 +01:00
Thomas Lamprecht
896c0d5019 use Checkbox from widget toolkit
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
2018-01-25 13:36:38 +01:00
Emmanuel Kasper
d5e771ce51 Rename 'create' to 'isCreate' in pveWindowEdit and subclasses
This fixes around 20 jslint type confusion warnings.
Also reduce the scope and document jslint warnings along the way.
No functional changes.
2017-03-02 10:36:35 +01:00
Wolfgang Link
9e9ab96f6d Sort all lists in the storage what we load dynamically.
It locks better if the lists are sorted.
Also if you have long list it makes working easier.
2016-10-06 08:08:51 +02:00
Dominik Csapak
22f2f9d6c0 jslint: remove trailing commas
before ECMA5 trailing commas in arrays and objects
are forbidden

in jslint this is an error and cannot be deactivated

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-04-29 17:06:34 +02:00
Dominik Csapak
ec0bd652db jslint: fix type confusion and property access
fix various type confusion, for example:
items: {} and items: []
style: string and style: {}

also fix object['property'] access with
object.property

also fix /=/ with either '=' or /\=/ where appropriate
(/=/ can be confused with /= according to jslint)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-04-29 17:06:23 +02:00
Dominik Csapak
5ca0c804c6 remove displayfield height hack
this did not work anymore,
instead overwrite css for displayfields to have correct
min-height

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-04-06 16:29:35 +02:00
Dominik Csapak
177de3de1c ext6migrate: fix trailing whitespaces
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-03-10 17:24:53 +01:00
Dominik Csapak
c2317525f0 ext6migrate: fix dropboxes in Storage Edit windows
we fix this by moving the static configuration (especially value and
displayfield) to the class definition

also we remove the scrollbar hack (it works properly now)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-03-10 17:23:20 +01:00
Dominik Csapak
5198365d53 ext6migrate: change PVE.form.NodeSelector to pveNodeSelector
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-03-10 17:22:39 +01:00
Dietmar Maurer
16b294b50c copy storage/LVMEdit.js from manager to manager6 2016-03-08 11:22:42 +01:00