]> git.proxmox.com Git - pve-manager.git/log
pve-manager.git
2 years agoui: disk reassign: remove unused reference and bind
Matthias Heiserer [Mon, 2 May 2022 14:24:23 +0000 (16:24 +0200)]
ui: disk reassign: remove unused reference and bind

They are not used anywhere else, so I assume they were left over from
an earlier version.
Also, sometimes "[object object] flashes in the Target Guest field
when opening the reassign window, with this removed it doesn't occur.

Signed-off-by: Matthias Heiserer <m.heiserer@proxmox.com>
Tested-By: Aaron Lauterer <a.lauterer@proxmox.com>
2 years agoui: snapshot tree: warn that current state is lost when confirming rollback
Fabian Ebner [Mon, 2 May 2022 12:21:53 +0000 (14:21 +0200)]
ui: snapshot tree: warn that current state is lost when confirming rollback

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agoui: ceph pools: add pool type column
Aaron Lauterer [Mon, 2 May 2022 08:09:28 +0000 (10:09 +0200)]
ui: ceph pools: add pool type column

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
Tested-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoui: ceph pool edit: disable size and crush rule for erasure pools
Aaron Lauterer [Mon, 2 May 2022 08:09:27 +0000 (10:09 +0200)]
ui: ceph pool edit: disable size and crush rule for erasure pools

They cannot be changed after pool creation for erasure coded pools

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
Tested-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoapi: ceph pools: add type to returned properties
Aaron Lauterer [Mon, 2 May 2022 12:36:24 +0000 (14:36 +0200)]
api: ceph pools: add type to returned properties

The osd dump already contains the pool type in numerical format.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
Tested-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoceph tools: set_pools: filter settings for erasure code pools
Aaron Lauterer [Mon, 2 May 2022 08:09:25 +0000 (10:09 +0200)]
ceph tools: set_pools: filter settings for erasure code pools

Erasure code pools cannot change certain settings after creation.
Trying to set them will cause errors on Cephs side.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
Tested-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoui: realm sync: let users set 'remove vanished options' independently
Dominik Csapak [Mon, 2 May 2022 13:15:20 +0000 (15:15 +0200)]
ui: realm sync: let users set 'remove vanished options' independently

and label it correctly. The 'Properties' option was mislabeled,
it means 'remove vanished fields from synced users', not 'remove
fields from vanished users'.

So don't couple that with the 'Entries' option, and update the label
to convey the right meaning.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoui: storage content: support filtering by notes for backups
Thomas Lamprecht [Mon, 2 May 2022 13:26:21 +0000 (15:26 +0200)]
ui: storage content: support filtering by notes for backups

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agod/copyright: update years
Thomas Lamprecht [Fri, 29 Apr 2022 12:35:45 +0000 (14:35 +0200)]
d/copyright: update years

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agobump version to 7.2-1
Thomas Lamprecht [Fri, 29 Apr 2022 12:29:33 +0000 (14:29 +0200)]
bump version to 7.2-1

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoapi: ceph: fix description indentation style
Thomas Lamprecht [Fri, 29 Apr 2022 12:28:12 +0000 (14:28 +0200)]
api: ceph: fix description indentation style

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoapi: followup: code locality
Thomas Lamprecht [Fri, 29 Apr 2022 12:26:32 +0000 (14:26 +0200)]
api: followup: code locality

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoapi: ceph ec pools: make add_storages overridable default
Aaron Lauterer [Fri, 29 Apr 2022 09:28:59 +0000 (11:28 +0200)]
api: ceph ec pools: make add_storages overridable default

The behavior of always adding the storage config was lost in commit
23c407e. But it is more sensible to make it a default that can be
changed if needed.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
2 years agoapi: ceph ec pools: schema fixes and enhancements
Aaron Lauterer [Fri, 29 Apr 2022 09:28:58 +0000 (11:28 +0200)]
api: ceph ec pools: schema fixes and enhancements

Ceph has a min value for 'k' of 2. Adding default and description where
missing.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
2 years agoui: dc/SyncWindow: realign to sync options
Dominik Csapak [Fri, 29 Apr 2022 10:23:36 +0000 (12:23 +0200)]
ui: dc/SyncWindow: realign to sync options

