]> git.proxmox.com Git - pve-manager.git/log
pve-manager.git
4 years agogui: ceph: let compare_ceph_versions accept arrays directly
Dominik Csapak [Mon, 16 Mar 2020 12:56:01 +0000 (13:56 +0100)]
gui: ceph: let compare_ceph_versions accept arrays directly

instead of always expecting a '.' separated version string
we will use this for the 'structured' version data

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agoceph: add 'scope' parameter to metadata api call
Dominik Csapak [Mon, 16 Mar 2020 12:56:00 +0000 (13:56 +0100)]
ceph: add 'scope' parameter to metadata api call

so that we can choose to only include the versions and not all metadata
this is done to avoid having a seperate 'versions' api call

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agoceph: factor out get/broadcast ceph versions to ceph::services
Dominik Csapak [Mon, 16 Mar 2020 12:55:59 +0000 (13:55 +0100)]
ceph: factor out get/broadcast ceph versions to ceph::services

which also removes some dead code
(the my $local_last_version variable was never used)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agoui: fix optionview caps
Thomas Lamprecht [Wed, 1 Apr 2020 15:09:56 +0000 (17:09 +0200)]
ui: fix optionview caps

there's no caps.dc['Sys.Modify'] in our heuristic caps-for-frontend
and the === undefined check was wrong

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoui: user edit: use new pmxExpireDate field
Thomas Lamprecht [Wed, 1 Apr 2020 15:09:00 +0000 (17:09 +0200)]
ui: user edit: use new pmxExpireDate field

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agodrop Makefile.rej rebase/am left over
Thomas Lamprecht [Tue, 31 Mar 2020 16:07:23 +0000 (18:07 +0200)]
drop Makefile.rej rebase/am left over

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoui: rng edit: drop useless gettext for integer
Thomas Lamprecht [Tue, 31 Mar 2020 16:04:56 +0000 (18:04 +0200)]
ui: rng edit: drop useless gettext for integer

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoui: cluster join: trigger defered call to full reload earlier
Thomas Lamprecht [Thu, 26 Mar 2020 14:20:54 +0000 (15:20 +0100)]
ui: cluster join: trigger defered call to full reload earlier

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agofollowup sdn: move a bit below and fix showing on initial load
Thomas Lamprecht [Thu, 26 Mar 2020 14:17:10 +0000 (15:17 +0100)]
followup sdn: move a bit below and fix showing on initial load

if the webinterface got loaded the api call to check if SDN is
available did not yet returned, so we could show it by accident -
even if libpve-network-perl wasn't instralled.
Fix that by hiding it (once) in the failure callback of the API call.

also move menu entries below, before Firewall, this fits better to
networking.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoadd sdn icons
Alexandre Derumier [Wed, 11 Mar 2020 02:05:39 +0000 (03:05 +0100)]
add sdn icons

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agosdn: enable SDN menu if /cluster/sdn api exist
Alexandre Derumier [Wed, 11 Mar 2020 02:05:38 +0000 (03:05 +0100)]
sdn: enable SDN menu if /cluster/sdn api exist

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
4 years agoadd sdn gui
Alexandre Derumier [Wed, 11 Mar 2020 02:05:37 +0000 (03:05 +0100)]
add sdn gui

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
4 years agod/control: bump versioned dependency for ifupdown2
Thomas Lamprecht [Mon, 23 Mar 2020 08:45:52 +0000 (09:45 +0100)]
d/control: bump versioned dependency for ifupdown2

ensures we have the OVS and recent adaptions we rely on in ifupdown
installed

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoAPI2: network reload: allow ovs reloading
Alexandre Derumier [Fri, 20 Mar 2020 10:44:54 +0000 (11:44 +0100)]
API2: network reload: allow ovs reloading

ifupdown2 support it now

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
4 years agoRevert "API2: Network: allow cidr-list && use cidr for address"
Thomas Lamprecht [Fri, 13 Mar 2020 11:02:12 +0000 (12:02 +0100)]
Revert "API2: Network: allow cidr-list && use cidr for address"

applied by mistake, needs compat code in common or the like

