Commit Graph

644 Commits

Author SHA1 Message Date
Dietmar Maurer 03d4c9217d update OnlineHelpInfo.js 2021-03-17 10:16:34 +01:00
Dominik Csapak 84d3284609 ui: tape/DriveStatus: open task window on click on state
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-03-16 09:00:07 +01:00
Dominik Csapak 70fab5b46e ui: tape: convert slot selection on transfer to combogrid
this is much handier than number field, and the user can instantly
see which one is an import/export slot

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-03-16 08:57:48 +01:00
Dominik Csapak e36135031d ui: tape/Restore: let the user choose an owner
so that the tape backup can be restored as any user, given
the current logged in user has the correct permission.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-03-16 08:55:42 +01:00
Thomas Lamprecht 8b7f3b8f1d ui: fix typo in comment
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-03-10 15:24:39 +01:00
Oguz Bektas 3f6c2efb8d ui: fix typo in options
Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
2021-03-10 15:23:17 +01:00
Dominik Csapak dcf155dac9 ui: tape: increase tapestore interval
from 2 to 60 seconds. To retain the response time of the gui
when adding/editing/removing, trigger a manual reload on these actions

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-03-10 11:00:10 +01:00
Dominik Csapak 3c5b523631 ui: NavigationTree: do not modify list while iterating
iterating over a nodeinterfaces children while removing them
will lead to 'child' being undefined

instead collect the children to remove in a separate list
and iterate over them

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-03-10 10:59:59 +01:00
Thomas Lamprecht 9a8bf2cac9 ui: navigation: adapt tape icons also here
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-03-08 17:06:57 +01:00
Thomas Lamprecht cc5ef79bec ui: tape drive icon: invert
Less anti-aliasing to do, so it looks better when small.

Note, I use a mask as else we could not cut out something
transparent, but only over paint it filled with white, which is not
the same and not how font awesome does it.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-03-08 15:51:49 +01:00
Thomas Lamprecht 3725d95c65 ui: tape panel: add/use icons
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-03-08 14:35:36 +01:00
Thomas Lamprecht 4fb068019e ui: tape: code style: xtype coms first
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-03-08 14:35:36 +01:00
Dominik Csapak 6446a078a0 ui: tape/window/Tape{Backup, Restore}: allow empty notify user field
we have to set skipEmptyText on comboGrids

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-03-08 14:29:36 +01:00
Dietmar Maurer 9bcdade85f ui: remove cartridge memory panel (show window after butten press instead) 2021-03-08 12:52:06 +01:00
Dietmar Maurer b0156179b9 ui: fix date rendering in drive status 2021-03-08 11:30:12 +01:00
Dominik Csapak d0a0bad9d6 ui: tape/Drive{Config, Status} move actions to status panel
so that the 'DriveConfig' panel is purely for configuration

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-03-08 11:18:25 +01:00
Dominik Csapak a4003d9078 ui: tape/DriveStatus: add cartridge memory grid
that the user can load when a tape is inserted

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-03-08 11:18:01 +01:00
Dietmar Maurer fd641b99c3 ui: add online help to drive/changer status 2021-03-08 09:47:44 +01:00
Dietmar Maurer 225affc9ca tape: add docu link targets for online help 2021-03-08 09:37:40 +01:00
Thomas Lamprecht 218ee3269f ui: images: simplify tape icon
1. Use same height as width
2. drop the top/bottom "frame" lines
3. instead of two "bearings" side by side, like VHS or music-compact
   tapes have, use a single bearing and an outer circle to denote the
   magnetic tape edge

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-03-08 09:02:32 +01:00
Dominik Csapak be8adca115 ui: tape: add notify-user fields
to backup jobs, backups and restores

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-03-05 12:53:41 +01:00
Dietmar Maurer ee33795b72 acl: use /tape/device instead of /tape/drive and /tape/changer 2021-03-05 10:06:19 +01:00
Dietmar Maurer 6b303323be ui: use shorter datetime format for encryption key creation time 2021-03-04 17:57:40 +01:00
Dietmar Maurer 1576c7a0d9 ui: do not show MediaSet Uuid in backup content grid 2021-03-04 17:09:57 +01:00
Dietmar Maurer b74a1daae9 ui: add acl paths for tape permission 2021-03-04 08:33:26 +01:00
Dominik Csapak bec357e2cb ui: tape: add missing monStoreErrors calls for the grids
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-03-03 16:09:39 +01:00
Dominik Csapak 7d6f03a7fe ui: tape: only add tapestore and nav element once
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-03-03 16:09:39 +01:00
Dominik Csapak b83e136fb6 ui: tape/DriveStatus: fix handler name for eject
We call 'ejectMedia' not 'eject', so rename the function.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-03-03 16:09:39 +01:00
Thomas Lamprecht 5c4203b20c ui: webauthn registration: code cleanup long variable name
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-03-03 14:05:05 +01:00
Thomas Lamprecht 7f9eef1d47 ui: webauthn registration: adapt error messages
There are variuos hints that 'InvalidStateError' can be assumed to
come from an already registered token[0][1].