put the checkboxes in a fieldset and reuse their labels

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agobump version to 7.1-13
Thomas Lamprecht [Thu, 28 Apr 2022 19:00:48 +0000 (21:00 +0200)]
bump version to 7.1-13

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoapi: ceph ec pools: move to format-str, create ec in worker, reuse $rados
Thomas Lamprecht [Thu, 28 Apr 2022 18:23:24 +0000 (20:23 +0200)]
api: ceph ec pools: move to format-str, create ec in worker, reuse $rados

moved to a format string 'erasurce-coded', that allows also to drop
most of the param existence checking as we can set the correct
optional'ness in there.  Also avoids bloating the API to much for
just this.

Reuse the $rados connection more often to avoid to much
overhead/lingering sockets (the rados connection stays around in the
background to allow efficient reuse)

really should be three separate commits, but too intertwined and too
late for me to care tbh.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoceph tools: allow more rados connection reuse
Thomas Lamprecht [Thu, 28 Apr 2022 17:46:46 +0000 (19:46 +0200)]
ceph tools: allow more rados connection reuse

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoceph pools: allow to create erasure code pools
Aaron Lauterer [Thu, 28 Apr 2022 11:58:09 +0000 (13:58 +0200)]
ceph pools: allow to create erasure code pools

To use erasure coded (EC) pools for RBD storages, we need two pools. One
regular replicated pool that will hold the RBD omap and other metadata
and the EC pool which will hold the image data.

The coupling happens when an RBD image is created by adding the
--data-pool parameter. This is why we have the 'data-pool' parameter in
the storage configuration.

To follow already established semantics, we will create a 'X-metadata'
and 'X-data' pool. The storage configuration is always added as it is
the only thing that links the two together (besides naming schemes).

Different pg_num defaults are chosen for the replicated metadata pool as
it will not hold a lot of data.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
2 years agoceph tools: add erasure code management functions
Aaron Lauterer [Thu, 28 Apr 2022 11:58:06 +0000 (13:58 +0200)]
ceph tools: add erasure code management functions

Functions to manage erasure code (EC) profiles:
* add
* remove
* check if exists
* get default prefixed name
* get pool properties
* destroy crush rule

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
2 years agoapi: ceph: $get_storages check if data-pool too
Aaron Lauterer [Thu, 28 Apr 2022 11:58:05 +0000 (13:58 +0200)]
api: ceph: $get_storages check if data-pool too

When removing a pool, we check against any storage that might have that
pool configured.
We need to check if that pool is used as data-pool too.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
2 years agoceph tools: make rados open if not reused shorter
Thomas Lamprecht [Thu, 28 Apr 2022 17:39:52 +0000 (19:39 +0200)]
ceph tools: make rados open if not reused shorter

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agovzdump: transform hook script checks to post-if notation
Thomas Lamprecht [Thu, 28 Apr 2022 16:44:20 +0000 (18:44 +0200)]
vzdump: transform hook script checks to post-if notation

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agovzdump: add error if passed in hook script doesn't exist
Dylan Whyte [Thu, 28 Apr 2022 14:57:06 +0000 (16:57 +0200)]
vzdump: add error if passed in hook script doesn't exist

Previously, if the '--script' argument was passed with a non-existent
file, it would state that a non-executable script was the reason for
failure. This adds a check to see if the hook script exists, in order
to provide a more accurate error message.

Also adds an 'Error:' prefix the 'script not executable' error.

Signed-off-by: Dylan Whyte <d.whyte@proxmox.com>
2 years agoui: add virgl GPU to possible VGA drivers
Thomas Lamprecht [Thu, 28 Apr 2022 14:36:31 +0000 (16:36 +0200)]
ui: add virgl GPU to possible VGA drivers

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agovzdump: check that notes-template is a single line
Fabian Ebner [Thu, 28 Apr 2022 08:07:39 +0000 (10:07 +0200)]
vzdump: check that notes-template is a single line

While vzdump itself wouldn't mind about unescaped newlines, the
parameter isn't supposed to contain any, and when used as part of the
job config, it has to be a single line too, so make it consistent.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agovzdump: generate notes: die upon unexpected escape character or variable
Fabian Ebner [Wed, 27 Apr 2022 15:41:16 +0000 (17:41 +0200)]
vzdump: generate notes: die upon unexpected escape character or variable

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agoclose #438: ui: backup job: allow setting a notes-template for a job
Fabian Ebner [Wed, 27 Apr 2022 15:41:13 +0000 (17:41 +0200)]
close #438: ui: backup job: allow setting a notes-template for a job

