Commit Graph

5491 Commits

Author SHA1 Message Date
Thomas Lamprecht
d290acc84d ui: live-restore: refine notice
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-04-24 15:20:53 +02:00
Thomas Lamprecht
6da2926cbc ui: CT restore: make privilege level a tri-state radio group
Default to keeping the state of the archive, as that has the highest
chance to fully work, but allow to enforce either level.

It'd be good to add some more feedback of the to be restored guest,
i.e., the whole config..

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-04-24 15:18:44 +02:00
Thomas Lamprecht
a4f1a33d09 ui: ceph crush: code cleanups
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-04-23 18:55:46 +02:00
Thomas Lamprecht
cd99757bdf ui: ceph pools: avoid resetting crush rule hwne editing a pool
we are only allowed to set autoselect the first record after load on
creation, else we may change the value by mistake which, if the admin
does not notices when changing some other setting, can be quite fatal
as it can trigger a huge rebalance, where the cause may then not even
be obvious and thus an admin be quite baffled.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-04-23 18:52:00 +02:00
Thomas Lamprecht
5a34ccd6b2 ui: ceph pools: do not grey-out name field when editing
The displayEdit field already shows it as display field in this case,
which is enough.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-04-23 18:00:13 +02:00
Thomas Lamprecht
ad33cfd53a ui: ceph pools: fix target size column renderer
Moved to widget toolkit recently..

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-04-23 17:59:13 +02:00
Thomas Lamprecht
8e9a0d5792 bump version to 6.4-1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-04-23 17:18:32 +02:00
Thomas Lamprecht
0c37330663 d/control: bump versioned dependency of libpve-http-server-perl
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-04-23 17:18:32 +02:00
Oguz Bektas
e224b7d2e6 fix #417: proxy: allow settnig LISTEN_IP for pveproxy and spiceproxy
The $host variable is set to "::0" by default to listen on wildcard
(with 'Domain' => PF_INET6).

If 'LISTEN_IP' is defined in /etc/default/pveproxy, that IP will be used
instead.

Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
2021-04-23 17:13:45 +02:00
Thomas Lamprecht
74b6a95945 ui: storage: backups: allow to edit notes also here
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-04-23 16:47:32 +02:00
Thomas Lamprecht
6e339db129 ui: backup views: unfiy button order in storage and guest backup view
and group better, avoid alternating by destroying and restoring
button (prune, file restore, remove) and place file restore and
restore together

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-04-23 16:46:10 +02:00
Thomas Lamprecht
c72ff9a9ae ui: guest backup grid: hide file-restore button if not a PBS storage
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-04-23 16:44:58 +02:00
Fabian Grünbichler
4c02fcfd0a file-restore: pass in full volume ID
not just the snapshot name.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-04-23 15:32:10 +02:00
Stefan Reiter
fe66076f46 gui: add task name for 'pbs-download'
Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2021-04-23 15:32:08 +02:00
Stefan Reiter
84ae9c8a19 backupview: add file restore button
Adds it for both BackupViews, on VM view and storage view.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2021-04-23 15:32:08 +02:00
Lorenz Stechauner
63c2296675 ui: set file name for spice console download in chrome
When the virt-viewer file is downloaded we already set a file name in
Android, so the file type may be recognized. Also doing this in
Chrome (and Chromium based browsers) allows users to "alyways open
files of this type". So the browser automatically opens the console
window without user interaction.

Signed-off-by: Lorenz Stechauner <l.stechauner@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-04-23 15:25:25 +02:00
Dominik Csapak
c95917c263 ui: use pmxInfoWidget instead of pveInfoWidget
to prevent that they further diverge than they alread have
(pmxInfoWidget got an additional function that is compatible)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-04-23 10:37:55 +02:00
Aaron Lauterer
1490b5eb6d ui: firewall: rule: maxlength for source and dest
Limiting the length of the source and dest paramters helps to avoid
problems with iptables-restore which would not apply a rule if a
parameter is larger than the parameter buffer (1024)[0]. As the API is
already limiting this, we should also reflect that in the GUI and give
people a hint that IP sets are most likely the better approach.

[0] http://git.netfilter.org/iptables/tree/iptables/xshared.c?h=v1.8.7#n469

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
2021-04-22 21:33:37 +02:00
Stoiko Ivanov
6cd854d8c7 fix #3385: api: network: check for used ports before writing
Currently the check for used ports for bonds and bridges happens
while rendering '/etc/network/interfaces.new' in PVE::Inotify
(pve-common).
However at that stage the new/updated interface is already merged
with the old settings, making it impossible to indicate where a NIC
is currently used.

The code is adapted from the renderer in
PVE::Inotify::__write_etc_network_interfaces.