This reverts commit 3b82e4cf43dcb23f19b73c6df76d2f4920268df8.

4 years agofollowup: whitespace and indentation cleanup
Thomas Lamprecht [Thu, 12 Mar 2020 16:38:59 +0000 (17:38 +0100)]
followup: whitespace and indentation cleanup

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agofix #2634: print specific error if hook-script is not executable
Moayad Almalat [Thu, 12 Mar 2020 11:18:18 +0000 (12:18 +0100)]
fix #2634: print specific error if hook-script is not executable

Signed-off-by: Moayad Almalat <m.almalat@proxmox.com>
Tested-by: Oguz Bektas <o.bektas@proxmox.com>
4 years agocheck if user is enabled after verifying a ticket
Dominik Csapak [Thu, 12 Mar 2020 14:09:21 +0000 (15:09 +0100)]
check if user is enabled after verifying a ticket

when a user is disabled, we do not touch any ACLs, and already issued
tickets are still valid (until their expiration time)

check directly after the verification of the ticket if the user
is still enabled, so that any api call fails for that user

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agoAPI2: Network: allow cidr-list && use cidr for address
Alexandre Derumier [Wed, 4 Mar 2020 16:17:59 +0000 (17:17 +0100)]
API2: Network: allow cidr-list && use cidr for address

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
4 years agobump version to 6.1-8
Thomas Lamprecht [Mon, 9 Mar 2020 18:05:18 +0000 (19:05 +0100)]
bump version to 6.1-8

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoui: let grid column filter symbol float right
Thomas Lamprecht [Sat, 7 Mar 2020 18:04:19 +0000 (19:04 +0100)]
ui: let grid column filter symbol float right

So it has a more fixed position, independent of the column header
length. Also, this brings it nearer to the button where one can
adapt/turn off filters.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agocss: move smilar filter rules closer together
Thomas Lamprecht [Sat, 7 Mar 2020 18:03:50 +0000 (19:03 +0100)]
css: move smilar filter rules closer together

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agogui: make grid column filter more obvious
Dominik Csapak [Mon, 24 Feb 2020 09:10:23 +0000 (10:10 +0100)]
gui: make grid column filter more obvious

by adding the icon 'fa-filter' (see fontawesome.css) after the column header
and making it slightly darker than the text

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agoui: dc/options: add max_workers setting
Thomas Lamprecht [Fri, 6 Mar 2020 19:35:00 +0000 (20:35 +0100)]
ui: dc/options: add max_workers setting

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoui dc/options: refactor render_bwlimits
Thomas Lamprecht [Fri, 6 Mar 2020 19:17:34 +0000 (20:17 +0100)]
ui dc/options: refactor render_bwlimits

while this /could/ (not benched marked in any way) be slower it
operates on so small data sets that this isn't worth it having double
the code lines.

A map + join is still quite readable and not yet "code golfy"

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoui dc/options: add trailing commas
Thomas Lamprecht [Fri, 6 Mar 2020 19:16:28 +0000 (20:16 +0100)]
ui dc/options: add trailing commas

just to avoid making those lines dirty again in a future property
addition..

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agofix #2611: gui: use backendUnit and pretty renderer
Stefan Reiter [Tue, 25 Feb 2020 15:32:00 +0000 (16:32 +0100)]
fix #2611: gui: use backendUnit and pretty renderer

Slightly confusing with the units:
* Backend stores values in KiB/s
* Frontend displays MiB/s (which is a good choice when considering
  current generation network speeds as opposed to huge KiB numbers IMO)
* Renderer previously showed no units, which would usually be interpreted
  as Bytes/s

So add a pretty renderer that shows units and set backendUnit to submit
correctly converted values.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
4 years agoui: ContentView: consider new ctime value
Dietmar Maurer [Wed, 4 Mar 2020 10:47:22 +0000 (11:47 +0100)]
ui: ContentView: consider new ctime value

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoqemu: change virtio-rng icon to die
Stefan Reiter [Thu, 20 Feb 2020 17:10:43 +0000 (18:10 +0100)]
qemu: change virtio-rng icon to die

