6414 Commits

Author SHA1 Message Date
Fabian Ebner
8b15a4f4d1 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>
2022-04-28 08:43:36 +02:00
Thomas Lamprecht
4b27297273 ui; datacenter options: add next-id editor
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-04-27 20:34:37 +02:00
Thomas Lamprecht
fb35008f36 fix replication fail count tests & bump libpve-guest-common-perl b-d
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-04-27 18:53:27 +02:00
Fabian Grünbichler
a37ff602ff api2: network: anybridge: re-add regular bridges
commit 052fbb2a4d1bdeb490b2e3b67cd7555e460ebe93 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>
2022-04-27 13:55:57 +02:00
Thomas Lamprecht
bdf3e74a22 api: next-id: honor new datacenter.cfg upper/lower range option
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-04-27 13:52:01 +02:00
Fabian Ebner
2a246adff2 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>
2022-04-27 11:37:26 +02:00
Fabian Ebner
a6fb6f6c0c fix #3955: vzdump: new: also send mail for error during job-init hook
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2022-04-27 10:36:19 +02:00
Fabian Ebner
8ea2c0ba1d vzdump: new: add add_error helper
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2022-04-27 10:36:19 +02:00
Alexandre Derumier
3076eb94f1 ui: sdn: zone evpn: delete exitnodes-primary if empty
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2022-04-27 10:35:15 +02:00
Thomas Lamprecht
c945aaef85 replication: split out error handling and include more info in mail
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-04-27 10:18:30 +02:00
Thomas Lamprecht
e6b8af20a6 replication: sent always mail for first three tries and move helper
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-04-27 09:48:28 +02:00
Fabian Ebner
64a27d1de3 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>
2022-04-26 16:09:43 +02:00
Thomas Lamprecht
96f59e0599 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>
2022-04-26 16:06:04 +02:00
Dominik Csapak
865767ddf6 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>
2022-04-26 15:31:11 +02:00
Thomas Lamprecht
85d373f0b4 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>
2022-04-26 14:26:11 +02:00
Dominik Csapak
a3dd675ecc 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>
2022-04-26 13:35:03 +02:00
Thomas Lamprecht
2fc205c852 d/control: drop unused liblocale-po-perl build dependency
Became unused with commit 5e034c9c5173185b7a50695ee684ff8dddbd65bf
that moved the locale stuff to its own repo proxmox-i18n

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-04-26 13:34:50 +02:00
Thomas Lamprecht
d0a66934a1 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>
2022-04-26 09:07:14 +02:00
Thomas Lamprecht
0298d4b79a ui: utils: rework kvm-vga/keymaps and console-viewer schema handling
shave off some bloat

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-04-26 09:01:13 +02:00
Dominik Csapak
fe0f9a11e6 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>
2022-04-26 08:32:48 +02:00
Fabian Ebner
9fc1b9786f 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>
2022-04-26 08:29:58 +02:00
Dominik Csapak
8f94ca92e6 ui: fix adding hostpci > 5
by using the limits from PVE.Utils

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2022-04-25 18:22:24 +02:00
Thomas Lamprecht
9691f0d354 ui: vm display: refactor and cleanup
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-04-24 12:03:34 +02:00
Thomas Lamprecht
d640ba45d3 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>
2022-04-23 13:26:46 +02:00
Thomas Lamprecht
d4ffa4748e 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>
2022-04-23 13:26:45 +02:00
Thomas Lamprecht
c5e4375c27 ui: backup restore: use displayEdit field for guest selector
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-04-23 13:26:27 +02:00
Thomas Lamprecht
fdefebb8ea ui: backup restore: rework to leverage more viewcontroller and cleanup
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-04-23 13:26:25 +02:00
Fabian Ebner
d8197cac33 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>
2022-04-20 15:01:28 +02:00
Fabian Ebner
a9710d41d8 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>
2022-04-20 15:01:28 +02:00
Thomas Lamprecht
0adbad7677 ui: lxc resources: modernize & simplify
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-04-14 07:50:25 +02:00
Stefan Sterz
740542a6a1 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>
2022-04-13 11:35:30 +02:00
Thomas Lamprecht
9de8b50633 ui: disk reasign: condense code, some style improvements
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-04-13 11:34:31 +02:00
Thomas Lamprecht
424fbdb087 ui: disk reassign: improve title and field-label
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-04-08 15:00:58 +02:00
Thomas Lamprecht
084428f3ed 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>
2022-04-08 14:58:30 +02:00
Thomas Lamprecht
00aeca6fb8 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>
2022-04-08 14:55:07 +02:00
Thomas Lamprecht
0c400ddf63 ui: move disk reassign into window/ folder
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Reviewed-by: Fabian Ebner <f.ebner@proxmox.com>
2022-04-08 14:53:55 +02:00
Aaron Lauterer
b52c5730d4 ui: hdmove: modernize/refactor
Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
Reviewed-by: Fabian Ebner <f.ebner@proxmox.com>
2022-04-07 15:35:17 +02:00
Aaron Lauterer
66e87cd213 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>
2022-04-07 15:35:17 +02:00
Aaron Lauterer
678a887928 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>
2022-04-07 15:34:44 +02:00
Aaron Lauterer
f0d6818404 ui: utils: add nextFreeMP
Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
Reviewed-by: Fabian Ebner <f.ebner@proxmox.com>
2022-04-07 15:32:44 +02:00
Aaron Lauterer
d38997bbc5 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>
2022-04-07 15:32:44 +02:00
Fabian Ebner
30314402aa ui: lxc: resources: consider rootfs as a disk again
Commit fa7980c2 ("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>
2022-04-07 15:28:33 +02:00
Fabian Ebner
548937ab30 ui: storage edit: retention: add max-protected-backups setting
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2022-04-06 14:07:21 +02:00
Fabian Grünbichler
9e491ef408 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>
2022-04-06 14:07:21 +02:00
Fabian Ebner
259fd9b6f6 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>
2022-04-06 13:40:05 +02:00
Fabian Ebner
c884cb3559 vzdump: backup file list: drop unused parameter
It's not used anymore since b5a3ab3d20f3b62f615ea09341a2c83fc3d243a2
aligned pruning in a dumpdir with pruning on a storage.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2022-04-06 10:00:34 +02:00
Dominik Csapak
7e8fb4f80d 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>
2022-04-01 17:52:10 +02:00
Thomas Lamprecht
ea9b688a82 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>
2022-04-01 17:28:38 +02:00
Dominik Csapak
b8894a9a70 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>
2022-04-01 16:47:47 +02:00
Thomas Lamprecht
cc0e3d4b19 ui: vm hardware: module wide refactoring/cleanups/style changes/fixes
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-04-01 16:46:30 +02:00