Commit Graph

6495 Commits

Author SHA1 Message Date
Fabian Grünbichler e13303fca6 tree-wide: prefer api-type BackupGroup for logging
together with DatastoreWithNamespace where needed, to not forget
namespace information.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-05-16 18:49:19 +02:00
Fabian Grünbichler eefa297aa0 BackupDir: stop implementing Display
the api type implements it already, all call sites should rather use
DatastoreWithName and pbs_api_types::BackupDir for logging/..

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-05-16 18:49:19 +02:00
Fabian Grünbichler 5ae393af15 tape/verify: use print_ns_and_snapshot
in those few places where we actually want to use/print the full,
NS-included path.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-05-16 18:49:19 +02:00
Fabian Grünbichler f2fe00f1e2 BackupDir: fix manifest_lock_path
this definitely shouldn't rely on BackupDir's Display implementation..

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-05-16 18:49:19 +02:00
Fabian Grünbichler 1afce610c7 tree-wide: prefer api-type BackupDir for logging
in combination with DatastoreWithNamespace to not lose the namespace
information.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-05-16 18:49:19 +02:00
Fabian Grünbichler f15601f1c9 BackupDir: add group/dir accessors
for getting the respective api type references for convenient
printing/logging.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-05-16 18:49:19 +02:00
Thomas Lamprecht 90915ab629 ui: verify/sync: allow to optionally override ID again
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-05-16 18:48:44 +02:00
Thomas Lamprecht ebab1e5ed9 api: namespace create: lookup datastore with corret operation
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-05-16 18:26:55 +02:00
Hannes Laimer 6da6bafeac ui: add maintenance mask to DataStoreListSummary
Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
2022-05-16 18:10:35 +02:00
Thomas Lamprecht 067c77329b docs: acl path: add a namespace related example
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-05-16 18:10:13 +02:00
Fabian Grünbichler 8c4131708a docs: add namespace section to sync documentation
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-05-16 18:09:15 +02:00
Thomas Lamprecht a7646fe42a Revert "fix #4001: datastore/catalog: add number of files to directory entry"
causes trouble with UI and is inconsistent as its still missing in
file restore (daemon)

We probably want to use a separate property to safe this to avoid
confusion with size.

This reverts commit 66ad63bac2.
2022-05-16 17:51:35 +02:00
Thomas Lamprecht dadaa9e2f0 ui: verify outdated: disallow blank and drop wrong empty text
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-05-16 16:46:06 +02:00
Thomas Lamprecht 6a7b673872 ui: switch summary repo status to widget toolkit one
Not only can we remove a few lines of duplicated code, we also get
the "link to repo management" for free.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-05-16 15:56:33 +02:00
Fabian Grünbichler 0606432e9b d/control: use regular versioned build-dependency
although the full variant is provided by the current librust-log-dev
package, it won't be once it gets bumped to the next upstream version.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-05-16 15:52:39 +02:00
Fabian Ebner 7ebd97e8ea ui: fix setting protection in namespace
The ns parameter would not be included previously.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2022-05-16 15:29:55 +02:00
Thomas Lamprecht 44df558d66 docs: terminology: add namespaces and slightly restructure
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-05-16 15:28:00 +02:00
Fabian Grünbichler 9c75e2f3e1 build: bump required log version
else logging using "{var}" in format strings doesn't work properly.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-05-16 15:02:07 +02:00
Wolfgang Bumiller 4adb574d74 client: add completion callbacks for ns parameters
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-05-16 11:59:14 +02:00
Wolfgang Bumiller fb840eda4d pbs-client: namespace completion helper
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-05-16 11:58:13 +02:00
Thomas Lamprecht 007388f053 bump version to 2.2.0-1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-05-16 11:06:18 +02:00
Thomas Lamprecht 1d9ba1cc8b docs: add "Objects and Paths" section and fix perm scrot
we show the add-user one twice in this chapter, one should actually
be add-permission

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-05-16 10:56:19 +02:00
Thomas Lamprecht 63e98028cc api types: namespace: fix typo in error message
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-05-16 09:50:17 +02:00
Fabian Grünbichler e3ea577011 pull: use API BackupDir for log messages
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2022-05-16 09:43:28 +02:00
Thomas Lamprecht 6bfc94ea19 api types: BackupNamespace: fix depth check on pushing subdir to ns
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-05-16 09:37:38 +02:00
Thomas Lamprecht 1f2126fd7c api types: BackupNamespace: remove unused, commented out code
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-05-16 09:37:38 +02:00
Thomas Lamprecht 456456483e datastore: ns iter: clamp depth to MAX_NAMESPACE_DEPTH from datastore root
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-05-16 09:37:38 +02:00
Thomas Lamprecht 3eb15257b9 ui: permission path selector: add some more path suggestions
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-05-16 08:44:49 +02:00
Thomas Lamprecht 597398cb48 docs: rework access control, list available privileges
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-05-16 08:00:40 +02:00
Thomas Lamprecht 3d2baf4170 ui: datastore: use safe destroy as base for dialog
only ask the name of the current NS, not the full NS path to avoid
too long input requirements on deep levels.