'die' as in 'dice', not what Perl does

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
4 years agoqemu: add virtio-rng option to GUI
Stefan Reiter [Thu, 20 Feb 2020 17:10:42 +0000 (18:10 +0100)]
qemu: add virtio-rng option to GUI

Warn the user when selecting /dev/random or disabling speed limits.

'hardware_counts' is used since technically more than one RNG could be
attached to a QEMU machine. It is limited to 1 however, since the
usefulness of such a setup is more than questionable, considering the
linux kernel only ever uses one hwrng at a time anyway.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
4 years agoqemu: fix icon alignment in "Add Hardware" menu
Stefan Reiter [Thu, 20 Feb 2020 17:10:41 +0000 (18:10 +0100)]
qemu: fix icon alignment in "Add Hardware" menu

It was ever so slightly off.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
4 years agoceph: make all service name regexes the same
Dominik Csapak [Mon, 24 Feb 2020 15:32:19 +0000 (16:32 +0100)]
ceph: make all service name regexes the same

instead of having multiple regexes in various places for the name,
define a 'SERVICE_REGEX' in PVE::Ceph::Services, and use that
everywhere in the api where we need it

additionally limit new sevices to 200 characters, since
systemd units have a limit of 256 characters[0] (including suffix), and
200 seems to be enough.

users can now create ceph services on machines with hostnames
longer than 32 characters

0: https://www.freedesktop.org/software/systemd/man/systemd.unit.html

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agoceph: do not check ips if no network is configured
Dominik Csapak [Mon, 24 Feb 2020 11:01:35 +0000 (12:01 +0100)]
ceph: do not check ips if no network is configured

the network and the cluster network are optional in the ceph config
and with 'pveceph init', so only check if we have an ip address
from those networks if it is actually configured

otherwise, the createosd call dies with an 'ip' error message
even if it would work

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agoAdd all standard output options that are not yet defined
Fabian Ebner [Mon, 2 Mar 2020 09:21:35 +0000 (10:21 +0100)]
Add all standard output options that are not yet defined

When a property description already contained an option, no standard
output options at all would be added to it, e.g. '/nodes/NODE/vzdump'
already defines its own 'quiet'. Now all not yet defined options are
added to the description, this is done by using the fact that we can
pass a explicit list of std options to add to
add_standard_output_properties, so we filter all already defined ones
out and just pass that as list.

Fixes
pvesh create /nodes/NODE/vzdump -vmid ID -storage STORAGE
issued from a different node and
pvesh create /nodes/NODE/vzdump -vmid ID -storage STORAGE --output-format json
and maybe other calls.

Reported here: https://forum.proxmox.com/threads/output-format-error-with-pvesh-create.47711/

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoui: add date column in per-guest backup archive panel
Thomas Lamprecht [Fri, 21 Feb 2020 15:36:48 +0000 (16:36 +0100)]
ui: add date column in per-guest backup archive panel

Similar to commit 12d50fcd21c045ba55a3cbadd27b91a9e8939310 which
added this column to the storage content grid let's also add it here.
As we also base off the 'pve-storage-content' it's just a matter of
copying over the column definition 1:1

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agostorage content GUI: improve detection of backup volumes
Dietmar Maurer [Wed, 19 Feb 2020 12:59:44 +0000 (13:59 +0100)]
storage content GUI: improve detection of backup volumes

Include new proxmox backup server volumes.

4 years agovzdump: add support for proxmox backup server
Dietmar Maurer [Wed, 19 Feb 2020 12:59:43 +0000 (13:59 +0100)]
vzdump: add support for proxmox backup server

4 years agogui: pci passthrough: fix 'Add PCI' dialog for new devices
Stefan Reiter [Mon, 17 Feb 2020 13:36:28 +0000 (14:36 +0100)]
gui: pci passthrough: fix 'Add PCI' dialog for new devices

Commit f36240c507 (gui: pci passthrough: consider domain in PCISelector)
used 'values.host' without checking if it's set, resulting in an error
when the dialog was opened for a new device (where values.host is
undefined).

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
4 years agoceph api: Make systemd unit type suffix optional
Dominic Jäger [Mon, 17 Feb 2020 11:28:57 +0000 (12:28 +0100)]
ceph api: Make systemd unit type suffix optional