Add a tooltip to the comment field, to better distinguish it from the
notes-template.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
Co-authored-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: backup: allow setting protected and notes-template for manual backup
Fabian Ebner [Wed, 27 Apr 2022 15:41:12 +0000 (17:41 +0200)]
ui: backup: allow setting protected and notes-template for manual backup

Setting a width, so the text area can fill the horizontal space.

Suggested-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agoui: util: add helpers for (un)escaping notes-template
Fabian Ebner [Wed, 27 Apr 2022 15:41:11 +0000 (17:41 +0200)]
ui: util: add helpers for (un)escaping notes-template

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agopartially close #438: vzdump: support setting notes-template
Fabian Ebner [Wed, 27 Apr 2022 15:41:10 +0000 (17:41 +0200)]
partially close #438: vzdump: support setting notes-template

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agoui: restore: fix syntax error introduced in previous commit
Fabian Ebner [Thu, 28 Apr 2022 09:29:42 +0000 (11:29 +0200)]
ui: restore: fix syntax error introduced in previous commit

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agoui: restore overrides: switch from column to hbox+panel layout
Thomas Lamprecht [Thu, 28 Apr 2022 09:12:19 +0000 (11:12 +0200)]
ui: restore overrides: switch from column to hbox+panel layout

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: restore: display "Hostname" for container
Fabian Ebner [Thu, 28 Apr 2022 07:04:09 +0000 (09:04 +0200)]
ui: restore: display "Hostname" for container

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agoui: restore: group override settings in a fieldset
Fabian Ebner [Thu, 28 Apr 2022 07:04:08 +0000 (09:04 +0200)]
ui: restore: group override settings in a fieldset

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agoui: restore: allow override of some settings
Fabian Ebner [Tue, 26 Apr 2022 12:30:54 +0000 (14:30 +0200)]
ui: restore: allow override of some settings

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agoui: restore: disallow empty storage selection if it wouldn't work
Fabian Ebner [Tue, 26 Apr 2022 12:30:53 +0000 (14:30 +0200)]
ui: restore: disallow empty storage selection if it wouldn't work

Namely, if there is a storage in the backup configuration that's not
available on the current node.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agoui; datacenter options: add next-id editor
Thomas Lamprecht [Wed, 27 Apr 2022 18:34:37 +0000 (20:34 +0200)]
ui; datacenter options: add next-id editor

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agofix replication fail count tests & bump libpve-guest-common-perl b-d
Thomas Lamprecht [Wed, 27 Apr 2022 16:53:27 +0000 (18:53 +0200)]
fix replication fail count tests & bump libpve-guest-common-perl b-d

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoapi2: network: anybridge: re-add regular bridges
Fabian Grünbichler [Wed, 27 Apr 2022 11:36:00 +0000 (13:36 +0200)]
api2: network: anybridge: re-add regular bridges

commit 89d146f207225bb8ca2e01d7e79000bb37a227d1 introduced permission
checks here that caused all regular bridges to be removed from the
returned list as soon as the SDN package is installed, unless the user
is root@pam or there exists a VNET with the same ID.

this is arguably a breaking change, so limit the priv check to actually
defined VNETs for the time being, and add ALL regular bridges
uncondtionally like before.

get_local_vnets already filters by the same prvs, so we need to get the
full config to find out which IDs are VNETs and which are not.

once/iff we introduce ACL paths for *all* bridges in the future, we can
limit accordingly here.

CC: Alexandre Derumier <aderumier@odiso.com>
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2 years agoapi: next-id: honor new datacenter.cfg upper/lower range option
Thomas Lamprecht [Wed, 27 Apr 2022 11:14:13 +0000 (13:14 +0200)]
api: next-id: honor new datacenter.cfg upper/lower range option

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agovzdump: support setting protected status
Fabian Ebner [Thu, 7 Apr 2022 10:05:40 +0000 (12:05 +0200)]
vzdump: support setting protected status

Check the number of protected backups early if the protected flag
is set.