So indicate that more strongly, also omit the extra line and warning
triangle, there's already an error icon present.

[0]: step 2: https://w3c.github.io/webauthn/#sctn-registering-a-new-credential
[1]: step 3: https://w3c.github.io/webauthn/#sctn-op-make-cred

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-03-03 14:05:05 +01:00
Dominik Csapak a8a0132766 ui: LoginView: show webauthn errors in window
instead of silently discarding the error, else the user might be
confused because nothing happened

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-03-03 14:05:05 +01:00
Dominik Csapak 831c43c91b config/tfa: webauthn: disallow registering a token twice
by adding the existing credential id to the 'excludeCredentials' list

this prevents the browser from registering a token twice, which
lets authentication fail on some browser/token combinations
(e.g. onlykey/solokey+chromium)
while is seems this is currently a bug in chromium, in a future spec
update the underlying behaviour should be better defined, making this
an authenticator bug

also explicitly catch registering errors and show appropriate error messages

0: https://bugs.chromium.org/p/chromium/issues/detail?id=1087642

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-03-03 14:05:05 +01:00
Dominik Csapak b452e2df74 Revert "ui: window/Settings / WebAuthn: add browser setting for userVerificationo"
even if the options *could* be set in the frontend, the backend
actually has to do validation of those settings, thus we should not
make that a browser setting

additionally, having the value 'preferred' does not actually make sense,
since it does not add any security (the backend skips the
userverification check then)

This reverts commit aca4c2b5a9.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-03-03 14:05:05 +01:00
Dietmar Maurer 40bf636b47 ui: enable experimental tape UI if tape.cfg exists 2021-03-03 09:02:02 +01:00
Dominik Csapak 347cde827b dashboard: fix datastore full estimate for not changing usage
If the usage of a datastore did not change, we did not
return an estimate. The ui interpreted this as 'not enough data', but
it should actually be 'never'.

Fixing this by always setting the estimate first to 0 and overwriting
if we successfully calculated one, and checking for 'undefined' in the ui.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-03-02 17:51:13 +01:00
Dietmar Maurer ac4a1fb35c ui: render medium-wearout as percentage 2021-03-02 13:08:01 +01:00
Dominik Csapak 6f3714b9aa ui: tape/DriveStatus: use the drive state to determine a status-load
since the status api call blocks the drive, it only makes sense to do
when the drive is idle.

so do not reload on activate, but when the drive changes the first
time from busy to idle

also disable the reload button when the drive is busy

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-03-02 12:52:39 +01:00
Dominik Csapak d810014eeb ui: tape/DriveStatus: add state to Info panel
and optimize the updateData function a bit

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-03-02 12:52:26 +01:00
Dominik Csapak e0f6892625 ui: tape/DriveStatus: add more status lines
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-03-02 12:51:50 +01:00
Dominik Csapak 9d5b426a6d ui: tape: refactor renderDriveState to Utils
we will use this later again

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-03-02 12:51:38 +01:00
Dietmar Maurer 2970cd3d6d ui: use TaskProgress for clean drive 2021-03-02 12:16:30 +01:00
Dietmar Maurer d41114c5a8 ui: fix changer panel reload after clean 2021-03-02 12:09:00 +01:00
Dietmar Maurer 6c92449702 ui: improve media pool config grid - add comment field 2021-03-02 11:43:25 +01:00
Dietmar Maurer 5a4233f07b ui: use fa-navicon for tape changer 2021-03-02 10:07:42 +01:00
Dietmar Maurer 3c715edd07 ui: correctly enable/disable changer drive buttons 2021-03-02 09:54:33 +01:00
Dietmar Maurer bbe05d7fe9 ui: add 'Clean' button to changer drive (remove clean action) 2021-03-02 08:59:00 +01:00
Dietmar Maurer 2af8b8ef91 ui: add 'Catalog' button to changer drive 2021-03-02 08:53:18 +01:00
Dietmar Maurer d4bfdfe749 ui: add 'Label Media' button to changer drive 2021-03-02 08:44:29 +01:00
Dominik Csapak e8bf4f31f2 ui: tape: fix eslint warnings
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-03-01 14:18:44 +01:00
Dominik Csapak 6682461d88 ui: tape/DriveConfig: remove label/catalog/eject buttons
they live now in the drive status panel

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-03-01 14:18:23 +01:00
Dominik Csapak 41f1132e0e ui: tape/DriveStatus: add label/eject/catalog buttons
and enable them only if the status says that a tape is inserted.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-03-01 14:18:10 +01:00
Dominik Csapak d938c9337a ui: tape/BackupOverview: add sublevel for groups
For tapes with many snapshots/group, a simple list of them is too
big. Instead, add a level for just the groups, this makes searching
for a specific backup much easier.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-03-01 14:17:53 +01:00
Dominik Csapak 9896a75caf ui: tape/ChangerStatus: handle vanishing view during reload
since reload is an async function, the view can be destroyed during
any 'await' point. Subsequent accesses to the view will fail, and we
will land in the catch. Check there if the view is destroyed, and
do not raise an error with the user then

