Commit Graph

20 Commits

Author SHA1 Message Date
Dominic Jäger
f09f1c27ad ui: eslint: Miscellaneous eslint fixes
Function syntax, raw words, string templates, no prototype builtins

Signed-off-by: Dominic Jäger <d.jaeger@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-18 15:22:05 +02:00
Dominic Jäger
46d9a35c33 ui: eslint: fix usage of 'me'
Signed-off-by: Dominic Jäger <d.jaeger@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-18 15:22:05 +02: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
Dominik Csapak
06c8315d86 fix #3182 #3183: change backup retention mask logic
instead of relying on the contentTypeField (which does not need to
exists, e.g. for iscsi), explicitely write it into the panel/icon
mapping and check that

better would be if we query the backend about storage capabilities,
but such an api call does not exist yet, so this should be ok for now

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-12-02 18:03:23 +01:00
Thomas Lamprecht
e3022813ec ui: storage edit: ensure to set keep-all by default
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-11-25 14:49:23 +01:00
Thomas Lamprecht
a55b3b717f ui: storage edit: avoid returning prune values if unsupported
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-11-25 13:15:19 +01:00
Thomas Lamprecht
d994d2a712 ui: storage: base: allow adding extra tab panels
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-11-24 23:06:21 +01:00
Thomas Lamprecht
54a589be68 ui: dc/storage: set onlineHelp for prune tab in edit window
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-11-24 17:09:51 +01:00
Fabian Ebner
56fad7c4e6 ui: storage: show no-keeps hint exactly when needed
extracting the logic from the previous checkbox listener into a function, which
is also called on field changes and once in afterrender. Calling it initially
makes sure the hint is also displayed at the beginning when editing a storage
with no retention options configured, and the initial disabling of the input
fields for the isCreate case now also happens through that call.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2020-11-24 15:45:24 +01:00
Thomas Lamprecht
c2d24034d5 followup code cleanup
actually cleaning up the initial state, the last patch was OK as is..

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-11-24 13:38:52 +01:00
Dominic Jäger
93489d898b storage: base edit: Don't send delete during creation
... as this is now allowed by the API (createSchema() in PVE::SectionConfig).
It is only allowed by the update API call (updateSchema()).

Signed-off-by: Dominic Jäger <d.jaeger@proxmox.com>
2020-11-24 13:23:40 +01:00
Thomas Lamprecht
e194ea7c12 ui: avoid ||=
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-11-23 20:12:56 +01:00
Thomas Lamprecht
5b7ab402c4 ui: storage: pbs: add hint for backup retention
Normally it's better to configure pruning (backup retention) on the
backup server only, as then multiple client settings may not
interfere with each other due to outdated or to strict prune
settings (remember, the strictest prune setting always wins).

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-11-23 19:33:02 +01:00
Thomas Lamprecht
017889f1c3 storage: base edit: add Backup Retention tab
Support all prune keep- settings we have.

masked if the storage cannot support backups.

We do not care if it is disabled as content type for now, a user can
just set them nonetheless (could show a hint though).

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-11-23 19:33:02 +01:00
Thomas Lamprecht
232415d99d storage: base edit: move main inputpanel into tab panel
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-11-23 19:13:18 +01:00
Thomas Lamprecht
4a45a1d9c8 ui: storage base panel: cope with undefined column2
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-11-23 19:13:18 +01:00
Thomas Lamprecht
71dec88f99 ui: storage: implement apiCallDone callback for storage input panels
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-11-15 14:56:37 +01:00
Thomas Lamprecht
f3c1eac7f0 sdn: add onlineHelp references and various nits
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-05-10 21:00:49 +02: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