Commit Graph

4840 Commits

Author SHA1 Message Date
Dominik Csapak
4961404c7c api2/config/tape_backup_job: enable update api call
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-02-23 13:17:49 +01:00
Dietmar Maurer
3fbf2311e4 tape: improve backup task logging 2021-02-23 12:58:44 +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
Dietmar Maurer
00fdaaf12b api-viewer: do not show permission for backup/restore protocol
Permission check is done before the H2 upgrade.
2021-02-23 10:04:16 +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
Thomas Lamprecht
0263396187 docs: fix some typos/grammar
Rund `codespell` tool, but it picked up not as much as I hoped.
Rest was found with vim + (hun)spell

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-02-22 18:08:59 +01:00
Dietmar Maurer
043018cfbe doc: fix wrong api method description 2021-02-22 12:10:34 +01:00
Dietmar Maurer
2037d9af03 api-viewer: show permissions 2021-02-22 12:01:24 +01:00
Dietmar Maurer
7f07991035 docs: improve MEDIA_SET_NAMING_TEMPLATE_SCHEMA description 2021-02-22 09:50:16 +01:00
Dietmar Maurer
18ce01caff tape: use correct schema for changer path (SCSI_CHANGER_PATH_SCHEMA) 2021-02-22 09:43:13 +01:00
Dietmar Maurer
5bc8e80a99 cleanup: cleanup use clause (avoid *) 2021-02-22 09:33:29 +01:00
Dietmar Maurer
6252df4c18 docs: fix EXPORT_SLOT_LIST_SCHEMA description 2021-02-22 09:05:07 +01:00
Dietmar Maurer
451856d21d api-viewer: fix path for upgraded HTTP/2 proptocls 2021-02-22 08:38:27 +01:00
Dietmar Maurer
aa30663ca5 docgen: improve regex format 2021-02-21 16:14:11 +01:00
Dietmar Maurer
8616a4afe5 docgen: dump string format (property strings) 2021-02-21 15:54:14 +01:00
Dietmar Maurer
bc2358319b docgen: improve api schema dump 2021-02-21 12:00:06 +01:00
Dietmar Maurer
0bf4b81370 docs: api-viewer - add backup and restore APIs 2021-02-21 10:38:33 +01:00
Dietmar Maurer
c9dd5a2452 .gitignore: do not ingnor .html files - we have some of them in the repository 2021-02-21 10:04:52 +01:00
Dietmar Maurer
cf95f616c5 add missing file docs/api-viewer/index.html 2021-02-21 10:04:23 +01:00
Dietmar Maurer
1adbc7c13c docs: install API viewer 2021-02-21 09:06:58 +01:00
Dietmar Maurer
9d28974c27 adopt PVEAPI.js for PBS, rename to PBSAPI.js 2021-02-21 09:06:58 +01:00
Dietmar Maurer
3dbc35b5c1 copy api-viewer from pve-docs 2021-02-21 09:06:58 +01:00
Dietmar Maurer
fee0fe5422 docgen: implement api schema generation (for api-viewer)
Just a start - not complete jet.
2021-02-21 09:06:58 +01:00
Dietmar Maurer
86d9f4e733 tape: extend MediaChange trait to return MtxStatus 2021-02-20 10:23:16 +01:00
Dietmar Maurer
3f16f1b006 tape: update changer status inside ScsiMediaChange implementation 2021-02-20 09:56:27 +01:00
Dietmar Maurer
cbd9899389 tape: update changer status cache after load/unload 2021-02-20 09:06:17 +01:00
Dietmar Maurer
cd44fb8d84 tape: create tmp dirs early at server startup 2021-02-19 18:10:02 +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
Dietmar Maurer
4188fd59a0 tape: cache changer state 2021-02-19 16:48:19 +01:00
Thomas Lamprecht
5b9f575648 update gitignore
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-02-19 12:42:14 +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
Dominik Csapak
926d05ef0b api2/tape/{backup, restore}, proxmox-tape: set device state
set the drive device state everywhere we lock it, so that we
know what it currently does

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-02-19 10:16:30 +01:00
Dominik Csapak
8be48ddfc7 api2/tape/changer: add drive state to changer status output
if we can find the drive in the config and it has a state

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-02-19 10:15:15 +01:00
Dominik Csapak
41e66bfaf6 api2/tape/drive: wrap some api calls in run_drive_blocking_task
those calls could also block, so we have to run them in a blocking
tokio task, as to not block the current thread

nice side effect is that we now also update the state for that
drive in those instances

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-02-19 10:14:08 +01:00
Dominik Csapak
47a7241410 api2/tape/drive: use run_drive_blocking_task where possible
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-02-19 10:13:36 +01:00
Dominik Csapak
54c77b3d62 api2/tape/drive: add wrapper for tokio::task::spawn_blocking
similar to the worker wrapper, lock, write status, run code, unset status

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-02-19 10:13:21 +01:00
Dominik Csapak
a1c5575308 api2/tape/drive: use 'run_drive_worker' where possible
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-02-19 10:11:04 +01:00
Dominik Csapak
a44c934b5d api2/tape/drive: add run_drive_worker wrapper
a wrapper for locking, starting the worker and writing the state

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-02-19 10:08:27 +01:00