also cancel any outstanding timer on 'deactivate' and 'destroy'

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-03-01 14:01:31 +01:00
Dominik Csapak 7eefd0c3d7 ui: tape: ChangerStatus: remove changerselector combobox
because we now select it directly in the left-hand tree
so we have to adapt the changer to the one set by the router
and not by the drop down field

and remove it from the TapeManagement tabpanel

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-03-01 12:36:09 +01:00
Dominik Csapak 2e268e311c ui: NavigationTree: add entries for changers/drives
and only check TapeManagement once in the init function

we now have 2 updatestores that update individually
(one for datastores, one for drives/changers)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-03-01 12:35:43 +01:00
Dominik Csapak 3e182fd828 ui: MainView: adapt router to add changer/drive entries
by generalizing the isDataStorePath logic to a 'parseRouterPath'.

We still have to keep the isDataStore logic for tabpanel handling,
If we add tabs to changer-/drivestatus panels, we have to adapt
that too.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-03-01 12:34:37 +01:00
Dominik Csapak 7b60850334 ui: tape: add DriveStatus panel
not used yet

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-03-01 12:33:53 +01:00
Dietmar Maurer 1552d9699c tape: add 'Restore Key' button 2021-03-01 11:11:38 +01:00
Dietmar Maurer 7507b19cd2 OnlineHelpInfo.js: update 2021-03-01 11:11:07 +01:00
Dietmar Maurer 31cba7098d ui: rename 'Changer Slot' to 'Drive Number' 2021-02-27 09:51:13 +01:00
Dietmar Maurer f4571b0b50 ui: use grouping feature for drive configuration grid 2021-02-27 09:37:47 +01:00
Dietmar Maurer 464c409aa3 ui: tape inventory - allow to set/clear media status 2021-02-26 11:06:11 +01:00
Dietmar Maurer ed24142767 ui: TapeInventory - show catalog status
Clearly mark tapes without valid catalog.
2021-02-26 07:48:13 +01:00
Dietmar Maurer 05228f17f5 ui: use button for tape Catalog (instead of action) 2021-02-25 13:04:50 +01:00
Dietmar Maurer e8653b96be ui: add tape drive Eject button 2021-02-25 12:52:04 +01:00
Dietmar Maurer 1cf191c597 ui: fix sumbit url in LabelMedia.js 2021-02-25 12:25:32 +01:00
Dietmar Maurer 3d3e31b7f8 ui: factor out common code 2021-02-25 11:52:42 +01:00
Dietmar Maurer 8730cfcc3e ui: use butten for 'Label Media' (instead of action icon) 2021-02-25 11:00:24 +01:00
Dietmar Maurer 21e3ed3449 tape: add 'latest-only' property to backup job config 2021-02-24 11:19:12 +01:00
Dietmar Maurer 81678129fb ui: improve tape job edit (add eject-media and export-media-set)
And do not auto-generate job id.
2021-02-24 08:42:58 +01:00
Dominik Csapak ff2bc2d21f ui: tape/BackupJobs: add CRUD functions
similar to the other jobs grids (add/edit/remove etc.)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-02-23 13:18:10 +01:00
Dietmar Maurer 41685061f7 tape: volume-statistics - use format_size to display byte counts 2021-02-23 11:38:41 +01:00
Dietmar Maurer 35a7ab5778 ui: use grid to display tape drivbe status 2021-02-23 11:29:43 +01:00
Dietmar Maurer e1beaae4a2 ui: fix tape volume statistics 2021-02-23 11:20:27 +01:00
Dietmar Maurer 965bd58693 ui: use grid to display tape label information 2021-02-23 11:13:48 +01:00
Dominik Csapak 60473d234a ui: tape/ChangerStatus: do not show progress on drive clean
since we have the state in the grid

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-02-23 09:16:10 +01:00
Dominik Csapak 4f688e09a4 ui: tape/ChangerStatus: do not show progressbar for (un)load
since we already show the state of the drive in the grid, this is
not necessary

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-02-23 09:10:21 +01:00
Dominik Csapak 24e84128e4 ui: tape/ChangerStatus: add missing model fields
the DiffStore only updates the fiels given in the model, so we have to
list all the fields we depend on, else we have incomplete data,
e.g. for rendering

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-02-23 09:09:41 +01:00
Dominik Csapak e63457b6b2 ui: tape/ChangerStatus: disable drive buttons when it's blocked
if the drive state is not empty, some action blocks it, so we cannot
do any task anyway. Since we now refresh the state every 5 seconds,
we can disable/enable them 'live'.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-02-23 08:37:16 +01:00
Dominik Csapak a83cedc2ac ui: tape/ChangerStatus: convert grid stores to DiffStores
to not deselect items when the store is updated

