]> git.proxmox.com Git - proxmox-widget-toolkit.git/log
proxmox-widget-toolkit.git
14 months agofix #4421: ui: guard setProxy against races of slow vs fast requests
Friedrich Weber [Mon, 6 Mar 2023 14:03:14 +0000 (15:03 +0100)]
fix #4421: ui: guard setProxy against races of slow vs fast requests

Some UI components use `Ext.data.Store.setProxy` to change their
associated API endpoint URL in reaction to user input. One example is
`BackupView`, which calls `setProxy` when the user switches from
listing backups on storage A to listing backups on storage B. However,
if A is slow, the UI may receive the response for A *after* the
response for B. It will then display the contents of A as if they were
the contents of B, resulting in a UI inconsistency.

The reason is that `Ext.data.Store` still processes the slow response
for A, even though it is obsolete. This patch overrides the
responsible callback of `Ext.data.Store` to only process responses
belonging to the currently active proxy object. This should rule out
similar race conditions in all components that use the `setProxy` API.
In the above example, the patch results in the response for A being
ignored.

Ignored responses are logged to the browser console.

Note that this patch only concerns components that use `setProxy` for
changing API endpoints. Other components (e.g. those using
`proxy.setURL` for the same purpose) may be open to similar race
conditions.

Link: https://lists.proxmox.com/pipermail/pve-devel/2023-March/056062.html
Signed-off-by: Friedrich Weber <f.weber@proxmox.com>
14 months agoapt: use justified flex box for empty text hint
Thomas Lamprecht [Tue, 14 Feb 2023 10:45:37 +0000 (11:45 +0100)]
apt: use justified flex box for empty text hint

avoid some overly long/nested divs

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
14 months agoui: SMART: show SMART data in correct columns
Matthias Heiserer [Mon, 13 Feb 2023 11:12:02 +0000 (12:12 +0100)]
ui: SMART: show SMART data in correct columns

Signed-off-by: Matthias Heiserer <m.heiserer@proxmox.com>
15 months agonode apt: make changelog window taller for 4:3 ratio
Thomas Lamprecht [Wed, 1 Feb 2023 11:15:36 +0000 (12:15 +0100)]
node apt: make changelog window taller for 4:3 ratio

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
15 months agonode apt: cleanup and modernize code
Thomas Lamprecht [Wed, 1 Feb 2023 11:14:22 +0000 (12:14 +0100)]
node apt: cleanup and modernize code

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
15 months agobump version to 3.5.5
Thomas Lamprecht [Tue, 31 Jan 2023 16:31:31 +0000 (17:31 +0100)]
bump version to 3.5.5

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
15 months agoform: display-edit: add safe default renderer for display field
Thomas Lamprecht [Tue, 31 Jan 2023 16:21:05 +0000 (17:21 +0100)]
form: display-edit: add safe default renderer for display field

Due to the value binding on can get interesting effects when the
displayEdit field is in write (input) mode, as then the values still
get relayed to the display field, which itself is wanted as the field
supports live-switching, but even though the display field is
disabled and hidden, the value will be still rendered and a user can
XSS themselves inserting things like:
<img src="a" onerror="alert('cookie:'+document.cookie);"></token

And even though it's harmless (your browser knows your own cookie
already), it is rather odd and simply to cheap to harden against (per
default) to not do so.

Reported-by: Marcel Fromkorth <marcel.fromkorth@8com.de>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
15 months agoapi request: add wide spread alert-error logic as smart-on option
Thomas Lamprecht [Tue, 31 Jan 2023 14:56:25 +0000 (15:56 +0100)]
api request: add wide spread alert-error logic as smart-on option

The "smartness" is mostly "enable it automatically if the caller did
not specify an explicit override and there's neither a failure nor
callback function define", but that should cover most cases.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
15 months agoutils: always html-encode response message
Thomas Lamprecht [Tue, 31 Jan 2023 14:41:39 +0000 (15:41 +0100)]
utils: always html-encode response message

while this is something that only the user that made the request will
see, and for most people the possibility of "hacking" themselves is
rather redundant, it is still not nice to have this possible in
general; as even if it's highly unlikely that there ever can be an
error triggered to another user via API2 request handling, hardening
against it is simply to cheap to not do it.

