Commit Graph

58 Commits

Author SHA1 Message Date
Dietmar Maurer cbd9899389 tape: update changer status cache after load/unload 2021-02-20 09:06:17 +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 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 bbe06f97be ui: tape/TapeInventory.js - use grid grouping feature - group by pool 2021-02-18 07:30:37 +01:00
Dominik Csapak dfde34e612 ui: tape/BackupOverview: insert the tapes between media-set and snapshot
but auto-expand them, so no additional click is necessary

this shows the user which tapes are involved for the media sets

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-02-17 06:55:53 +01:00
Dominik Csapak 85205bc253 ui: tape: improve tape-erase and add it to library view
refactor erase window, limit drives to changer if given

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-02-17 06:55:53 +01:00
Dominik Csapak 002865405c ui: tape/BackupOverview: show mediaset loading error in msg box instead
if a catalog is missing (or the loading otherwise throws an error), show
the error message in a msg box instead of a mask. this way a user can
still navigate the tree

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-02-17 06:55:53 +01:00
Dominik Csapak 8a73ef897a ui: tape/TapeInventory: add erase button
to erase the selected tape

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-02-17 06:55:53 +01:00
Dominik Csapak 2048073355 ui: tape/TapeManagement: change Text of Backup/Tape Inventory
to 'Content' and 'Inventory' respectively

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-02-16 08:34:18 +01:00
Dominik Csapak a585e1f696 ui: tape/TapeInventory: add 'Add Tape' button
by adapting and reusing the 'LabelMedia' window

shows a short notice about inserting the correct tape in the drive
and now allows to select a drive

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-02-16 08:33:59 +01:00
Dominik Csapak 415737b2b8 ui: tape/TapeInventory: change to regular store
listing the media can potentially hang (changer status), so do not
reload in the background, only on activate

also increase the timeout to 5 minutes and add a reload button

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-02-16 08:33:23 +01:00
Dominik Csapak 54f7007cc5 ui: tape/ChangerStatus: use whole drives grid for masking on unload
instead of just the tableview

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-02-15 12:22:22 +01:00
Dominik Csapak b0338178d7 ui: tape/ChangerStatus: increase timeout for api calls
since tape commands can take a while and we do not want to change
all of those to worker tasks, increase the timeout to 5 minutes

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-02-15 12:22:06 +01:00
Dietmar Maurer 159100b944 tape: ui - avoid changer status query in backup content panel 2021-02-15 12:17:36 +01:00
Dominik Csapak 32b88d928a ui: tape/BackupOverview: skip tapes without media-set
there is no data on them (yet), even if they belong to a pool

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-02-12 08:53:16 +01:00
Dominik Csapak f8e1932337 ui: tape/TapeInventory: add 'Set Tape Location' button
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-02-11 14:24:10 +01:00
Dominik Csapak bc02c2789c ui: tape/ChangerStatus: show more inventory info for tapes in slots
do not only show if labeled, but the whole status (full/writeable/etc.)
and to which pool the tape belongs (if any)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-02-10 06:21:49 +01:00
Dominik Csapak c0b3d09236 ui: tape/TapeInventory: show expired status
this is saved in a separate property, but show in status like
'proxmox-tape media list'

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-02-10 06:21:39 +01:00
Dominik Csapak 3ddbab6193 ui: tape/BackupOverview: do not iterate over empty tapes
tapes not belonging to a pool cannot contain data, so skip them

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-02-10 06:21:20 +01:00
Dominik Csapak 41c0333814 ui: tape/window/LabelMedia: change to POST
this changed in the backend

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-02-09 08:46:14 +01:00
Dominik Csapak 69ebbec40b ui: tape/BackupOverview: rework BackupOverview (again)
instead of showing the snapshots directly under the pool and then the
media-sets, list the media-sets under the pool and only after the
snapshots

this has several advantages:
* we only have to read one set of tape catalog data on expand and not all of
  them everytime (which does not scale)
* we can show media-sets without snapshots, this can happen when we
  inventoried a set of tapes from another pbs instance, or lost the
  catalog data somehow

the disadvantage is that one has to go look for the media set where the
snapshot is included, but we can solve this by implementing a search
function in the future (in the backend)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-02-09 08:42:08 +01:00
Dominik Csapak 4c9174ce26 ui: tape/DriveConfig: add missing tooltips
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-02-05 16:13:04 +01:00
Dominik Csapak 1d70e3812c ui: tape/DriveConfig: add Catalog button
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-02-05 16:12:49 +01:00
Dominik Csapak e2225aa882 ui: tape/ChangerStatus: add inventory button
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-02-05 16:12:18 +01:00
Dominik Csapak 99dd709f3e ui: tape/ChangerStatus: remove unnecessary buttons
they exist in the changer config pane, and are unnecessary here

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-02-05 16:12:18 +01:00
Dominik Csapak 42eef1451c ui: tape/ChangerStatus: add 'is labeled' column for tapes
so that a user can see if a tape in a library is not yet labeled

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-02-04 17:36:29 +01:00
Dominik Csapak 11ecf058e4 ui: tape/PoolConfig: add flex to columns
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-02-04 17:36:18 +01:00
Dominik Csapak 5f1f7ef564 ui: tape/PoolEdit: add selector for encryption keys
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-02-04 17:36:06 +01:00
Dominik Csapak 2e4e698633 ui: tape: add EncryptionPanel to add/remove encryption keys
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-02-04 17:35:46 +01:00
Dominik Csapak 7101ed6e27 ui: tape: add TapeInventory panel
since we do not show the tapes anymore in the BackupOverview, add
another panel where we can list the available tapes in the inventory

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-02-02 14:47:35 +01:00
Dominik Csapak 85ac35aa9a ui: tape: add Restore Window
in the BackupOverview, when a media-set is selected

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-02-02 14:47:21 +01:00
Dominik Csapak 40590561fe ui: tape: TapeBackupWindow: add missing DriveSelector
and make it a bit wider

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-02-02 14:47:05 +01:00
Dominik Csapak 631e550920 ui: tape: rework BackupOverview
instead of grouping by tape (which is rarely interesting),
group by pool -> group -> id -> mediaset

this way a user looking for a backup of specific vm can do just that

we may want to have an additional view here were we list all snapshots
included in the selected media-set ?

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-02-02 14:46:43 +01:00
Dietmar Maurer 86740dfc89 tape: ui - remove drive from pool config 2021-02-01 10:01:06 +01:00
Dietmar Maurer b8d526f18d ui: tape/ChangerStatus - use POST for barcode-label-media 2021-01-29 17:06:53 +01:00
Dominik Csapak d2edc68ead ui: tape/ChangerStatus: add missing tooltips
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-01-29 16:54:37 +01:00
Dominik Csapak 4d651378e2 ui: tape: change wrong window title
this is the 'status' msgbox not the label information

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-01-29 16:54:19 +01:00
Dominik Csapak 58791864d7 ui: tape/ChangerStatus: add import action for import/export slots
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-01-29 16:54:03 +01:00
Dominik Csapak 1a41e9af4f ui: tape: add Changer config grid
analogous to the drive grid

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-01-29 16:53:33 +01:00
Dietmar Maurer 1a0eb86344 tape: gui: s/encryption/encrypt/ in media pool config panel 2021-01-28 15:50:01 +01:00