this makes the ui a bit better to use

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-02-23 08:36:51 +01:00
Dominik Csapak 076afa6197 ui: tape/ChangerStatus: reload changer status (cached) every 5000ms
so that we can have an updated drive status without having to
press 'reload'

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-02-23 08:35:42 +01:00
Dominik Csapak 423e3cbd18 ui: tape/ChangerStatus: only show loading on 'force refresh'
so that we can update in the background without interfering with the
users workflow

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-02-23 08:34:54 +01:00
Dietmar Maurer cbd9899389 tape: update changer status cache after load/unload 2021-02-20 09:06:17 +01:00
Dominik Csapak aca4c2b5a9 ui: window/Settings / WebAuthn: add browser setting for userVerificationo
some fido2/webauthn keys can have a pin, and the client can request
a mode for the user verification.

'default' (no value set), lets the browser/device decide if the user has to
enter the pin of the device
'discouraged' requests that the user should not need to enter the pin
'preferred' requests that the user should need to enter the pin (if possible)

since we use webauthn only as a 2nd factor, having the user enter
the device pin on login may seem too much hassle for some users, so
give them the option

since this is a client option anyway, do not save it in the backend, but
in the browser local storage

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-02-19 16:53:06 +01:00
Dominik Csapak 85eedfb78b ui: add browser settings window
mostly copied from pve (for now; will refactor when i add it to
pmg too (soon)) without the pve specific features like dashboard
storages

contains some eslint fixes comparing to pves window

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-02-19 16:52:50 +01:00
Dominik Csapak f26276bc4e ui: tape/ChangerStatus: fixup for conditional
the statement !a === "somestring" cannot be true since
!a is either true or false and thus not a string

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-02-19 16:52:26 +01:00
Dominik Csapak 6d62e69f9a ui: tape: fix eslint warnings (trailing comma)
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-02-19 16:52:12 +01:00
Dominik Csapak 0d890ec414 ui: tape/ChangerStatus: show the state of the drive
an optimize the columns for smaller layouts (1280 width)
we show either:
* Idle
* spinner + status (if no upid)
* spinner + rendered UPID (clickable, opens task viewer)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-02-19 10:21:40 +01:00
Dietmar Maurer e6122a657e ui: cleanup - reuse existing code 2021-02-19 09:14:31 +01:00
Dietmar Maurer 9e860ac01a ui: tape/BackupJobs.js - render task scheduling status 2021-02-19 09:08:00 +01:00
Dietmar Maurer 7aa4851b77 ui: start tape backup job GUI 2021-02-18 12:48:54 +01:00
Dietmar Maurer 6ef8e2902f ui: tape/ChangerStatus.js - avoid update status in list_media
We do not use the media location, so there is no need to update
the online status in the list_media call. Besides, we already update
the online status when we query the changer/status.
2021-02-18 12:06:49 +01:00
Dietmar Maurer aa16b7b284 ui: tape/ChangerStatus.js - only update status for selected changer
To reduce load/wait time.
2021-02-18 11:08:13 +01:00
Dietmar Maurer 65535670f9 ui: tape/TapeInventory.js - avoid update changer status
We do not update changer status by default - only when pressing "Reload" button.
2021-02-18 10:10:51 +01:00
Dominik Csapak 9d42fe4d3b ui: tape/TapeInventory: set defaultValue for pool to ''
otherwise the grouping feature of the grid gets confused as it encounters
undefined values

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-02-18 09:35:05 +01:00
Dominik Csapak 918a367258 ui: tape/ChangerStatus: adapt load/unload to WorkerTask
those are now workertasks (behind a 'POST' request), so show the
progress with the upid

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-02-18 09:34:53 +01:00
Dominik Csapak 970a70b41e ui: tape/ChangerStatus: rename 'slot' column to 'id'
slot is already in the title of the grid, and hide it by default for
drives (the user does not need it there)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-02-18 09:34:40 +01:00
Dominik Csapak 4094fe5a31 ui: tape/ChangerStatus: add Inventory column to drives/import-export
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-02-18 09:34:04 +01:00
Dietmar Maurer dea8e2cb54 ui: improve task description for loat/unload media 2021-02-18 09:24:56 +01:00
Dietmar Maurer bbe06f97be ui: tape/TapeInventory.js - use grid grouping feature - group by pool 2021-02-18 07:30:37 +01:00