Reported-by: Marcel Fromkorth <marcel.fromkorth@8com.de>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
15 months agoutils: code cleanup for extractRequestError
Thomas Lamprecht [Tue, 31 Jan 2023 14:34:31 +0000 (15:34 +0100)]
utils: code cleanup for extractRequestError

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
15 months agocombobox grid: avoid needing two clicks after re-selecting an item
Dominik Csapak [Fri, 27 Jan 2023 10:14:35 +0000 (11:14 +0100)]
combobox grid: avoid needing two clicks after re-selecting an item

'picker.hide()' hides the picker, but does not do everything to
properly keep track of the picker state in the combobox class.

This lead to a bug when we reselected an entry, we had to click the
picker again twice to open it again.

Use the 'collapse' method of the combobox instead, which does the
necessary book-keeping.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
15 months agoComboGrid: make height for the error configurable
Dominik Csapak [Wed, 18 Jan 2023 13:12:57 +0000 (14:12 +0100)]
ComboGrid: make height for the error configurable

by introducing a errorHeight config property. This is necessary when
the ComboGrid has e.g. a toolbar and we show the error in the grid body
only, 100 pixels is not enough then. To solve that without hardcoding
different heights, let the subclass/caller configure that

also set this when the store load fails completely (was not done until now)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
15 months agoComboGrid: use the grids view for the error message
Dominik Csapak [Wed, 18 Jan 2023 13:12:56 +0000 (14:12 +0100)]
ComboGrid: use the grids view for the error message

for most of the combogrids, this does not make a difference, but we
want to have a node selection in some of their toolbars. There
having the error over the whole grid makes it impossible to select a
different node (which might be necessary to get rid of the error), so
we show the error on the view (which is the grids content body only).

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
16 months agobump version to 3.5.4
Thomas Lamprecht [Wed, 11 Jan 2023 15:09:56 +0000 (16:09 +0100)]
bump version to 3.5.4

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
16 months agonode network view: move add-menu generation to common helper
Thomas Lamprecht [Wed, 11 Jan 2023 15:02:49 +0000 (16:02 +0100)]
node network view: move add-menu generation to common helper

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
16 months agonode network view: rework finding free interface ID
Thomas Lamprecht [Wed, 11 Jan 2023 14:18:10 +0000 (15:18 +0100)]
node network view: rework finding free interface ID

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
16 months agonode network view: code style modernization
Thomas Lamprecht [Wed, 11 Jan 2023 14:13:33 +0000 (15:13 +0100)]
node network view: code style modernization

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
16 months agorole selector: make slightly more wide and resizeable
Thomas Lamprecht [Wed, 11 Jan 2023 14:09:25 +0000 (15:09 +0100)]
role selector: make slightly more wide and resizeable

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
16 months agotask viewer: modernize code style
Thomas Lamprecht [Wed, 11 Jan 2023 13:43:33 +0000 (14:43 +0100)]
task viewer: modernize code style

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
16 months agocode style: use arrow fn for some api request failure paths
Thomas Lamprecht [Wed, 11 Jan 2023 13:42:33 +0000 (14:42 +0100)]
code style: use arrow fn for some api request failure paths

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
16 months agoprivilege role selector: fix renderer for Proxmox VE
Dominik Csapak [Fri, 22 Jul 2022 07:35:24 +0000 (09:35 +0200)]
privilege role selector: fix renderer for Proxmox VE

In PBS we get an array here, so the renderer is fine, but in pve it's
just a long string, so add a space after commas to achieve the same
effect.

