Commit Graph

214 Commits

Author SHA1 Message Date
Thomas Lamprecht
57513f7639 ui: rename pveEditPruneInputPanel to pveBackupJobPrunePanel
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-09-08 12:56:15 +02:00
Fabian Ebner
9c4c579725 ui: prune edit: prepare for being re-used for backup jobs
1. Rename the isPBS variable to match the actual purpose. When editing
a backup job, the hint should not be shown, even if the storage is
PBS.

2. Allow specifying the text used for the fallback hint. For backup
jobs, the first fallback is the storage configuration, so the text
needs to be different there.

3. Make using keep-all=1 by default upon creation optional. For backup
jobs, the default should be "use fallback", i.e. no settings.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-09-07 11:13:18 +02:00
Fabian Ebner
1bc75c2f82 ui: factor out input panel for editing prune settings
To be re-used for configuring job-specific retention options for
backups.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-09-07 11:13:18 +02:00
Thomas Lamprecht
624271842b ui: iscsi: code cleanup
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-06 12:38:02 +02:00
Thomas Lamprecht
a1592429a3 ui: cifs: do not send empty user/password
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-06 07:38:47 +02:00
Thomas Lamprecht
01366f9e8c ui: move download URL to storage window into own file
As 200 lines is a bit much for the content view, i.e., basically
growing it by 50% in size for a very specific feature is not ideal.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-03 00:45:09 +02:00
Lorenz Stechauner
af3c0a9287 fix #1710: ui: storage: add download from url button
uses the common function PVE::Tools::download_file_from_url to
download a iso image or container template.

note: Only users with permissions `Sys.Audit` and `Sys.Modify` on
`/` are permitted to use the api endpoints due to security reasons.
(it is possible to download files from internal networks which would
be not visible/accessible from outside)

Signed-off-by: Lorenz Stechauner <l.stechauner@proxmox.com>
Reviewed-By: Dominik Csapak <d.csapak@proxmox.com>
2021-07-03 00:36:26 +02:00
Thomas Lamprecht
ffeb4f57e6 ui: storages: add basic BTRFS edit/add window
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-23 22:59:29 +02:00
Fabian Ebner
c4aa56eb38 ui: storage: update hint about prune-backups default
and also remove the keepLastEmptyText, which too suggested the old default.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-06-16 13:28:54 +02:00
Dominic Jäger
f9fa832270 ui: storage/PBS edit: eslint fixes
Signed-off-by: Dominic Jäger <d.jaeger@proxmox.com>
2021-05-19 12:12:36 +02:00
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