To (re)start and stop Ceph services the API calls systemd units using the
function ceph_service_cmd.  If unspecified, this function assumes the type
".target" for a unit. By making the unit type suffix in the API optional, it
can make use of this assumption.

Signed-off-by: Dominic Jäger <d.jaeger@proxmox.com>
4 years agopveceph: Make service parameter optional
Dominic Jäger [Mon, 17 Feb 2020 11:28:56 +0000 (12:28 +0100)]
pveceph: Make service parameter optional

The default value for "pveceph start" and "pveceph stop" is "ceph.target".
However, omitting the parameter to use the default has been forbidden.

Signed-off-by: Dominic Jäger <d.jaeger@proxmox.com>
4 years agogui/cluster: show all links (up to 8) in cluster overview
Stefan Reiter [Wed, 29 Jan 2020 10:27:22 +0000 (11:27 +0100)]
gui/cluster: show all links (up to 8) in cluster overview

Show only links found on the cluster.

'enableColumnHide' is set to false, since it causes confusing behaviour
for the user, considering we'd overwrite part of their choices every 5
seconds.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
4 years agogui: form/ControllerSelector: fix autoselection
Dominik Csapak [Wed, 12 Feb 2020 09:51:59 +0000 (10:51 +0100)]
gui: form/ControllerSelector: fix autoselection

changing from Ext.Array.each to a for loop and changing the return
to a 'break', resulted in exiting the wrong loop (previously the outer,
now the inner) resulting in wrongly looping through all controllers
instead of only until we found a match

using a label and labeled break, we can break the outer loop

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agogui: dc/Summary: improve dashboard storage calculation
Dominik Csapak [Wed, 12 Feb 2020 10:16:59 +0000 (11:16 +0100)]
gui: dc/Summary: improve dashboard storage calculation

if no storage is selected in 'My Settings' our calculatin was done as follows:
* for every node, count 'local',
* every other storage gets only counted *once*, even if it is a local storage

as we have the 'shared' flag available, we can count local storages
for every node where they are defined which results in a storage total
calculation:
sum of all local storages on all nodes + all shared storages once

should make a better overview of storage for a cluster with local storages

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agogui: dc/TFAEdit: show an error message if tfa api call fails
Dominik Csapak [Tue, 11 Feb 2020 09:01:31 +0000 (10:01 +0100)]
gui: dc/TFAEdit: show an error message if tfa api call fails

setting the loadmask did not really work, so show a messagebox instead
and close the window

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agogui: TFAEdit: use viemodel binding for hiding/showing qr code
Dominik Csapak [Tue, 11 Feb 2020 09:01:30 +0000 (10:01 +0100)]
gui: TFAEdit: use viemodel binding for hiding/showing qr code

the verification textfield, and the selected tab.

also remove the code that used the value by the userview panel, since
this is the only way to have a consistent behaviour on the userview
setting and the usermenu tfa setting

this fixes the issue that on the 'user menu' we accidentally showed
the qr code and verification field, even if the user already had a
totp code

now it shows 'Unchanged' like when opened via dc/UserView

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agoui: lxc/network: fix initial empty text on edit
Thomas Lamprecht [Mon, 10 Feb 2020 15:34:43 +0000 (16:34 +0100)]
ui: lxc/network: fix initial empty text on edit

Editing an existing interface with DHCP set showed the emptyText
"None", which is confusing (and wrong)

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agogui: lxc/Network: add 'None' EmptyText for static mode
Dominik Csapak [Mon, 10 Feb 2020 12:54:48 +0000 (13:54 +0100)]
gui: lxc/Network: add 'None' EmptyText for static mode

this way it is more clear that leaving that field empty results in
no configured ip for that interface, this may help prevent
users to select 'dhcp' for e.g. ipv6 when they do not want an ipv6
and do not have a dhcp6 server in the network (which would result
in a long boot time of the container, because of the dhcp timeout)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agopvesh: refactor and cleanup
Thomas Lamprecht [Mon, 10 Feb 2020 10:37:34 +0000 (11:37 +0100)]
pvesh: refactor and cleanup

