Thomas Lamprecht [Mon, 22 Feb 2021 13:30:53 +0000 (14:30 +0100)]
ui: firewall grid: try balance between flex and good overview
Recently, with the Proxmox Backup sync/verify/.. job grids I had to
change my mind regarding use of flex, overuse of it is as bad as
having all to fixed widths as it spreads out the data a lot on big
screens, making it hard to follow as lots of eye movement is
required.
What we ideally would have is a "maxFlexWidth", i.e., a maximal
auto-flex width which still allows wider columns if a user manually
drags it wider. "maxWidth" comes close, but is a hard limit and so
use it only in cases where its quite clear that wider columns make no
sense (surely someone will disagree even for those, but well...).
Basic solution is to add lots more flex ratio to comment so that the
others won't get to big fast, keeping the actual relevant config of a
rule somewhat close by (thus easier to read/grasp/parse)
Also move the source/destination port columns after their direction
column and abbreviate their header title.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Thomas Lamprecht [Mon, 22 Feb 2021 13:28:35 +0000 (14:28 +0100)]
ui: firewall grid: fix rendering comment, only show tooltip when truncated
avoid showing "undefined" if there's no comment, renderer must not
return null or undefined directly, it will converted to string as is,
so always fallback to '' empty string
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Aaron Lauterer [Mon, 22 Feb 2021 10:16:26 +0000 (11:16 +0100)]
ui: FirewallRules: Add tooltip to comments
The comment columns might not be wide enough for longer comments. Since
it is the most right columns, it can be tricky to grab the right pixel
to drag it wider.
Aaron Lauterer [Mon, 22 Feb 2021 10:16:25 +0000 (11:16 +0100)]
ui: FirewallRules: make columns flexible
Changing the width definitions to use flex will make better use on
larger monitors. Changing the `width` parameter to `minWidth` ensures
that on smaller screens it is still usable, though some horizontal
scrolling might be necessary.
There are several types of drives that use the same config keys. Most
notably CDRom and regular VM disks (EFI and cloudinit exist as well).
Since there is a dedicated permission for CDRom drives we need to check
permissions in more detail, depending on what type of drive it actually
is for things like the edit, remove and Add -> CDRom buttons.
The permission check in the row definition itself which only checked for
'VM.Config.Disk' permissions (never_delete) had to be removed and finer
grained checks added for the individual buttons. This also meant a bit
of reshuffling in the checks what kind of disk the current one is.
Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com> Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Dominik Csapak [Fri, 12 Feb 2021 15:01:15 +0000 (16:01 +0100)]
ui: dc/TokenEdit: fix editing existing tokens
we always have to calculate the url correctly, not only on creation
otherwise we try to edit the token by doing a 'PUT' request on
/access/users
and not on
/access/users/USERID/token/TOKENID
Dominik Csapak [Fri, 19 Feb 2021 14:27:00 +0000 (15:27 +0100)]
ui: window/Settings: fix labelWidth for saved user name
Somewhere during rendering of the window, extjs wants to add 5px to
the labelwidth for the surrounding container. Having a string here
results in the container having a width of 1505px instead of 155px and
the value of the field is far off to the right and not visible.
Fabian Ebner [Tue, 26 Jan 2021 11:45:28 +0000 (12:45 +0100)]
api: Ceph: add reminder to remove 'disks' call
This API call is the predecessor of /nodes/{node}/disks/list, which has seen a
few more improvements. The latter API call should be used instead, and the web
UI already does so.
Dominik Csapak [Wed, 2 Dec 2020 09:21:09 +0000 (10:21 +0100)]
status/influxdb: implement influxdb 2.x http api
needs an organization/bucket (previously db) and an optional token
the http client does not fit exactly in the connect/send/disconnect
scheme, so it simply creates a request in 'connect',
does the actual http connection in 'send' and nothing in 'disconnect'
max-body-size is set to 25.000.000 bytes by default (the influxdb default)
and the timeout to 1 second (same as default graphite tcp timeout)
the token (if given) gets saved in /etc/pve/priv/metricserver/$ID.pw
it is optional, because the 1.8.x compatibility api does not need
authentication (in contrast to influxdb 2.x)
Thomas Lamprecht [Tue, 12 Jan 2021 12:08:02 +0000 (13:08 +0100)]
ui: qemu/audio: submitValue is default true for combobox
this was previously a display field, where submitValue defaults to
false, so we required to enable it explicitly. As it changed to a
combo box we can drop that.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Dominic Jäger [Thu, 7 Jan 2021 10:04:38 +0000 (11:04 +0100)]
ui: add netdevice: fix #3203: Use OS default model
In the VM create wizard we automatically set e1000 for Windows and virtio for
Linux. We should also do this when adding a network device in the hardware
view.
OSDefaults.generic.networkCard (=e1000) is always available. Hence, leave this
as default value for the field and then try to get the ostype via API and
overwrite the default e1000.
Fabian Ebner [Mon, 21 Dec 2020 13:48:18 +0000 (14:48 +0100)]
vzdump: fix error format for errors coming from storage_info
Errors from storage_info() are newline-terminated, because perl would append
the line number otherwise. Chomp those errors, because sendmail() relies
on the presence of a newline to decide if it's multiple problems or only one.
Fabian Ebner [Mon, 21 Dec 2020 13:48:16 +0000 (14:48 +0100)]
vzdump: defaults: convert to prune-backups early enough
Fixes the case where reading from /etc/vzdump.conf fails.
Also convert the options read from /etc/vzdump.conf before the loop. That
avoids showing a wrong warning when 'prune-backups' is configured in
/etc/vzdump.conf, and maxfiles isn't. Previously, because 'maxfiles' from the
schema defaults was automatically set, the call to parse_prune_backups_maxfiles
after the loop threw the warning that both options are defined.
Fabian Ebner [Fri, 4 Dec 2020 09:15:17 +0000 (10:15 +0100)]
vzdump: warn when both storage and dumpdir are defined in vzdump.conf
and prefer storage, because the storage configuration might contain more
settings. Warning is preferable over dying, because all backups would be
affected (even if they don't use the vzdump.conf parameters) and the settings
could've been compatible (i.e. dumpdir being the storage's dump dir). Previously
one of the two options would randomly be chosen in the loop in new(), because of
perl hash iteration.
the code to get the cpuset controller path lives in pve-commons PVE::CGroup.
Use that and improve the logging in case some error happens in the future.
Such an error will only be logged once per pvestatd run,
so it does not spam the log.
instead of relying on the contentTypeField (which does not need to
exists, e.g. for iscsi), explicitely write it into the panel/icon
mapping and check that
better would be if we query the backend about storage capabilities,
but such an api call does not exist yet, so this should be ok for now
Fabian Ebner [Tue, 1 Dec 2020 08:24:18 +0000 (09:24 +0100)]
test: add tests for retention parameters for vzdump's new()
To get a more complete picture, instead of mocking storage_config,
PVE::Cluster's get_config is mocked. This ensures that the prune-backups
validation and the maxfiles conversion are also called.
Dominik Csapak [Thu, 26 Nov 2020 08:19:53 +0000 (09:19 +0100)]
ui: fix usage of findRecord
findRecord does not match exactly, but only at the beginning and
case insensitive, by default. Change all calls to be case sensitive
and an exactmatch (we never want the default behaviour afaics).
Dominic Jäger [Wed, 25 Nov 2020 12:15:19 +0000 (13:15 +0100)]
ui: storage: pbsedit: Fix spelling
No e in unusable.
to loose means to free from restraint, or to make less tight or strict [1].
to lose means to fail to keep, or to miss something from one's possession [2].
So "losing" (instead of "loosing") would be bad.