Commit Graph

249 Commits

Author SHA1 Message Date
Thomas Lamprecht
faaae2a2bb ui: pbs paperkey: cleanup iframe for printing after window close
Reported-by: Aaron Lauterer <a.lauterer@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-03-13 10:48:35 +01:00
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
Christoph Heiss
73e1cfa94c ui: storage backup view: Update remove button on protection change
Currently this works in the backup view for containers/VMs, but not in
the storage backup view. Implement that for the latter part too.

Uses the callback functionality of the load() method of the store to
properly update the UI as soon as the loading has finished.
While at it, refactor the same thing in the grid backup view as well,
removing the current hack in the process.

Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2023-01-19 18:20:34 +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
d88be4349b ui: storage: ZFS panel: modernize & cleanup code
using cbind + pmxDisplayEditField, getting rid of initComponent

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
df60e210d7 ui: storage: iSCSI panel: modernize, cleanup & improve UX
using cbind + pmxDisplayEditField, getting rid of initComponent

Disables the target selector until a portal is entered. For this, we
currently cannot use the pmxDisplayEditField, since that
disabled/enables the fields automatically based on 'editable'.

Also setting buffer for the portal entry change handler to 500ms (so that
we don't query the backend that often)

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
fa84bd595f ui: storage: LVM-Thin panel: modernize & cleanup code
using cbind + pmxDisplayEditField, getting rid of the initComponent

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
Thomas Lamprecht
7b696d5a12 ui: storage backup view: refactor/modernize code style slightly
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-01-16 14:21:52 +01:00
Stefan Hanreich
fdde857a89 fix #4393: ui: storage backup view: make pbs-specific columns sortable
The sort order is analogous to how it behaves in the datastore content
overview in pbs.

This means sorting in ascending order behaves as follows:

Verify State
* failed
* none
* ok

Encryption
* no
* yes

For the encryption state there is theoretically a distinction between
signed and encrypted, but as far as I can tell we do not render this
distinction in PVE, which is why I chose to not make this distinction
for sorting as well.

Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
2023-01-16 14:04:22 +01:00
Thomas Lamprecht
7ef80fa8a4 ui: storage browser: code cleanup/modernization
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-01-10 13:51:53 +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
Dominik Csapak
13799d5b9e ui: eslint: fix undefined check
'typeof' cannot return 'undefined' only the string '"undefined"', newer
eslint versions detect that as error

to fix it, directly check it for undefined instead of using typeof

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2022-09-16 12:50:56 +02:00
Thomas Lamprecht
26f68e6534 ui: storage: add namespace support when creating PBS storage
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-05-12 15:07:38 +02:00
Thomas Lamprecht
5a912de3f3 ui: storage content: support filtering by notes for backups
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-05-02 15:26:21 +02:00
Fabian Ebner
4981660f2a ui: storage edit: retention: add max-protected-backups setting
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2022-04-06 14:07:21 +02:00
Fabian Ebner
e39843e944 ui: cephfs: use more descriptive field label and gettext
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2022-01-28 12:07:45 +01:00
Aaron Lauterer
42c455fcd7 ui: rbd: cephfs: add keyring/secret field for external clusters
Manual switching of xtype because binding 'hidden' does not work with
pmxDisplayEditField.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
2022-01-28 12:07:37 +01:00
Fabian Ebner
392e3cf11d sorters: use correct property 'direction' and keep default 'ASC'
Ext.util.Sorter does not have an 'order' property, so 'order: DESC'
didn't have an effect. The default is 'ASC' and it is arguably the
preferred direction for all affected sorters anyways.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-12-16 10:11:48 +01:00
Fabian Ebner
9082d8d0f9 backup views: sort backups by vmid, then descending by date
to have the most recent ones first, while keeping backups from the
same guest together.

Suggested-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-12-15 16:01:40 +01:00
Thomas Lamprecht
2b28954745 ui: backup views: disable remove button on protected backups
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-11-16 13:57:22 +01:00
Thomas Lamprecht
528c24b569 ui: make protected column header use the icon only
to avoid using to much space, as the icon appears on hitting "change
protection" and the tooltip is set to "Protected" it should be still
quite clear.

Further UX improvement can be made by adding a context menu with can
use words for all actions

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-11-16 13:57:03 +01:00
Dominik Csapak
bc54c47377 ui: render 'protected' column as icon and enable sorting
instead of 'Yes' and 'No', render the same icon as in pbs for protected
backups, and leave the column empty otherwise

this makes the difference much more visible and is more consistent with
how we present that flag in pbs

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-11-16 13:57:03 +01:00
Dominik Csapak
786e7d8328 ui: storage/cephfs: make ceph fs selectable
by adding a CephFSSelector and using it in the CephFSEdit window
(similar to the poolselector/textfield)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-11-11 17:52:08 +01:00
Thomas Lamprecht
e82d35836c ui: storage: avoid deleting preallocation setting on creation
reported in the forum: https://forum.proxmox.com/threads/.99471/

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-11-10 22:03:13 +01:00
Lorenz Stechauner
f9f45aaca7 ui: refactor UploadToStorage.js
this also removes the "content" selector from the window.
as far as it seems, this selector was never able to select
more than one entry, so it was useless.

the check for FormData() is also removed, because this is
supported by all major browsers for a long time. therefore
doStandardSubmit() is also not necessary.

Signed-off-by: Lorenz Stechauner <l.stechauner@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
Tested-by: Dominik Csapak <d.csapak@proxmox.com>
2021-11-10 09:21:44 +01:00
Lorenz Stechauner
26bfeca185 ui: move upload window into UploadToStorage.js
Signed-off-by: Lorenz Stechauner <l.stechauner@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
Tested-by: Dominik Csapak <d.csapak@proxmox.com>
2021-11-10 09:21:44 +01:00
Fabian Ebner
b4818ea7b1 ui: backup views: add button to change protection status
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-11-09 11:33:16 +01:00
Fabian Ebner
61cf265897 ui: backup views: add protected column
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-11-09 11:33:16 +01:00
Fabian Ebner
c0eadd5543 ui: storage content: avoid redundant options hasNotesColumn and hideColumns
Replace both by a showColumns option instead. As the current use of
hasNotesColumn already indicates, when new content-specific columns
are added, it is more natural for each derived class to specify the
columns it wants, rather than those it doesn't.

For hideColumns, there was no user. For hasNotesColumn, the only user
was the backup view.

Set the column information in the storage.BackupView class itself
rather than the instance (like hasNotesColumn was).

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-11-09 11:33:16 +01:00
Dominik Csapak
4b105ec574 ui: storage/PBSEdit: do not send server on edit
it's a fixed value for the storage config, so the api would reject it

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-10-28 15:55:42 +02:00
Lorenz Stechauner
ae595bc16c ui: storage/PBSEdit: add port to server field
this gives users the chance to supply the port nr in the gui,
without having to add a extra new field to the panel.

using the same implementation as in RemoteEdit.js in PBS.

Signed-off-by: Lorenz Stechauner <l.stechauner@proxmox.com>
2021-10-28 15:46:24 +02:00
Lorenz Stechauner
bb157f5d6d fix 3850: ui: storage: using PreallocationSelector for file based storage types
Signed-off-by: Lorenz Stechauner <l.stechauner@proxmox.com>
Reviewed-by: Fabian Ebner <f.ebner@proxmox.com>
Tested-by: Fabian Ebner <f.ebner@proxmox.com>
2021-10-21 12:14:38 +02:00
Dominik Csapak
6c23fbbec0 fix #3620: ui: dc/storage: delete empty pbs fingerprint on edit
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-09-13 12:36:32 +02:00
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