Without this, the second column is not visible in pve because of an
error in the renderer (no 'join' function on a string)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
 [ T: squash in code-reduction to make it a one-liner again ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
16 months agonode/ServiceView: Show unit-state column in PBS too
Christoph Heiss [Thu, 22 Dec 2022 12:05:50 +0000 (13:05 +0100)]
node/ServiceView: Show unit-state column in PBS too

The PBS api now reports `unit-state` for services as well, thus enable
the column for it.

Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
16 months agoadd task log download button in TaskViewer
Daniel Tschlatscher [Wed, 4 Jan 2023 12:56:35 +0000 (13:56 +0100)]
add task log download button in TaskViewer

Adds a download button in the TaskViewer. Uses the newly created
downloadAsFile() method in the Utils class.

Signed-off-by: Daniel Tschlatscher <d.tschlatscher@proxmox.com>
Tested-by: Stefan Sterz <s.sterz@proxmox.com>
Reviewed-by: Stefan Sterz <s.sterz@proxmox.com>
16 months agoSource file download in new Utils function
Daniel Tschlatscher [Wed, 4 Jan 2023 12:56:34 +0000 (13:56 +0100)]
Source file download in new Utils function

Adds a function for downloading a file from a remote URL in the Utils
class and uses it to revise one similar usage in FileBrowser.js

Signed-off-by: Daniel Tschlatscher <d.tschlatscher@proxmox.com>
Tested-by: Stefan Sterz <s.sterz@proxmox.com>
Reviewed-by: Stefan Sterz <s.sterz@proxmox.com>
16 months agoparameter and return grid: allow text selection
Aaron Lauterer [Mon, 2 Jan 2023 09:21:23 +0000 (10:21 +0100)]
parameter and return grid: allow text selection

Making it easier for people to copy & paste parameter and retrun value
names.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
17 months agocss: whitespace fix
Thomas Lamprecht [Mon, 28 Nov 2022 07:34:29 +0000 (08:34 +0100)]
css: whitespace fix

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
17 months agobump version to 3.5.3
Thomas Lamprecht [Mon, 21 Nov 2022 10:14:39 +0000 (11:14 +0100)]
bump version to 3.5.3

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
17 months agolog, journal view: fix access to `me` after destroying
Dominik Csapak [Mon, 21 Nov 2022 07:53:42 +0000 (08:53 +0100)]
log, journal view: fix access to `me` after destroying

it can happen that the view is destroyed during an api call, so we
should check if it's destroyed as the first thing in the callback

if the view is destroyed, there is nothing we can do here, so simply
return

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
17 months agocss: don't make full tags inline-block in the tree
Dominik Csapak [Mon, 21 Nov 2022 07:53:41 +0000 (08:53 +0100)]
css: don't make full tags inline-block in the tree

when showing full tags in the tree as inline-block, the height is
increased, leading to unwanted 'wobble' when tags are added/removed

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
17 months agobump version to 3.5.2
Thomas Lamprecht [Thu, 17 Nov 2022 07:37:29 +0000 (08:37 +0100)]
bump version to 3.5.2

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
17 months agoapi-viewer: show min/max for values without any other format
Matthias Heiserer [Wed, 12 Oct 2022 13:23:32 +0000 (15:23 +0200)]
api-viewer: show min/max for values without any other format

Signed-off-by: Matthias Heiserer <m.heiserer@proxmox.com>
17 months agofix #4271: api-viewer: display nested formats instead of [object Object]
Matthias Heiserer [Wed, 12 Oct 2022 13:23:31 +0000 (15:23 +0200)]
fix #4271: api-viewer: display nested formats instead of [object Object]

I tried to keep the format as close to the HTML docs as possible, but
there are a few discrepancies between HTML docs and how this patch
displays parameters, instead of:
- <enum>,the enum variants are displayed. [1]
- <0|1>, <boolean> is displayed.

[1] The HTML docs explain parameters after the initial format string,
which the GUI doesn't (and there's no space for that). Showing the
variants inline is the easiest way to not loose information here.

Signed-off-by: Matthias Heiserer <m.heiserer@proxmox.com>
17 months agoRDD: don't display power-of-two suffix 'i' for values without unit suffix
Matthias Heiserer [Mon, 10 Oct 2022 09:55:07 +0000 (11:55 +0200)]
RDD: don't display power-of-two suffix 'i' for values without unit suffix

So instead of showing "0 i" (meaning e.g. 0 Gi), just display "0".

Signed-off-by: Matthias Heiserer <m.heiserer@proxmox.com>
17 months agoToolkit: add override for Ext.dd.DragDropManager
Dominik Csapak [Tue, 15 Nov 2022 13:02:35 +0000 (14:02 +0100)]
Toolkit: add override for Ext.dd.DragDropManager