needs a few smaller hacks, ideally we would pull out the basic stuff
from Edit window in some EditBase window and let both, SafeDestroy
and Edit window derive from that, for better common, in sync
features.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-05-15 16:47:44 +02:00
Thomas Lamprecht 3aafa61362 namespace deletion: propagate delete-groups=false but ENOTEMPTY as error
after all we couldn't delete all that got requested, ideally this
should become a task where we can log what got deleted and what
not...

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-05-15 16:32:49 +02:00
Thomas Lamprecht 60b9676fa2 ui: datastore: allow deleting currently shown namespace
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-05-15 16:04:50 +02:00
Thomas Lamprecht e5824cd61f ui: content: reload tree on succesful datastore add
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-05-15 16:03:16 +02:00
Thomas Lamprecht 508d644e87 ui: tree NS entries: remove commented out qtip
we won't use that, it's to invasive

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-05-15 16:02:38 +02:00
Thomas Lamprecht b0166d4e8d api: cargo fmt
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-05-15 16:01:57 +02:00
Thomas Lamprecht ca3f8757ba datastore: clippy fixes
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-05-15 16:01:09 +02:00
Thomas Lamprecht 118e984996 datastore: move backup dir/group/namespace iter to own module
no changes in interface for users of the crate as we re-export
anyway, so more for avoiding to crowd the datastore module to much

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-05-15 15:59:43 +02:00
Thomas Lamprecht 45ba884d0d ui: content: fix tooltip for forgetting snapshot
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-05-15 14:09:25 +02:00
Thomas Lamprecht d1f9cceada namespace deletion: make destroying groups separate choice
And make that opt-in in the API endpoint, to avoid bad surprises by
default.

If not set we'll only prune empty namespaces.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-05-15 14:09:25 +02:00
Stefan Sterz 4ac8ec11fb fix #4001: ui: add prefix to files downloaded through the pxar browser
Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-05-15 14:09:25 +02:00
Stefan Sterz 66ad63bac2 fix #4001: datastore/catalog: add number of files to directory entry
When listing the content of a catalog, add the number of files
contained in the directory as its size. Also removes redundant code,
the `mtime` and the `size` of a file is already set when creating the
archive entry, but we naturally need to override the size now for
directories.

Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-05-15 14:08:51 +02:00
Thomas Lamprecht 9ec82aefb4 ui: prune all: add namespace info in title
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-05-14 18:57:05 +02:00
Thomas Lamprecht e3cda36ba5 ui: move prune input panel into own file
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-05-14 18:51:54 +02:00
Thomas Lamprecht 5d05f334f1 ui: prune group: add NS info to title
restructure it a bit for better UX

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-05-14 18:47:13 +02:00
Thomas Lamprecht a3d61f3fba ui: remote target ns selector: add clear trigger
like we have for the local NS selector

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-05-14 18:40:52 +02:00
Thomas Lamprecht ed289736cf ui: improve render_optional_namespace slighly
it maybe should still simple get dropped and replaced with
(empty)Text 'Root' or 'Root Namespace'

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-05-14 18:39:56 +02:00
Thomas Lamprecht dc193e8197 ui: remote target ns selector: fix clearing value on edit
never makes sense to clear the value due to remote or remoteStore
change as we weren't enabled then in the first place.

This fixes clearing the currently set namespace on editing an
existing job, which always made it seem like the Root namespace was
selected, even if the originalValue was correct (thus the dirty-form
reset/ok behaviour still worked, making it even more confusing)

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-05-14 18:29:12 +02:00
Thomas Lamprecht 1f71e44172 client: make change-owner and prune namespace aware
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-05-14 17:16:25 +02:00
Thomas Lamprecht 7da520ae46 hierachy: ListAccessibleBackupGroups make store also a lifetime'd ref
avoid some extra Arc::clone, even if they're not really expensive
(just some atomics)

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-05-14 14:56:34 +02:00
Thomas Lamprecht cbde538c0c ui: maintenance mode: opinionated code cleanup
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-05-14 14:51:57 +02:00