use $res as variable name, as $json which may not be JSON is a bit
confusing.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agopvesh: proxy : display result if not json
Alexandre Derumier [Mon, 10 Feb 2020 08:16:24 +0000 (09:16 +0100)]
pvesh: proxy : display result if not json

When a remote node not return a json, we got and error.

This is fixing this:

pvesh set /nodes/localname/network
UPID:kvmformation2:0034937B:09352894:5E41106C:srvreload:networking:root@pam:

pvesh set /nodes/remotenode/network
JSON text must be an object or array (but found number, string, true, false or null, use allow_nonref to allow this) at /usr/share/perl5/PVE/CLI/pvesh.pm line 125.

This patch simply return raw result if it's not a json

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
4 years agoVZDump: sort module usage
Thomas Lamprecht [Mon, 10 Feb 2020 10:11:21 +0000 (11:11 +0100)]
VZDump: sort module usage

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agogui: lxc/Network: remove trailing whitespace
Dominik Csapak [Wed, 5 Feb 2020 11:00:55 +0000 (12:00 +0100)]
gui: lxc/Network: remove trailing whitespace

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agoui: snapshots: move hint to bottom and make it shorter
Thomas Lamprecht [Thu, 6 Feb 2020 21:39:22 +0000 (22:39 +0100)]
ui: snapshots: move hint to bottom and make it shorter

Moving it to the bottom of the dialog avoids other UI elements
jumping around when it gets displayed.

Further shorten the text itself, while the originally was good it was
a bit on the long side, users tend to overead to long warnings/hints
more easily, so try to be more terse.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoWarn about file system state when a freeze would be needed, but isn't possible
Fabian Ebner [Thu, 6 Feb 2020 12:26:37 +0000 (13:26 +0100)]
Warn about file system state when a freeze would be needed, but isn't possible

If a snapshot of a running VM is taken and the RAM is not included, the backend
checks whether the QEMU Guest Agent is running inside the VM. If it is, it freezes
the file system, otherwise the snapshot is taken without freezing, which
could lead to an inconsistent file system state in the snapshot.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
4 years agoHide 'Include RAM' when VM isn't running
Fabian Ebner [Thu, 6 Feb 2020 12:26:36 +0000 (13:26 +0100)]
Hide 'Include RAM' when VM isn't running

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
4 years agoUse 'isCreate' instead of 'snapname' to determine window layout
Fabian Ebner [Thu, 6 Feb 2020 12:26:35 +0000 (13:26 +0100)]
Use 'isCreate' instead of 'snapname' to determine window layout

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
4 years agoFix error message
Fabian Ebner [Thu, 6 Feb 2020 12:26:34 +0000 (13:26 +0100)]
Fix error message

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
4 years agogui: tree/SnapshotTree: fix gettext invocation
Dominik Csapak [Wed, 5 Feb 2020 10:58:29 +0000 (11:58 +0100)]
gui: tree/SnapshotTree: fix gettext invocation

our gettext extractor cannot handle such statements to extract the
gettext, so change it to two gettexts

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agogui: increase scsi value to that in the backend
Dominik Csapak [Wed, 5 Feb 2020 08:30:47 +0000 (09:30 +0100)]
gui: increase scsi value to that in the backend

we now can have 31 scsi disks, so show/allow them in the gui

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agogui: do not allow to edit 'special' roles
Dominik Csapak [Fri, 31 Jan 2020 10:48:02 +0000 (11:48 +0100)]
gui: do not allow to edit 'special' roles

since any change to them is currently silently ignored by the backend
and should result in an error anyway

partially fixes #2575

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agoui CT Features: add checkbox for new "allow mknod device creation in CT"
Thomas Lamprecht [Fri, 31 Jan 2020 19:37:44 +0000 (20:37 +0100)]
ui CT Features: add checkbox for new "allow mknod device creation in CT"