Tested on a virtual PVE instance.

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-04-22 21:32:26 +02:00
Thomas Lamprecht
5d4faa4dd7 d/control: bump versioned proxmox-widget-toolkit dependency
bunch of stuff moved over or got added there...

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-04-22 20:43:39 +02:00
Dominik Csapak
e3c4b75d9e ui: panel/StatusView: use from widget-toolkit instead
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-04-22 18:34:34 +02:00
Dominik Csapak
2874be00f2 ui: Utils: use updateColumns from widget-toolkit
it was moved there

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-04-22 18:34:34 +02:00
Dominik Csapak
a8ea1b6876 ui: use some icons from widget-toolkit
we moved them there

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-04-22 18:34:34 +02:00
Dominik Csapak
1bd7bcdbf1 ui: Utils: use render functions from widget-toolkit
they live there now, so we can delete them here and use the ones from
widget-toolkit instead

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-04-22 18:34:34 +02:00
Thomas Lamprecht
b988934559 ui: guest safe destroy: try to be a bit more telling in box/tooltip label
Try to be more clear about what those checkboxes do, hopefully
reducing potential confusion by (newer) users.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-04-22 13:20:46 +02:00
Thomas Lamprecht
ff89c79e72 ui: guest safe destroy: fix alias
`proxmoxSafeDestroy` is the one from the parent, also widget. missed
in general...

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-04-22 13:19:07 +02:00
Fabian Ebner
af6f4b9ba0 ui: remove SafeDestroy window
which has been moved to proxmox-widget-toolkit.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-04-22 13:02:45 +02:00
Fabian Ebner
b9635c9b99 ui: use safe destroy window from proxmox-widget-toolkit
for the remaining (i.e. non-guests) users.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-04-22 13:02:45 +02:00
Fabian Ebner
94d2359b78 ui: safe destroy guest: add checkbox for removal of unreferenced disks
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-04-22 12:48:41 +02:00
Fabian Ebner
2452e18de4 ui: use new SafeDestroyGuest window
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-04-22 12:48:41 +02:00
Fabian Ebner
803053dad8 ui: add SafeDestroyGuest window
The purge parameter is always explicitly set, which is different from the
existing behavior, but it does not rely on what the default in the backend is.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-04-22 12:48:41 +02:00
Dominik Csapak
ced67201ad ui: Parser: respect mtu in {parse, print}QemuNetwork
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-04-22 12:15:10 +02:00
Thomas Lamprecht
736b919d04 http server: comment and refactor CSRF skip-check logic
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-04-22 11:19:40 +02:00
Lorenz Stechauner
7d11059e2d http-server: fix for api token csrf token check
Do not check any csrf tokens for auth with api tokens.

Signed-off-by: Lorenz Stechauner <l.stechauner@proxmox.com>
2021-04-22 10:54:26 +02:00
Thomas Lamprecht
e45f98ef8b http-server: minor code/indentation/comment cleanups
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-04-22 09:10:24 +02:00
Lorenz Stechauner
d9fc56efab fix #3389: Skip CSRF token check also for API tokens on file upload
On file upload, the check for CSRF tokens was already skipped when
performing user authentication. This now happens for API tokens also.

Signed-off-by: Lorenz Stechauner <l.stechauner@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-04-22 09:01:11 +02:00
Dominik Csapak
8aac63a5db ui: Utils: change default Console order for vms
we want to use spice for vms more than xtermjs if both are available
(since spice must be chosen as display in that case)
so the resulting order of preference for vms is:
  spice
  xtermjs
  novnc

since all methods work for containers always, there we use
xtermjs by default, or what is chosen in the datacenter option

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-04-22 08:51:24 +02:00
Thomas Lamprecht
a91bd3c370 api: ceph pool create: replace left-over complex error handling
this was from the time where we had a loop here to add two storages,
one for KRDB-only and one for KRBD-never. Nowadays we can handle the
mixed case just fine, but the patch dropping that forget to cleanup
the error handling..

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-04-21 17:34:23 +02:00
Dominik Csapak
27cc48c212 ui: add comment about disabling spice/xterm initially
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-04-21 17:29:21 +02:00
Thomas Lamprecht
68f94af88a ceph: pool set: fix printing problematic settings
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-04-21 16:06:29 +02:00
Thomas Lamprecht
cb83113ddc ceph: pool set: print settings as they are applied
a bit of a weird place to print code-wise, but it shows up in the
task log just fine.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-04-21 16:05:42 +02:00
Thomas Lamprecht
69c0ff3e60 ceph: pool set: improve handling "size" parameter
instead of fully duplicating the code just order it first if it
exists...

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-04-21 15:49:43 +02:00
Thomas Lamprecht
84b08e8aec api: ceph/pool: fix formatting of API parameters
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-04-21 15:45:35 +02:00
Thomas Lamprecht
86a5da839a ui: ceph/pool: fix setting target ratio/size (back) to zero
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-04-21 15:44:47 +02:00
Thomas Lamprecht
0e0f861a04 ui: ceph/pool: fix minWidths for columns to support 720p without scrolling
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-04-21 15:41:03 +02:00
Thomas Lamprecht
00c0fc4bb5 ceph: pool: make min_size constrain check more general
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-04-21 14:19:50 +02:00
Thomas Lamprecht
5c2c2a6db9 ceph: pool: min_size should be auto-set to > size/2
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-04-21 14:18:36 +02:00
Thomas Lamprecht
4d7acd65bf ceph: pool edit: improve UX of target size/ratio fields
s/Target Size Ratio/Target Ratio/, shorter and ceph docs call it also
that way, allows do drop the non-standard label width.

Add tooltips to explain both, target size and ratio, a bit.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-04-21 13:31:06 +02:00
Thomas Lamprecht
18a5845e34 ceph: pools: use sizeField, nicer UX and less code
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-04-21 13:15:32 +02:00
Thomas Lamprecht
8654b4b02f ui: size-field: add more units
This would probably benefit from being an object alá:
```
'GiB': {
    base: 2,
    order: 30,
},
```
but that would be a transparent internal change, and the current way
isn't yet a limitation, so ...

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-04-21 13:11:41 +02:00