Commit Graph

847 Commits

Author SHA1 Message Date
Dominik Csapak
aa157deb47 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>
2023-01-18 15:13:37 +01:00
Thomas Lamprecht
49dd139a34 bump version to 3.5.4
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-01-11 16:09:56 +01:00
Thomas Lamprecht
f6efb0d487 node network view: move add-menu generation to common helper
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-01-11 16:03:45 +01:00
Thomas Lamprecht
bcd21f899e node network view: rework finding free interface ID
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-01-11 15:18:10 +01:00
Thomas Lamprecht
13220ad1f5 node network view: code style modernization
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-01-11 15:13:33 +01:00
Thomas Lamprecht
8407542364 role selector: make slightly more wide and resizeable
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-01-11 15:09:25 +01:00
Thomas Lamprecht
7b8eff314a task viewer: modernize code style
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-01-11 14:43:33 +01:00
Thomas Lamprecht
ba4ab7663d code style: use arrow fn for some api request failure paths
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-01-11 14:42:33 +01:00
Dominik Csapak
9e12fc0203 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>
2023-01-09 14:23:38 +01:00
Christoph Heiss
c8bae5b130 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>
2023-01-05 10:16:19 +01:00
Daniel Tschlatscher
45110c1630 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>
2023-01-04 14:33:09 +01:00
Daniel Tschlatscher
8189ce639c 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>
2023-01-04 14:32:59 +01:00
Aaron Lauterer
a95dbf6dea 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>
2023-01-02 17:44:24 +01:00
Thomas Lamprecht
ddf7a65deb css: whitespace fix
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-11-28 08:34:29 +01:00
Thomas Lamprecht
0bba4fc63f bump version to 3.5.3
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-11-21 11:14:39 +01:00
Dominik Csapak
ed6721d0ff 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>
2022-11-21 10:27:50 +01:00
Dominik Csapak
d13f97d6e3 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>
2022-11-21 10:27:43 +01:00
Thomas Lamprecht
a35c612297 bump version to 3.5.2
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-11-17 08:37:29 +01:00
Matthias Heiserer
28a000898f api-viewer: show min/max for values without any other format
Signed-off-by: Matthias Heiserer <m.heiserer@proxmox.com>
2022-11-16 20:35:22 +01:00
Matthias Heiserer
7148e22691 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>
2022-11-16 20:35:22 +01:00
Matthias Heiserer
18afb0491c 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>
2022-11-16 20:35:01 +01:00
Dominik Csapak
64e7c5371b Toolkit: add override for Ext.dd.DragDropManager
to fix selection behavior for Ext.dd.DragZone.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2022-11-16 14:48:44 +01:00
Dominik Csapak
2396874180 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>
2022-11-16 14:48:44 +01:00
Thomas Lamprecht
121bbf57bf 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>
2022-11-15 15:16:43 +01:00
Wolfgang Bumiller
54fc2533c8 simplify cpuset regex
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-11-10 10:56:03 +01:00
Wolfgang Bumiller
5ef8d10da6 cpuset: test only the regex
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-11-10 10:51:56 +01:00
Daniel Bowder
9109c39202 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>
2022-11-10 09:40:00 +01:00
Aaron Lauterer
d17aa32eb4 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>
2022-11-07 14:57:16 +01:00
Thomas Lamprecht
8df4bd63d7 form: integer field: code cleanup in getSubmitData
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-11-07 14:56:49 +01:00
Alexandre Derumier
60ed17bf96 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>
2022-10-14 15:20:45 +02:00
Matthias Heiserer
34edc91701 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>
2022-10-10 10:01:16 +02:00
Stefan Sterz
eaa8d084e8 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>
2022-09-12 17:14:45 +02:00
Daniel Tschlatscher
94d84581c2 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>
2022-07-29 09:20:44 +02:00
Hannes Laimer
59551419b5 ui: DiskLisk: handle partition data from PBS backend
Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
2022-06-15 10:58:39 +02:00
Hannes Laimer
b7e91380ca ui: disks: add 'mounted' column
Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
2022-06-15 10:27:18 +02:00
Thomas Lamprecht
3e83971bca bump version to 3.5.1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-05-16 18:04:07 +02:00
Thomas Lamprecht
3271d12f24 file browser: disable item # size rendering
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-05-16 18:03:07 +02:00
Thomas Lamprecht
267c536516 edit window: comment text width/rewording
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-05-16 16:13:12 +02:00
Thomas Lamprecht
5dc3b0fa00 window: task viewer: code refactoring
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-05-16 16:13:12 +02:00
Thomas Lamprecht
53dc88d409 pxarFileTypes: fix over-eager s/text/label/
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-05-16 14:56:03 +02:00
Thomas Lamprecht
141d2ec303 bump version to 3.5.0
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-05-15 11:59:14 +02:00
Thomas Lamprecht
1fd75548ab d/control: fix build-depends-on-1-revision lintian nit
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-05-15 11:59:14 +02:00
Thomas Lamprecht
5235dbcc4d d/source: switch over to 3.0 (native) format
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-05-15 11:59:14 +02:00
Thomas Lamprecht
8812650c8b 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>
2022-05-15 10:37:44 +02:00
Thomas Lamprecht
9aa3d15708 file browser: fix comment layout
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-05-15 10:18:03 +02:00
Thomas Lamprecht
b33c1d6073 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>
2022-05-15 10:16:49 +02:00
Thomas Lamprecht
427685c6b6 file browser: unify file type schema and avoid switch-case bloat
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-05-15 10:15:57 +02:00
Stefan Sterz
614b3cd488 fix #4001: FileBrowser: add a configurable prefix to downloaded files
Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
2022-05-15 07:47:34 +02:00
Stefan Sterz
f5be46bc99 fix #4001: FileBrowser: show number of items in a directory as size
Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
2022-05-15 07:47:34 +02:00
Stefan Sterz
a3faf027a1 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>
2022-05-15 07:47:34 +02:00