Suggested-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agofix #3955: vzdump: new: also send mail for error during job-init hook
Fabian Ebner [Tue, 19 Apr 2022 08:45:22 +0000 (10:45 +0200)]
fix #3955: vzdump: new: also send mail for error during job-init hook

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agovzdump: new: add add_error helper
Fabian Ebner [Tue, 19 Apr 2022 08:45:21 +0000 (10:45 +0200)]
vzdump: new: add add_error helper

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agoui: sdn: zone evpn: delete exitnodes-primary if empty
Alexandre Derumier [Wed, 20 Apr 2022 14:19:38 +0000 (16:19 +0200)]
ui: sdn: zone evpn: delete exitnodes-primary if empty

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2 years agoreplication: split out error handling and include more info in mail
Thomas Lamprecht [Wed, 27 Apr 2022 07:49:11 +0000 (09:49 +0200)]
replication: split out error handling and include more info in mail

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoreplication: sent always mail for first three tries and move helper
Thomas Lamprecht [Wed, 27 Apr 2022 07:48:27 +0000 (09:48 +0200)]
replication: sent always mail for first three tries and move helper

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoapi: replication: don't send mails about failed replication only once
Fabian Ebner [Fri, 22 Apr 2022 12:15:48 +0000 (14:15 +0200)]
api: replication: don't send mails about failed replication only once

but rather multiple times becoming exponentially less frequent.

Suggested-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agod/control: bump proxmox-widget-toolkit dependency to 3.4-9
Thomas Lamprecht [Tue, 26 Apr 2022 14:06:03 +0000 (16:06 +0200)]
d/control: bump proxmox-widget-toolkit dependency to 3.4-9

to have the moved markdown notes component available, among other
things

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: dont show '__default__' in renderer
Dominik Csapak [Tue, 26 Apr 2022 07:34:27 +0000 (09:34 +0200)]
ui: dont show '__default__' in renderer

with the recent rework of the render/maps/arrays, we now
show 'Default (__default__)'. Since '__default__' is only an internal
value in the gui, don't expose it by explicitely checking for it

in the other render functions it works already because we either construct
the text differently (console_map) or we check the result from
parsing (vga_driver)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoui: realm sync: use fieldset for remove-vanished & ux/wording
Thomas Lamprecht [Tue, 26 Apr 2022 12:25:36 +0000 (14:25 +0200)]
ui: realm sync: use fieldset for remove-vanished & ux/wording

Use fieldsets, which are just way nicer for grouping these things.

Disable the "remove properties" checkbox if we'd remove the whole
user anyway.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: realm sync: replace 'full' and 'purge' with 'remove-vanished'
Dominik Csapak [Mon, 28 Mar 2022 12:38:06 +0000 (14:38 +0200)]
ui: realm sync: replace 'full' and 'purge' with 'remove-vanished'

in default sync options and the sync window. We do this by exposing
the individual flags as checkboxes. We get the mapped value from the
backend so we do not have to handle 'old' values here.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agod/control: drop unused liblocale-po-perl build dependency
Thomas Lamprecht [Tue, 26 Apr 2022 11:28:05 +0000 (13:28 +0200)]
d/control: drop unused liblocale-po-perl build dependency

Became unused with commit 2bb03197d3f7c33d19f0979eb08e76d5814be162
that moved the locale stuff to its own repo proxmox-i18n

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: utils: drop some useles _array helpers, just use Object.entries
Thomas Lamprecht [Tue, 26 Apr 2022 07:05:35 +0000 (09:05 +0200)]
ui: utils: drop some useles _array helpers, just use Object.entries

if we need to enforce ordering it may help to reintroduce them
though.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: utils: rework kvm-vga/keymaps and console-viewer schema handling
Thomas Lamprecht [Tue, 26 Apr 2022 06:59:15 +0000 (08:59 +0200)]
ui: utils: rework kvm-vga/keymaps and console-viewer schema handling

shave off some bloat

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: Utils: remove unnecessary render_kvm_vga_driver
Dominik Csapak [Wed, 9 Mar 2022 14:09:14 +0000 (15:09 +0100)]
ui: Utils: remove unnecessary render_kvm_vga_driver

the 'value' here is already the rendered text, passing it through
render again does not make sense

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoceph: services: broadcast versions: improve requesting old version
Fabian Ebner [Tue, 30 Nov 2021 10:38:12 +0000 (11:38 +0100)]
ceph: services: broadcast versions: improve requesting old version