to fix selection behavior for Ext.dd.DragZone.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
17 months agoadd tag related helpers
Dominik Csapak [Tue, 15 Nov 2022 13:02:34 +0000 (14:02 +0100)]
add tag related helpers

helpers to
* generate a color from a string consistently
* generate a html tag for a tag
* related css classes

contrast is calculated according to SAPC draft:
https://github.com/Myndex/SAPC-APCA

which is likely to become a w3c guideline in the future and seems
to be a better algorithm for this

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
17 months agoinput panel: add onSetValues hook
Thomas Lamprecht [Tue, 15 Nov 2022 14:16:39 +0000 (15:16 +0100)]
input panel: add onSetValues hook

As counter-part to `onGetValue`, which is for form assembly, add the
`onSetValues` helper that allows to hook into setting the values on
the fields, for example if one needs to transform a `disabled` to
`enable`.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
18 months agosimplify cpuset regex
Wolfgang Bumiller [Thu, 10 Nov 2022 09:56:03 +0000 (10:56 +0100)]
simplify cpuset regex

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
18 months agocpuset: test only the regex
Wolfgang Bumiller [Thu, 10 Nov 2022 09:51:56 +0000 (10:51 +0100)]
cpuset: test only the regex

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
18 months agofix #3593: add CpuSet type to js
Daniel Bowder [Fri, 1 Jul 2022 00:09:47 +0000 (17:09 -0700)]
fix #3593: add CpuSet type to js

Regex parses a cpuset via 2 matches. Find number(s) or range(s) folowed
by a comma, then, find a single number or a single range not followed
by a comma. E.g., 0-1,4-5,6,7,10,11,14-15
CpuSet function first checks regex, then ensures left num <= right num

Signed-off-by: Daniel Bowder <daniel@bowdernet.com>
18 months agoTaskProgress: show text instead of percentage
Aaron Lauterer [Fri, 22 Jul 2022 12:15:24 +0000 (14:15 +0200)]
TaskProgress: show text instead of percentage

The text needs to be defined in the wait() call as otherwise the
Ext.Progressbar will show a percentage that is not correct anyway but
just reflects where the animated progress bar itself is.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
18 months agoform: integer field: code cleanup in getSubmitData
Thomas Lamprecht [Mon, 7 Nov 2022 13:56:49 +0000 (14:56 +0100)]
form: integer field: code cleanup in getSubmitData

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
18 months agofix #2703: networkedit: limit custom interface name field to 15 characters.
Alexandre Derumier [Fri, 14 Oct 2022 07:55:50 +0000 (09:55 +0200)]
fix #2703: networkedit: limit custom interface name field to 15 characters.

Linux kernel don't allow interfaces name with more than 15 characters

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
19 months agoCSS: import action column fix from pbs, pmg
Matthias Heiserer [Fri, 7 Oct 2022 11:18:56 +0000 (13:18 +0200)]
CSS: import action column fix from pbs, pmg

So it is in one location and available to pve as well.

Signed-off-by: Matthias Heiserer <m.heiserer@proxmox.com>
20 months agofix: toolkit: make email regex pattern match pve-common
Stefan Sterz [Wed, 7 Sep 2022 09:37:40 +0000 (11:37 +0200)]
fix: toolkit: make email regex pattern match pve-common

`proxmoxMail` used its own regex pattern to validate emails. that
meant certain email addresses were rejected by the front-end that
were accepted by the backend that uses the functionality from
`pve-common`. examples include the following:

- "user@host.test-tld"
- "user-@host.testtld"
- "user@host"

reported on the forum: https://forum.proxmox.com/threads/gui-bugulance-using-the-user-add-gui-interface.114743/

Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
21 months agofix: gui: up/down arrow keys increment/decrement twice in Number field
Daniel Tschlatscher [Mon, 25 Jul 2022 13:40:07 +0000 (15:40 +0200)]
fix: gui: up/down arrow keys increment/decrement twice in Number field