note that it's experimental..

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoui LxcFeaturesEdit: refactor+cleanup and make slightly wider
Thomas Lamprecht [Fri, 31 Jan 2020 19:35:36 +0000 (20:35 +0100)]
ui LxcFeaturesEdit: refactor+cleanup and make slightly wider

Avoid the initComponent, just use autoLoad.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agobump version to 6.1-7
Thomas Lamprecht [Thu, 30 Jan 2020 19:32:03 +0000 (20:32 +0100)]
bump version to 6.1-7

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoui snapshot tree: avoid another exception in delayd load when view is gone
Thomas Lamprecht [Thu, 30 Jan 2020 19:03:23 +0000 (20:03 +0100)]
ui snapshot tree: avoid another exception in delayd load when view is gone

similar story than commit 9cc4958f5a03dd130198a090472782a2664d5b8d
We cannot really assert anything about the state of me (the view) and
consorts if me.destroyed is true, just early return.

We can get here because this is a delayed task, i.e., async,
everything can happen in between triggering it and receiving the
actual callback, so guard!

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoui snapshot tree: avoid exception in delayd load when view is gone
Thomas Lamprecht [Thu, 30 Jan 2020 18:43:16 +0000 (19:43 +0100)]
ui snapshot tree: avoid exception in delayd load when view is gone

If one switched through guest fast (e.g., keeping the down-arrow key
pressed) while staying on the snapshot panel, it could happen that
the previous view got already destroyed once the success callback of
the feature API request got executed.

Then the ExtJS ViewModels' set method got a "null" back from its
me.getStub(...) call, and tried to access members of that, resulting
in a TypeError exception.

Avoid that by checking if we're already destroyed or still around
before doing that call. During the time we are already in the
callback we shouldn't be able to get destroyed in parallel due to JS
single thread nature and no yield point here, so this is safe.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoui snapshot: improve template string usage
Thomas Lamprecht [Thu, 30 Jan 2020 18:42:21 +0000 (19:42 +0100)]
ui snapshot: improve template string usage

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoui snapshot tree: add label when no new snapshot is possible
Thomas Lamprecht [Thu, 30 Jan 2020 18:42:02 +0000 (19:42 +0100)]
ui snapshot tree: add label when no new snapshot is possible

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoui snapshot tree: express formulas more concisely
Thomas Lamprecht [Thu, 30 Jan 2020 18:34:08 +0000 (19:34 +0100)]
ui snapshot tree: express formulas more concisely

Use arrow functions to bring them in a more simple boolean expression
style. Further, we can reuse the "isSnapshot" formula in the
"canRollback" and "canRemove" ones.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoui: follow up style fixes, don't cram expressions into one line
Thomas Lamprecht [Thu, 30 Jan 2020 18:31:44 +0000 (19:31 +0100)]
ui: follow up style fixes, don't cram expressions into one line

We do not want to have multiple expressions on the same line, if it'
really is an exception.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agofix #2572: gui: make snapshot panel visible for VM.Audit
Dominik Csapak [Thu, 30 Jan 2020 15:58:53 +0000 (16:58 +0100)]
fix #2572: gui: make snapshot panel visible for VM.Audit

with the now rewritten panels, this works as expected

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agogui: refator SnapshotTree
Dominik Csapak [Thu, 30 Jan 2020 15:58:52 +0000 (16:58 +0100)]
gui: refator SnapshotTree

using the better View, ViewModel, Controller style,
while doing this, make it generic so that we can use it for qemu and lxc

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agogui: refactor snapshot window
Dominik Csapak [Thu, 30 Jan 2020 15:58:51 +0000 (16:58 +0100)]
gui: refactor snapshot window

using an Proxmox.window.Edit, which does many of the things we did
manually, also rewrite is in such way that we can use it for qemu
and lxc

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agoui dc: move cluster name info into join button
Thomas Lamprecht [Thu, 30 Jan 2020 15:08:07 +0000 (16:08 +0100)]
ui dc: move cluster name info into join button

Avoids another textfield while still giving the information to the
user.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agogui/cluster: show cluster name from joinInfo in join dialog
Stefan Reiter [Wed, 29 Jan 2020 10:27:20 +0000 (11:27 +0100)]
gui/cluster: show cluster name from joinInfo in join dialog