to avoid a "malformed JSON string" warning when there is no old
version present (e.g. after starting a cluster).

get_node_kv will always return something that evaluates to true, so
instead, test if the result has an entry for the current node. Also,
it's enough to request the kv for the current node only.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agoui: fix adding hostpci > 5
Dominik Csapak [Fri, 11 Mar 2022 07:45:45 +0000 (08:45 +0100)]
ui: fix adding hostpci > 5

by using the limits from PVE.Utils

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoui: vm display: refactor and cleanup
Thomas Lamprecht [Sun, 24 Apr 2022 10:03:34 +0000 (12:03 +0200)]
ui: vm display: refactor and cleanup

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: backup restore: add hint to window title on overwrite restore
Thomas Lamprecht [Sat, 23 Apr 2022 11:24:17 +0000 (13:24 +0200)]
ui: backup restore: add hint to window title on overwrite restore

we prompt for confirmation in that case anyway, but some subtle, but
extra difference may still help

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: backup restore: show "make unique" field also for self-overrride-existing
Thomas Lamprecht [Sat, 23 Apr 2022 11:03:43 +0000 (13:03 +0200)]
ui: backup restore: show "make unique" field also for self-overrride-existing

For example, relevant if the filterVMID checkbox got turned off. But
a user may also want to make the restored VM unique in other cases
too.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: backup restore: use displayEdit field for guest selector
Thomas Lamprecht [Sat, 23 Apr 2022 11:00:46 +0000 (13:00 +0200)]
ui: backup restore: use displayEdit field for guest selector

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: backup restore: rework to leverage more viewcontroller and cleanup
Thomas Lamprecht [Sat, 23 Apr 2022 10:39:28 +0000 (12:39 +0200)]
ui: backup restore: rework to leverage more viewcontroller and cleanup

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: disk storage selector: support storage with multiple formats without qcow2
Fabian Ebner [Thu, 17 Mar 2022 08:37:48 +0000 (09:37 +0100)]
ui: disk storage selector: support storage with multiple formats without qcow2

For future or external storages where the assumption "multiple formats implies
qcow2 is supported" doesn't hold.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agoui: disk storage selector: never send format when hideFormat is true
Fabian Ebner [Thu, 17 Mar 2022 08:37:47 +0000 (09:37 +0100)]
ui: disk storage selector: never send format when hideFormat is true

The backend will pick an appropriate format when nothing is specified. The
comment made it sound like 'raw' would be sent, but that didn't actually happen
on file-based storages, and now no format is sent, so adapt the comment too.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agoui: lxc resources: modernize & simplify
Thomas Lamprecht [Thu, 14 Apr 2022 05:50:25 +0000 (07:50 +0200)]
ui: lxc resources: modernize & simplify

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: move NotesView panel and NotesEdit window to widget kit
Stefan Sterz [Tue, 12 Apr 2022 10:34:22 +0000 (12:34 +0200)]
ui: move NotesView panel and NotesEdit window to widget kit

this removes the NotesView panel and NotesEdit and replaces them with
with the version from the widget kit. requires a bump of the widget
toolkit.

Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
2 years agoui: disk reasign: condense code, some style improvements
Thomas Lamprecht [Wed, 13 Apr 2022 09:34:31 +0000 (11:34 +0200)]
ui: disk reasign: condense code, some style improvements

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: disk reassign: improve title and field-label
Thomas Lamprecht [Fri, 8 Apr 2022 13:00:58 +0000 (15:00 +0200)]
ui: disk reassign: improve title and field-label

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: disk reassign: drop useless intermediate form
Thomas Lamprecht [Fri, 8 Apr 2022 12:56:55 +0000 (14:56 +0200)]
ui: disk reassign: drop useless intermediate form

The form is basically a 1:1 copy from what the edit window gives us
for free already anyway, so just drop it.

best viewed with `git show -w`

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: disk reassign: improve default focus behavior
Thomas Lamprecht [Fri, 8 Apr 2022 12:55:06 +0000 (14:55 +0200)]
ui: disk reassign: improve default focus behavior