When the up or down arrow key on the keyboard was pressed while a
number text field (or any one descending from Ext.form.field.Spinner)
was selected, the up and down callbacks for that text fields KeyNav
were called twice. Therefore, the value in the text field would always
incorrectly increment/decrement by step * 2.

The problem was an overwrite for the onRender() method of the Spinner
class, which caused the callbacks for pressing an arrow key to be
registered for a second time. Simply not doing that in the overwritten
onRender() method fixes the problem.

The redundant declarations for spinUpEl and spinDownEl were removed as
well. Additionally, the 'mousewheel' event handler, registered in the
overwritten (but still executed) parent function, is unregistered now,
as it could lead to unintended side effects in browsers which still
implement this event.

Signed-off-by: Daniel Tschlatscher <d.tschlatscher@proxmox.com>
22 months agoui: DiskLisk: handle partition data from PBS backend
Hannes Laimer [Wed, 8 Jun 2022 08:51:54 +0000 (08:51 +0000)]
ui: DiskLisk: handle partition data from PBS backend

Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
22 months agoui: disks: add 'mounted' column
Hannes Laimer [Wed, 8 Jun 2022 07:10:00 +0000 (07:10 +0000)]
ui: disks: add 'mounted' column

Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
23 months agobump version to 3.5.1
Thomas Lamprecht [Mon, 16 May 2022 16:04:07 +0000 (18:04 +0200)]
bump version to 3.5.1

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
23 months agofile browser: disable item # size rendering
Thomas Lamprecht [Mon, 16 May 2022 16:03:07 +0000 (18:03 +0200)]
file browser: disable item # size rendering

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
23 months agoedit window: comment text width/rewording
Thomas Lamprecht [Mon, 16 May 2022 14:13:07 +0000 (16:13 +0200)]
edit window: comment text width/rewording

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
23 months agowindow: task viewer: code refactoring
Thomas Lamprecht [Mon, 16 May 2022 14:12:45 +0000 (16:12 +0200)]
window: task viewer: code refactoring

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
23 months agopxarFileTypes: fix over-eager s/text/label/
Thomas Lamprecht [Mon, 16 May 2022 12:56:03 +0000 (14:56 +0200)]
pxarFileTypes: fix over-eager s/text/label/

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
23 months agobump version to 3.5.0
Thomas Lamprecht [Sun, 15 May 2022 09:46:59 +0000 (11:46 +0200)]
bump version to 3.5.0

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
23 months agod/control: fix build-depends-on-1-revision lintian nit
Thomas Lamprecht [Sun, 15 May 2022 09:59:08 +0000 (11:59 +0200)]
d/control: fix build-depends-on-1-revision lintian nit

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
23 months agod/source: switch over to 3.0 (native) format
Thomas Lamprecht [Sun, 15 May 2022 09:51:33 +0000 (11:51 +0200)]
d/source: switch over to 3.0 (native) format

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
23 months agofile browser: only disable button if not downloadable and add hint in tooltip
Thomas Lamprecht [Sun, 15 May 2022 08:37:43 +0000 (10:37 +0200)]
file browser: only disable button if not downloadable and add hint in tooltip

To avoid to much layout jumping if the whole button disappears
(changes height of footer bar too), rather explain to the user the
why and what they can do instead.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
23 months agofile browser: fix comment layout
Thomas Lamprecht [Sun, 15 May 2022 08:18:03 +0000 (10:18 +0200)]
file browser: fix comment layout

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
23 months agofile browser: align size column to end/right
Thomas Lamprecht [Sun, 15 May 2022 08:16:46 +0000 (10:16 +0200)]
file browser: align size column to end/right

much easier to compare the sizes once lined up

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
23 months agofile browser: unify file type schema and avoid switch-case bloat
Thomas Lamprecht [Sun, 15 May 2022 08:15:57 +0000 (10:15 +0200)]
file browser: unify file type schema and avoid switch-case bloat

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
23 months agofix #4001: FileBrowser: add a configurable prefix to downloaded files
Stefan Sterz [Thu, 5 May 2022 13:52:50 +0000 (15:52 +0200)]
fix #4001: FileBrowser: add a configurable prefix to downloaded files

Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
23 months agofix #4001: FileBrowser: show number of items in a directory as size
Stefan Sterz [Thu, 5 May 2022 13:52:49 +0000 (15:52 +0200)]
fix #4001: FileBrowser: show number of items in a directory as size

Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
23 months agofix #4001: FileBrowser: add menu to button and selected entry label
Stefan Sterz [Thu, 5 May 2022 13:52:48 +0000 (15:52 +0200)]
fix #4001: FileBrowser: add menu to button and selected entry label

