Commit Graph

204 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
91a47a766f ui: eslint: State equalities more precisely
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
5eb9b7b1b0 ui: eslint: Functions may not be completely empty
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
55ee6ba132 ui: eslint: No unused or duplicate variables
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
55871e9e34 ui: storage status: use SI units for usage for consitency with RRD chart
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-05-07 18:15:05 +02:00
Thomas Lamprecht
97edb617c4 ui: rbd: move namespace to advanced section
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-04-26 20:16:45 +02:00
Aaron Lauterer
2d6f898b2a ui: RBDStorage: add field for RBD namespace
Makes it possible to configure the RBD namespace via the GUI.

RBD namespaces must be configured manually. The most likely use case is
when connecting to an external Ceph cluster as this makes it possible to
separate client PVE clusters by namespace, not by pool.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
2021-04-26 20:10:47 +02:00
Thomas Lamprecht
74b6a95945 ui: storage: backups: allow to edit notes also here
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-04-23 16:47:32 +02:00
Thomas Lamprecht
6e339db129 ui: backup views: unfiy button order in storage and guest backup view
and group better, avoid alternating by destroying and restoring
button (prune, file restore, remove) and place file restore and
restore together

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-04-23 16:46:10 +02:00
Fabian Grünbichler
4c02fcfd0a file-restore: pass in full volume ID
not just the snapshot name.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-04-23 15:32:10 +02:00
Stefan Reiter
84ae9c8a19 backupview: add file restore button
Adds it for both BackupViews, on VM view and storage view.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2021-04-23 15:32:08 +02:00
Dominik Csapak
c95917c263 ui: use pmxInfoWidget instead of pveInfoWidget
to prevent that they further diverge than they alread have
(pmxInfoWidget got an additional function that is compatible)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-04-23 10:37:55 +02:00
Dominik Csapak
e3c4b75d9e ui: panel/StatusView: use from widget-toolkit instead
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-04-22 18:34:34 +02:00
Fabian Ebner
b9635c9b99 ui: use safe destroy window from proxmox-widget-toolkit
for the remaining (i.e. non-guests) users.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-04-22 13:02:45 +02:00
Stefan Reiter
878bbf0b96 ui: restore: add live-restore checkbox
Add 'isPBS' parameter for Restore window so we can detect when to show
the 'live-restore' checkbox.

Includes a warning about this feature being experimental for now.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2021-04-15 17:18:40 +02:00
Thomas Lamprecht
399ffa767f ui: eslint: enforce "dot-notation" rule
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-01-19 17:45:01 +01:00
Thomas Lamprecht
53e3ea8488 ui: eslint: enforce "no-extra-parens" rule
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-01-19 17:42:36 +01:00
Thomas Lamprecht
ef725143c6 ui: eslint: enforce "no-unneeded-ternary" rule
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-01-19 17:41:11 +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
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
Dominik Csapak
57f6c79b08 ui: storage: find the correct storage record
by default, findRecord only anchors at the beginning, e.g.
findRecord('id', 'foo');
could find either an entry with id 'foo', 'foobar', 'foobaz', etc.

extend the call to set 'exactMatch' to true, else we sometimes
used the content types of storage e.g., 'local-lvm' for showing
the panels for 'local'

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-11-26 10:52:07 +01:00
Fabian Grünbichler
a6f6ed5a06 ui: don't refer to enc key as 'master key'
the master key is something entirely different, this might confuse
users..

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2020-11-26 10:42:20 +01:00
Thomas Lamprecht
903e646d7c ui: pbs: set onlineHelp (again)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-11-25 16:19:50 +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
Dominik Csapak
13a0434066 ui: pbs key show: improve labelWidth for 'Key' in translations
it is not that short in other languages, e.g. German

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-11-25 13:19:30 +01:00
Dominic Jäger
ba854589f4 ui: storage: pbsedit: Fix spelling
No e in unusable.

to loose means to free from restraint, or to make less tight or strict [1].
to lose means to fail to keep, or to miss something from one's possession [2].
So "losing" (instead of "loosing") would be bad.

[0] https://www.merriam-webster.com/dictionary/unusable
[1] https://www.merriam-webster.com/dictionary/loose
[2] https://www.merriam-webster.com/dictionary/lose

Signed-off-by: Dominic Jäger <d.jaeger@proxmox.com>
2020-11-25 13:16:30 +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
a4b871296f ui: storage content: add encryption and verification columns for PBS
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-11-24 23:36:02 +01:00
Thomas Lamprecht
ebea3f4507 ui: storage content: allow to specify extraColumns (again)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-11-24 23:34:25 +01:00
Thomas Lamprecht
1be81ae0d6 ui: storage/browser: pass storage plugin type to content panels
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-11-24 23:33:57 +01:00
Thomas Lamprecht
cfc3a1665a ui: storage: pbs paperkey: print short fingerprint in heading
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-11-24 23:32:20 +01:00
Thomas Lamprecht
db364c61bb ui: storage: pbs: move datastore field to right column for balance
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-11-24 23:10:26 +01:00
Thomas Lamprecht
14ba33fbff ui: storage: pbs: improve encryption key handling
Move encryption key handling in its own tab.

Allow uploads, warn more visible on edit/remove

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-11-24 23:10:26 +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
Fabian Ebner
e969d18761 ui: storage backup view: add prune window
adapted from PBS. Main differences are:
    * API has GET/DELETE distinction instead of 'dry-run'
    * API expects a single property string for the prune options

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2020-11-24 14:13:20 +01:00
Dominik Csapak
ef402242d8 ui: change comment column to notes
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-11-24 13:47:07 +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
370fc0c498 storage: drop max backup fields, replaced by pruning
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
Fabian Ebner
b5ee2676fd ui: make remaining content views not stateful
Commit 2dcc87c798 removed the statefulness from
the other storage content views, so remove it from the remaining ones too.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2020-11-22 18:39:16 +01:00