avoid that opening the edit window makes the guest-selectors combobox
"jump" in ones face.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: move disk reassign into window/ folder
Thomas Lamprecht [Thu, 7 Apr 2022 12:33:58 +0000 (14:33 +0200)]
ui: move disk reassign into window/ folder

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Reviewed-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agoui: hdmove: modernize/refactor
Aaron Lauterer [Tue, 5 Apr 2022 12:30:16 +0000 (14:30 +0200)]
ui: hdmove: modernize/refactor

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
Reviewed-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agoui: BusTypeSelector: change noVirtIO to withVirtIO
Aaron Lauterer [Tue, 5 Apr 2022 12:30:15 +0000 (14:30 +0200)]
ui: BusTypeSelector: change noVirtIO to withVirtIO

Double negated properties make it harder than necessary to parse
conditions.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
Reviewed-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agoui: lxc/qemu: add disk reassign and action submenu
Aaron Lauterer [Tue, 5 Apr 2022 12:30:14 +0000 (14:30 +0200)]
ui: lxc/qemu: add disk reassign and action submenu

For the new HDReassign component, we follow the approach of HDMove to
have one componend for qemu and lxc.

To avoid button clutter, a new "Disk/Volume action" button is
introduced. It holds the Move, Reassign and Resize buttons in a
sub-menu.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Reviewed-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agoui: utils: add nextFreeMP
Aaron Lauterer [Tue, 5 Apr 2022 12:30:13 +0000 (14:30 +0200)]
ui: utils: add nextFreeMP

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
Reviewed-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agoui: utils: refactor mps to mp
Aaron Lauterer [Tue, 5 Apr 2022 12:30:12 +0000 (14:30 +0200)]
ui: utils: refactor mps to mp

Using the actual config key instead of the pluralization, makes it
easier in the situations where we need to match against it.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
Reviewed-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agoui: lxc: resources: consider rootfs as a disk again
Fabian Ebner [Thu, 7 Apr 2022 12:15:44 +0000 (14:15 +0200)]
ui: lxc: resources: consider rootfs as a disk again