To help a user identify if they put in the joinInfo for the correct
cluster.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
4 years agogui/cluster: validate cluster name length on create
Stefan Reiter [Wed, 29 Jan 2020 10:27:19 +0000 (11:27 +0100)]
gui/cluster: validate cluster name length on create

API limits this to 15, validate in GUI as well for instant user
feedback.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
4 years agoui: fix disk controllers sortByPreviousUsage iteration
Thomas Lamprecht [Thu, 30 Jan 2020 12:36:53 +0000 (13:36 +0100)]
ui: fix disk controllers sortByPreviousUsage iteration

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agobump version to 6.1-6
Thomas Lamprecht [Wed, 29 Jan 2020 20:28:27 +0000 (21:28 +0100)]
bump version to 6.1-6

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agowww: add permissions button to userview
Fabian Grünbichler [Tue, 21 Jan 2020 12:54:26 +0000 (13:54 +0100)]
www: add permissions button to userview

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
4 years agoapi/tasks: attribute token tasks to user
Fabian Grünbichler [Tue, 21 Jan 2020 12:54:24 +0000 (13:54 +0100)]
api/tasks: attribute token tasks to user

and store token ID in separate, currently unused member.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
4 years agod/control: bump version dependencies for libpve-http-server-perl
Thomas Lamprecht [Wed, 29 Jan 2020 09:25:42 +0000 (10:25 +0100)]
d/control: bump version dependencies for libpve-http-server-perl

For new auth extract helper support

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agopveproxy: use new cookie extraction method
Fabian Grünbichler [Tue, 21 Jan 2020 12:54:23 +0000 (13:54 +0100)]
pveproxy: use new cookie extraction method

we only care about the regular cookie case for the index.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
4 years agod/control: bump version dependencies for pve-common
Thomas Lamprecht [Wed, 29 Jan 2020 09:24:47 +0000 (10:24 +0100)]
d/control: bump version dependencies for pve-common

For allowtoken property support in schema

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agorest_handler: implement 'allowtoken' property
Fabian Grünbichler [Tue, 21 Jan 2020 12:54:22 +0000 (13:54 +0100)]
rest_handler: implement 'allowtoken' property

to filter out API paths that are not available with API tokens for
security reasons, such as access control related endpoints.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
4 years agod/control: bump version dependencies for pve-access-control
Thomas Lamprecht [Wed, 29 Jan 2020 09:19:15 +0000 (10:19 +0100)]
d/control: bump version dependencies for pve-access-control

for API token verification support.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoauth_handler: handle API tokens
Fabian Grünbichler [Tue, 21 Jan 2020 12:54:21 +0000 (13:54 +0100)]
auth_handler: handle API tokens

by verifying them via pve-access-control, as alternative to regular
tickets.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
4 years agowww: add 'users' columns to Groups model
Fabian Grünbichler [Tue, 21 Jan 2020 12:54:25 +0000 (13:54 +0100)]
www: add 'users' columns to Groups model

it's useful information that now gets returned by the API, so might as
well display it.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
4 years agoProtect the user's tfa key setting.
Wolfgang Link [Fri, 17 Jan 2020 13:48:59 +0000 (14:48 +0100)]
Protect the user's tfa key setting.

If oath or U2F is set, it should not be possible to change it
in the GUI on the user edit window.
It disables the second factor, but leave the tfa key behind
in the file tfa.cfg.
The key in the tfa.cfg file is a problem when the user tries to recreate a key.
The old key must be deleted before a new one can be created.

4 years agomanager: startIPStore: status can be null/undef
Thomas Lamprecht [Mon, 27 Jan 2020 18:09:10 +0000 (19:09 +0100)]
manager: startIPStore: status can be null/undef

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoAPI2: Network: add vlan-raw-device && vlan-id options.
Alexandre Derumier [Sat, 25 Jan 2020 09:30:12 +0000 (10:30 +0100)]
API2: Network: add vlan-raw-device && vlan-id options.

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
4 years agogui: qemu: HardwareView: improve button disable code
Dominik Csapak [Fri, 17 Jan 2020 16:14:10 +0000 (17:14 +0100)]
gui: qemu: HardwareView: improve button disable code