this commit adds a label showing the currently selected entry in the
file browser and merges the "Download .tar.zst" and "Download .zip"
button into one menu button.

Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
2 years agoui: acl role selector: make wider and wrap priv column
Thomas Lamprecht [Sat, 14 May 2022 12:07:06 +0000 (14:07 +0200)]
ui: acl role selector: make wider and wrap priv column

as UX was pretty poort, one could only see one and a half privileges
of the role, the rest overflowed and was hidden. While the column
could be resized, doing so would make the role name column shrink
automatically, and it really shouldn't be required in the first
place.

This is a very important selector and all privs of a role must be
visible when opening without any manual user interaction required.

So increase the width to 500px, make the priv colum take more
relative space and enable cellWrap to avoid hidden overflow.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agosafe destroy: indentation fix
Thomas Lamprecht [Wed, 11 May 2022 13:40:02 +0000 (15:40 +0200)]
safe destroy: indentation fix

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agowindow/FileBrowser: try reload again when getting a 503 error
Dominik Csapak [Tue, 26 Apr 2022 10:14:01 +0000 (12:14 +0200)]
window/FileBrowser: try reload again when getting a 503 error

for the file restore, we return a 503 error when we were not finished
mounting a disk in the restore vm, so ignore that error and try again
(up to 10 times) so a file listing now has a "real" timeout of
up to 300 seconds (30s pveproxy timeout * 10) instead of only 30,
which should be enough for most situations.

we also increase the proxy timeout to 60 seconds, since if one has many
disks, all of them will try to load at the same time, but the browser
has a maximum request limit and will stall+queue the remaining ones. so
those will not run into the extjs timeout when we increase it here.

for older backends without the new 503 returning feature, the calls
will still run into a pveproxy timeout anyway.

we also have to reimplement the 'monStoreErrors' functionality to
get a slightly different behaviour:
we disable the default extj loadMask of the treepanel and set it
ourselves. then on 503 we leave it up, and only remove it on success
or error (for non initial loads)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agobump version to 3.4-10
Thomas Lamprecht [Wed, 27 Apr 2022 16:58:26 +0000 (18:58 +0200)]
bump version to 3.4-10

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoapt repos: use new AltText button
Matthias Heiserer [Mon, 28 Mar 2022 13:07:36 +0000 (15:07 +0200)]
apt repos: use new AltText button

text is not needed with the AltText button.

Signed-off-by: Matthias Heiserer <m.heiserer@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoButtons: add AltText
Matthias Heiserer [Mon, 28 Mar 2022 13:07:34 +0000 (15:07 +0200)]
Buttons: add AltText

The same code is used once in widget toolkit and twice in PVE already,
so it makes sense to add it as a separate button.

Signed-off-by: Matthias Heiserer <m.heiserer@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoStatusView: fix usage calculation for fields without valid values
Dominik Csapak [Thu, 10 Mar 2022 14:31:37 +0000 (15:31 +0100)]
StatusView: fix usage calculation for fields without valid values