Commit 809f6b6e ("ui: lxc resources: switch to vector based font
awesome icons") seems like an innocent change, but it broke the
(very brittle) logic here by removing the tdCls for rootfs.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agoui: storage edit: retention: add max-protected-backups setting
Fabian Ebner [Tue, 29 Mar 2022 12:53:16 +0000 (14:53 +0200)]
ui: storage edit: retention: add max-protected-backups setting

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agovzdump: always pass full list to prune marking
Fabian Grünbichler [Wed, 6 Apr 2022 12:05:53 +0000 (14:05 +0200)]
vzdump: always pass full list to prune marking

else this single call site is subtly different from all the rest, which
could cause problems further down the line if we ever change the prune
logic.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2 years agovzdump: backup limit: only count unprotected backups
Fabian Ebner [Tue, 29 Mar 2022 12:53:15 +0000 (14:53 +0200)]
vzdump: backup limit: only count unprotected backups

since they are the ones relevant for pruning and protected backups
have their own separate limit.

Since get_backup_file_list is only used in places where the
unprotected backups are needed, adapt the helper accordingly.

If there is a storage, use PVE::Storage::volume_list to count the
unprotected backups. This avoids a direct invocation of the
proxmox-backup-client for PBS and the limit check can also work for
external storage plugins which might not be dir-based or name the
backups differently.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agovzdump: backup file list: drop unused parameter
Fabian Ebner [Tue, 29 Mar 2022 12:53:14 +0000 (14:53 +0200)]
vzdump: backup file list: drop unused parameter

It's not used anymore since 77c7945123724564ea909439ea51b537a5d0b6c2
aligned pruning in a dumpdir with pruning on a storage.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agofix #3976: api/backup: make schedule/starttime truly optional on update
Dominik Csapak [Fri, 1 Apr 2022 06:14:13 +0000 (08:14 +0200)]
fix #3976: api/backup: make schedule/starttime truly optional on update

on create we require either starttime (+dow) or a schedule, but when
updating an existing job, this is not necessary

before we changed to schedules, the starttime was not optional either on
update, but i think there is no reason to require the user to send the
schedule/startime along every time.

the gui will send all values every time, so that was never a problem there

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoui: render storage type: improve fallback
Thomas Lamprecht [Fri, 1 Apr 2022 15:28:36 +0000 (17:28 +0200)]
ui: render storage type: improve fallback

We support external storage plugins, e.g., for proprietary
technology, so a "unknown" value here may not actually mean that we
missed anything, so just return the type value 1:1 as fallback, that
gives the user a better idea about such a storage entry.

Reported-by: Joshua Huber <jhuber@blockbridge.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoJobs: don't schedule jobs with no computable next event
Dominik Csapak [Fri, 1 Apr 2022 11:24:44 +0000 (13:24 +0200)]
Jobs: don't schedule jobs with no computable next event

if we have a schedule that has no 'next event' we should skip the scheduling
instead of schedule every round

this can happen if someone sets an schedule that has no next match.
some examples:
* 2-31 00:00 (there is not February 31st)
* mon 2022-04-02 (this would be a saturday, not monday)
* 1970-1-1 (or every other exact date in the past)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoui: vm hardware: module wide refactoring/cleanups/style changes/fixes
Thomas Lamprecht [Fri, 1 Apr 2022 14:43:52 +0000 (16:43 +0200)]
ui: vm hardware: module wide refactoring/cleanups/style changes/fixes

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: vm hardware: fix add-menu itemId casing
Thomas Lamprecht [Fri, 1 Apr 2022 14:41:44 +0000 (16:41 +0200)]
ui: vm hardware: fix add-menu itemId casing

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: vm: factor out add-HW menu handler to higher order fn
Thomas Lamprecht [Fri, 1 Apr 2022 14:06:14 +0000 (16:06 +0200)]
ui: vm: factor out add-HW menu handler to higher order fn

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: lxc resources: refactor add menu handler
Thomas Lamprecht [Fri, 1 Apr 2022 11:35:10 +0000 (13:35 +0200)]
ui: lxc resources: refactor add menu handler

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: lxc resources: switch to vector based font awesome icons
Thomas Lamprecht [Fri, 1 Apr 2022 09:20:54 +0000 (11:20 +0200)]
ui: lxc resources: switch to vector based font awesome icons

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: lxc resources: support font awesome icons directly
Thomas Lamprecht [Fri, 1 Apr 2022 08:44:01 +0000 (10:44 +0200)]
ui: lxc resources: support font awesome icons directly

like we do for the VMs hardware view

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: icons: swap pci bitmap to svg
Thomas Lamprecht [Fri, 1 Apr 2022 08:38:08 +0000 (10:38 +0200)]
ui: icons: swap pci bitmap to svg

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoapi: vzdump: extract config: add content type check
Fabian Ebner [Wed, 30 Mar 2022 10:24:35 +0000 (12:24 +0200)]
api: vzdump: extract config: add content type check

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agopveam: remove: add content type check
Fabian Ebner [Wed, 30 Mar 2022 10:24:34 +0000 (12:24 +0200)]
pveam: remove: add content type check

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agoapi: vzdump: extract config: check for VM.Backup privilege
Fabian Ebner [Wed, 30 Mar 2022 10:24:27 +0000 (12:24 +0200)]
api: vzdump: extract config: check for VM.Backup privilege

In preparation to have check_volume_access() always allow access for
users with Datastore.Allocate privilege. As to not automatically give
all such users permission to extract the config too.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agoui: css: set correct font awesome grid font-size
Thomas Lamprecht [Thu, 31 Mar 2022 14:53:07 +0000 (16:53 +0200)]
ui: css: set correct font awesome grid font-size

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: qemu: switch CD drive icon to SVG
Thomas Lamprecht [Thu, 31 Mar 2022 14:52:39 +0000 (16:52 +0200)]
ui: qemu: switch CD drive icon to SVG

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: qemu: switch memory icon to SVG
Thomas Lamprecht [Thu, 31 Mar 2022 14:52:14 +0000 (16:52 +0200)]
ui: qemu: switch memory icon to SVG

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: cpu icon: enable crispEdges and increase stroke width slightly
Thomas Lamprecht [Thu, 31 Mar 2022 14:02:47 +0000 (16:02 +0200)]
ui: cpu icon: enable crispEdges and increase stroke width slightly

crisp edges avoids antialiasing, which is rather counterproductive on
this icon with straight lines that are in 90° to each other.

The higher stroke width makes it more similar to the previously used
bitmap one.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoui: qemu: switch processor icon to SVG
Thomas Lamprecht [Thu, 31 Mar 2022 13:43:40 +0000 (15:43 +0200)]
ui: qemu: switch processor icon to SVG

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>