this improves following behaviours:
* do not loop over items multiple times
  (we iterated one time extra for efidisk)
* do not check every item for cloudinit
  (we even checked non-disk types)
* make the counts more generic using an object
* also disable cloudinit button when you have one pending
* also disable serial/net button when at limit or the user has
  not the right priviliges

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agogui: qemu HardwareView: specify hardware counts in Utils
Dominik Csapak [Fri, 17 Jan 2020 16:14:09 +0000 (17:14 +0100)]
gui: qemu HardwareView: specify hardware counts in Utils

this also fixes the issue that we only showed 4 hostpci devices in
the gui despite raising the limit in the backend to 16

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agoui: controller selector: use OSDefaults.getDefaults
Thomas Lamprecht [Fri, 24 Jan 2020 08:37:09 +0000 (09:37 +0100)]
ui: controller selector: use OSDefaults.getDefaults

it does the fallback for us already

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoui: controller selector: refactor and cleanup
Thomas Lamprecht [Fri, 24 Jan 2020 08:35:58 +0000 (09:35 +0100)]
ui: controller selector: refactor and cleanup

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoui: avoid duplication of guest disc controller maxIDs definition
Thomas Lamprecht [Thu, 23 Jan 2020 11:15:19 +0000 (12:15 +0100)]
ui: avoid duplication of guest disc controller maxIDs definition

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoui: FW/Alias: whitespace/indentation fixes
Thomas Lamprecht [Wed, 22 Jan 2020 11:40:35 +0000 (12:40 +0100)]
ui: FW/Alias: whitespace/indentation fixes

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoui: FW/Alias: make grid flex
Thomas Lamprecht [Wed, 22 Jan 2020 11:40:15 +0000 (12:40 +0100)]
ui: FW/Alias: make grid flex

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoui: FW/Alias: make edit window wider to fit IPv6 CIDR
Thomas Lamprecht [Wed, 22 Jan 2020 11:39:58 +0000 (12:39 +0100)]
ui: FW/Alias: make edit window wider to fit IPv6 CIDR

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoBroadcast supported CPU flags
Stefan Reiter [Thu, 21 Nov 2019 14:53:52 +0000 (15:53 +0100)]
Broadcast supported CPU flags

pvestatd will check if the KVM version has changed using
kvm_user_version (which automatically clears its cache if QEMU/KVM
updates), and if it has, query supported CPU flags and broadcast them as
key-value pairs to the cluster.

If detection fails, we clear the kv-store and set up a delay (120s), to not
try again too quickly.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
4 years agofix #2552: ui: allow to collapse notes panel from guest summary
Thomas Lamprecht [Fri, 10 Jan 2020 14:51:58 +0000 (15:51 +0100)]
fix #2552: ui: allow to collapse notes panel from guest summary

Allow to collapse and expand the "Notes" panel on the virtual guests
summary panel.

Further add a browser setting to control the default behavior, one
can chose from:
 * expand on show (default)
 * collapse on show
 * collapse if there are no notes

This way users can make slightly better use of the available screen
space for the guest status.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Co-developed-by: Stefan Reiter <s.reiter@proxmox.com>
4 years agonetwork reload: check if recent enough PVE ifupdown2 version is present
Thomas Lamprecht [Tue, 14 Jan 2020 10:00:25 +0000 (11:00 +0100)]
network reload: check if recent enough PVE ifupdown2 version is present

We need a recent version *and* our patches on top of the vanilla
ifupdown2:
0001-don-t-remove-tap-veth-fwpr-interfaces-from-bridge-on.patch
0004-don-t-remove-bridge-is-tap-veth-are-still-plugged.patch

So check for at least 1.2.8 and the pve string in the version output.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoapi2 : network : add mtu
Alexandre Derumier [Wed, 8 Jan 2020 03:31:20 +0000 (04:31 +0100)]
api2 : network : add mtu

min 1280 to handle ipv6 && ipv4
max 65520 (infinibad support it)

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>