Sometimes, total can be zero (e.g. for swap when it's not used), which
leads to the usage being NaN. This led to the progressbar not being
updated for InfoWidgets, leaving a spurious '0%' as text.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agocss: add proxmox-good-row class
Fabian Ebner [Thu, 21 Apr 2022 11:26:56 +0000 (13:26 +0200)]
css: add proxmox-good-row class

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agobump version to 3.4-9
Thomas Lamprecht [Thu, 14 Apr 2022 05:57:00 +0000 (07:57 +0200)]
bump version to 3.4-9

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoedit window: small code style/nits
Thomas Lamprecht [Thu, 14 Apr 2022 05:53:45 +0000 (07:53 +0200)]
edit window: small code style/nits

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agotoolkit: refactor markdown based NotesView and NotesEdit
Stefan Sterz [Tue, 12 Apr 2022 10:34:21 +0000 (12:34 +0200)]
toolkit: refactor markdown based NotesView and NotesEdit

refactor them to make them more flexible and, thus, usable in pbs.
adds parameters for enabling the TBar, setting the help section in the
editing dialog and cleans up the code in some places

Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
2 years agotoolkit: add NotesView panel and NotesEdit window
Stefan Sterz [Tue, 12 Apr 2022 10:34:20 +0000 (12:34 +0200)]
toolkit: add NotesView panel and NotesEdit window

move them here from pve so we can maintain them across several
products

Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
[ T: also rename class/xtypes to avoid temporary breakage ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agocss: fix tab icon/text baseline
Thomas Lamprecht [Wed, 13 Apr 2022 09:09:07 +0000 (11:09 +0200)]
css: fix tab icon/text baseline

the baseline for the text was seriously off, the text had
(relatively) much more space below than above, which looks off for
buttons with an actual background

Instead of centering with margin/padding explicitly, do so with the
flex layout model.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agowindow/FileBrowser: add optional 'tar.zst' button
Dominik Csapak [Tue, 12 Apr 2022 11:04:15 +0000 (13:04 +0200)]
window/FileBrowser: add optional 'tar.zst' button

only show it when enabled in config (so that we can hide it where
that is not supported, which is in PVE right now)

also changes the text between 'Download' and 'Download .zip' depending
if the selected entry is a directory or not

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agobump version to 3.4-8
Thomas Lamprecht [Tue, 12 Apr 2022 14:46:15 +0000 (16:46 +0200)]
bump version to 3.4-8

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agodns: increase api intervall from 1s to 10s
Thomas Lamprecht [Tue, 12 Apr 2022 14:40:35 +0000 (16:40 +0200)]
dns: increase api intervall from 1s to 10s

this is not something that changes very often, so avoid to many api
calls.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agodns/time: small refactorings, style
Thomas Lamprecht [Tue, 12 Apr 2022 14:40:12 +0000 (16:40 +0200)]
dns/time: small refactorings, style

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoobject grid: call rendere with our scope
Thomas Lamprecht [Tue, 12 Apr 2022 14:36:50 +0000 (16:36 +0200)]
object grid: call rendere with our scope

having window as this scope has zero benefits and while one could
already try to get the local scope via some Ext.ComponentQuery query
its just nicer to have it easily available.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoicons: switch cpu/ram bitmaps to svg
Thomas Lamprecht [Fri, 1 Apr 2022 08:35:50 +0000 (10:35 +0200)]
icons: switch cpu/ram bitmaps to svg

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoform: combo grid: fix selection after filtering
Dominik Csapak [Mon, 28 Mar 2022 13:53:45 +0000 (15:53 +0200)]
form: combo grid: fix selection after filtering

firing 'refresh' in 'clearLocalFilter' was wrong, since that triggers
too often, for example when selecting an entry (since the field lost
focus). This lead to the picker refreshing and not registering the
click and thus not selecting the desired entry.

Instead refresh the view when we really need it: when the picker is shown.
The filter is already gone, but the picker grid does not know this yet,
so we fire the event then.

Fixes: 7e47328 ("Combogrid: clear filter on blur")
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agonode: task filter: code style
Thomas Lamprecht [Tue, 29 Mar 2022 15:47:35 +0000 (17:47 +0200)]
node: task filter: code style

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agonode/Tasks: don't count 'preFilters' as normal filters
Dominik Csapak [Tue, 29 Mar 2022 14:04:10 +0000 (16:04 +0200)]
node/Tasks: don't count 'preFilters' as normal filters

they can not be removed nor are they visible, so don't count them.

When having a prefilter, we now don't show anymore that there is an
active filter, and don't enable the button anymore.
This is the case for vms for example (vmid is a prefilter).

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoutils: add inline comment about cookie set-for-clear
Thomas Lamprecht [Fri, 18 Mar 2022 14:58:53 +0000 (15:58 +0100)]
utils: add inline comment about cookie set-for-clear

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoutils: clear cookies with secure flag set
Dominik Csapak [Fri, 18 Mar 2022 10:00:11 +0000 (11:00 +0100)]
utils: clear cookies with secure flag set

otherwise firefox complains with a deprecation warning that the secure-flag
is not set but SameSite to 'None'. Since we cannot know how firefox will
behave once that behaviour is no longer supported, add the secure flag
now.

Note: ExtJS also clears by setting the cookie with an empty value,
there's no browser supported clear api.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoadd EOL notice component
Thomas Lamprecht [Tue, 15 Mar 2022 16:05:16 +0000 (17:05 +0100)]
add EOL notice component

to avoid copying the same thing to three different product's GUIs
this year..

cherry-picked from stable-6 as we can have this in the master branch
full time

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoform: combo grid: fix whitespace/indendation and refactor slightly
Thomas Lamprecht [Wed, 16 Mar 2022 06:46:10 +0000 (07:46 +0100)]
form: combo grid: fix whitespace/indendation and refactor slightly

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoCombogrid: clear filter on blur
Matthias Heiserer [Wed, 9 Mar 2022 14:18:14 +0000 (15:18 +0100)]
Combogrid: clear filter on blur

Previously, deselecting and reselecting the input field
led to the previous filter still being applied, although the
input field was cleared.

Signed-off-by: Matthias Heiserer <m.heiserer@proxmox.com>
2 years agolog view: comment length fixup
Thomas Lamprecht [Fri, 4 Mar 2022 13:54:59 +0000 (14:54 +0100)]
log view: comment length fixup

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agofix #3919: log view: show first task output line correctly
Dominik Csapak [Thu, 3 Mar 2022 14:11:45 +0000 (15:11 +0100)]
fix #3919: log view: show first task output line correctly

if a task did not produce output yet, we always get a single line
with "no output". our heuristic in the gui counts the total lines +
the current  position. so to update the first output correctly, we
have to update every time in case we only have one line.

Otherwise, we only update on the second line, which is bad
in case the only line we ever get is the result.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agotoolkit: add comment regarding upstream changes
Thomas Lamprecht [Wed, 23 Feb 2022 12:02:59 +0000 (13:02 +0100)]
toolkit: add comment regarding upstream changes

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agobump version to 3.4-7
Thomas Lamprecht [Wed, 23 Feb 2022 11:12:16 +0000 (12:12 +0100)]
bump version to 3.4-7

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agofix drag&drop for pointerType 'pen'
Dominik Csapak [Wed, 23 Feb 2022 11:05:06 +0000 (12:05 +0100)]
fix drag&drop for pointerType 'pen'

some devices (e.g. vms via novnc, and some laptops) get the pointerType
'pen' under chromium.

the DragZone handler tries to ignore touch input for that by
checking for "=== 'mouse'" which does not include 'pen'
so override that to handle it when the pointerType !== 'touch'

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoedit window: make response handling code path more robust
Thomas Lamprecht [Wed, 16 Feb 2022 06:57:54 +0000 (07:57 +0100)]
edit window: make response handling code path more robust

A 2xx error code doesn't necessarily mean we got data we can
dereference

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agotfa view: fix WebAuthn casing
Thomas Lamprecht [Wed, 16 Feb 2022 06:57:43 +0000 (07:57 +0100)]
tfa view: fix WebAuthn casing

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agobump version to 3.4-6
Thomas Lamprecht [Mon, 14 Feb 2022 10:34:45 +0000 (11:34 +0100)]
bump version to 3.4-6

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agotree-wide typo fixes
Thomas Lamprecht [Mon, 14 Feb 2022 10:23:43 +0000 (11:23 +0100)]
tree-wide typo fixes

found with `codespell`, mostly comments but also a fn parameter and
an error in an exception message

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agod/changelog: fix typos in historic entries
Thomas Lamprecht [Mon, 14 Feb 2022 10:22:38 +0000 (11:22 +0100)]
d/changelog: fix typos in historic entries

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoedit: fix comment typos
Matthias Heiserer [Mon, 14 Feb 2022 10:02:34 +0000 (11:02 +0100)]
edit: fix comment typos

Signed-off-by: Matthias Heiserer <m.heiserer@proxmox.com>