Commit Graph

539 Commits

Author SHA1 Message Date
Lukas Wagner
d6b65a89ce auth ui: add LDAP sync UI
Taken and adapted from PVE.
Changes:
  - Removed fields that are irrelevant for PBS for now (PBS has no
    groups yet). If PVE is adapted to use the implementation from the
    widget toolkit, the fields can simply be readded and somehow
    feature-gated so that the fields are only visible/editable on PVE

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2023-03-17 16:41:59 +01:00
Lukas Wagner
aa5cbdbb32 auth ui: add LDAP realm edit panel
The panel was mostly taken from from PVE, but altered slightly:
  - bind-dn and bind-password are displayed under "General"
    and not under "Sync". For some servers, we need to be bound
    to lookup a user's domain from a given user id attribute.
    In PVE, the bind-dn and bind-password fields are under
    "Sync", which is a bit confusing if a user is not interested
    in automatic user syncing.

  - There is a 'anonymous search' checkbox. The value is not persisted
    in the configuration, it merely enables/disables the
    bind-dn and bind-password fiels to make their intent a bit more
    clear.

  - Instead of a 'secure' checkbox, a combobox for TLS mode is shown.
    This way users can select between LDAP, STARTLS and LDAPS.
    In PVE, the 'secure' config parameter is deprecated anyway, so
    I took the opportunity to replace it with the 'mode' parameter
    as described.

  - Parameters now consistently use kebab-case for naming. If
    PVE is modified to use the same panel, some sort of adapter
    will be needed.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2023-03-17 16:41:59 +01:00
Lukas Wagner
64f65c027d repo view: replace non-clickable checkbox with icons
From a usability view, having a checkbox that is not clickable is pretty
misleading, especially if the visual style is exactly the same as in
other places in the UI where the checkbox is functional.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2023-03-17 11:27:38 +01:00
Dominik Csapak
a1177796f9 auth-realm selector: add custom store filters for callers
so that a user can filter the underlying store, e.g. for type

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-03-14 15:25:27 +01:00
Stefan Sterz
3501ca3fc9 dark-theme: increase contrast on check-boxes
by adding a bit of brightness to the icons they stand out a bit more,
especially when selected but not active (grey check-mark)

Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
2023-03-14 15:13:35 +01:00
Stefan Sterz
a017567bd8 utils: move to using the auto theme per default
make the new default theme the "auto" theme that uses media queries to
detect a users preferred theme.

Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
2023-03-14 15:13:35 +01:00
Stefan Sterz
e8b405f770 dark-theme: visually remove the border around the pve resource tree
by setting the color of the border of the resource tree to the panel
background color, it doesn't appear visually anymore while keeping
alignments in place.

Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
2023-03-11 17:50:32 +01:00
Stefan Sterz
0cdf266659 dark-theme: remove thicker borders around content
previously the dark theme used thicker borders in certain places to
space out the content a bit more. this removes them again to make the
appearance more consistent with "crisp".

Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
2023-03-11 17:50:32 +01:00
Stefan Sterz
2a5b7cd2ff dark-theme: re-work buttons colors to appear dimmer
this dims buttons further by removing pure white text color and
adjusting backgrounds and border accordingly. it also keeps the help
buttons brighter than other buttons to draw (possibly confused) users
to them.

Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
2023-03-11 17:50:32 +01:00
Stefan Sterz
e48bb85042 dark-theme: make windows stand out more against the background mask
makes the background mask darker so windows stand out a bit more

Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
2023-03-11 17:50:32 +01:00
Stefan Sterz
928df9ff32 dark-theme: fix summary row background
previously an "!important" was missing from the `background-color`
property. this meant that the background color wasn't properly
overridden. the "!important" is necessary as it is also used in the
light theme.

Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
2023-03-11 17:50:32 +01:00
Dominik Csapak
b2471e89d0 input panel: improve validity change check for advanced fields
instead of only checking the validity of the advanced items when the
form validity changed as a whole, add a validity change listener to
each field in the advanced section.

This improves the behaviour such that every time an advanced field
gets invalid the items are show, not only when the form was valid
before.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Tested-By: Aaron Lauterer <a.lauterer@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-03-11 17:32:15 +01:00
Alexandre Derumier
0c50257362 fix #4585 : toolkit: configid type: add missing "-" character support
JsonSchema is already ok:
$CONFIGID_RE = qr/[a-z][a-z0-9_-]+/i;

This is blocking creation of snapshot name with "-" in gui.
(works fine command line)

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2023-03-11 17:29:16 +01:00
Stefan Sterz
8d32419234 dark-theme: add support for the pmg quarantine theme toggle
allows using the theme toggle in the pmg quarantine properly. adds a
filter over the iframes in the quarantine to make them appear properly
in a dark environment.

Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
2023-03-08 17:49:20 +01:00
Daniel Tschlatscher
15fddc20d1 util/window/form: add a theme selector
add a widget that implements a theme selector and sets a cookie to
load the appropriate theme.

Co-authored-by: Daniel Tschlatscher <d.tschlatscher@proxmox.com>
Co-authored-by: Stefan Sterz <s.sterz@proxmox.com>
Signed-off-by: Daniel Tschlatscher <d.tschlatscher@proxmox.com>
Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
2023-03-08 17:49:20 +01:00
Stefan Sterz
c5559f82ea rrd chart: add support for the dark theme and dynamic theme switching
by integrating the theme switching logic into the chart panel itself,
themes can be switched more responsively based on css variables.

Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
2023-03-08 17:49:20 +01:00
Stefan Sterz
f111efa4fd gauge widget: add support for a dark theme and dynamic theme switching
the gauges in the data center overview should use a dark style if the
relevant css variables are set. this also makes it possible to switch
the colors dynamically by adding an event listener

Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
2023-03-08 17:49:20 +01:00
Stefan Sterz
fbe9ee7210 subscription/summary/backup: stop setting the background color
setting the background color in js code adds that property as a style
attribute to the element. that makes it hard to alter later via css
and makes it hard to dynamically change the color e.g., if we want to
add different themes. the background color for these elements are
white already anyway, so just remove them here.

Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
2023-03-08 17:49:19 +01:00
Daniel Tschlatscher
6bf5e1256e dark-theme: add initial version of the proxmox-dark theme
adds an initial version of a dark theme for all proxmox products. the
theme works by simply loading an additional css file that adjust the
colors of the original theme "crisp" to be more suitable for a dark
theme.

the theme itself is written in scss, so we need to add sassc as a
build dependency. while sassc is deprecated, it is still maintained in
the debian repositories and, thus, needs no additional packaging on
our end.

this version adds the following on-top of Daniel Tschlatscher's
original draft:

* removes checked-in build artifacts and other stuff that shouldn't be
  tracked
* code clean-up and removal of redundant code
* refactors:
    * icon styling
    * color handling for charts (moved to css variables)
    * color variables, consolidates them and makes the "functional"
    * color values, improves contrast and makes the theme appear more
      consistent
    * using the "theme-" prefix
* adds:
    * markdown note styles
    * combo-box trigger styles
    * even more icon styles (e.g., template icons, check boxes etc.)
    * loading spinners styles
    * number field up and down arrow styles
    * an additional auto theme that switches between light and dark
      theme dynamically
    * widget toolkit hints
    * ceph install mask
    * grid group headers
    * color to toggled buttons
    * date picker styles
    * drag and drop proxy styles
* fixes:
    * contrast on control elements for "scrollable" sidebars
    * make the general appearance closer to the light theme ("crisp")
    * buttons (when hovered, toggled etc)
    * background masking (e.g., when showing the log-in form)
    * grid header separator (adds an outline)
    * separator lines in some menus
    * makes the custom unknown icon more discernible
    * makes headers more readable
    * color adjustments to several components for consistency
    * reduces brightness of dividers in toolbars
    * border color on chart legend elements
    * removes a black border from docked toolbars (e.g., tag edit)
    * dims the "invalid" color to appear less aggressive
    * add hover effects in grids and make them consistent with "crisp"
    * summary rows
    * selected and hovered elements in boundlists
    * row numberers in grids
    * contrast of links in hints
    * ceph overview border colors (e.g., OSD in/out/up/down grid)
    * bottom splitter contrast in certain situations
    * tag visibility
    * pbs compatibility (help buttons stylings, icons, tabs)
    * pmg compatibility:
         * remove border around the spanning element in the header
         * style spam score grid
         * style tracking center rows
         * add appropriate colors to buttons in the quarantine
         * style mail-info element in the quarantine

Co-authored-by: Daniel Tschlatscher <d.tschlatscher@proxmox.com>
Co-authored-by: Stefan Sterz <s.sterz@proxmox.com>
Signed-off-by: Daniel Tschlatscher <d.tschlatscher@proxmox.com>
Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
2023-03-08 17:49:19 +01:00
Matthias Heiserer
7e66b73ce4 ui: SMART: fix eslint error / show correct value
Signed-off-by: Matthias Heiserer <m.heiserer@proxmox.com>
2023-03-08 17:49:19 +01:00
Friedrich Weber
51083ee54a 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>
2023-03-08 07:42:11 +01:00
Thomas Lamprecht
c16785f66a apt: use justified flex box for empty text hint
avoid some overly long/nested divs

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-02-14 11:45:41 +01:00
Matthias Heiserer
aacb9ea12a ui: SMART: show SMART data in correct columns
Signed-off-by: Matthias Heiserer <m.heiserer@proxmox.com>
2023-02-14 10:48:40 +01:00
Thomas Lamprecht
f372d3c087 node apt: make changelog window taller for 4:3 ratio
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-02-01 12:15:36 +01:00
Thomas Lamprecht
261f558105 node apt: cleanup and modernize code
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-02-01 12:14:22 +01:00
Thomas Lamprecht
6b70ca845d 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>
2023-01-31 17:21:13 +01:00
Thomas Lamprecht
319d450bec 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>
2023-01-31 15:56:27 +01:00
Thomas Lamprecht
cf93d1da50 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>
2023-01-31 15:41:42 +01:00
Thomas Lamprecht
d53046d66b utils: code cleanup for extractRequestError
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-01-31 15:34:31 +01:00
Dominik Csapak
4a819c891e 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>
2023-01-31 10:34:47 +01:00
Dominik Csapak
c071b0c302 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>
2023-01-18 15:13:37 +01:00
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
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
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
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
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
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
Thomas Lamprecht
49275c6726 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>
2022-05-14 14:07:08 +02:00
Thomas Lamprecht
66cc6d92b8 safe destroy: indentation fix
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-05-11 15:40:08 +02:00
Dominik Csapak
a69f23580e 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>
2022-04-28 15:18:59 +02:00
Matthias Heiserer
8832b5909f 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>
2022-04-27 14:29:54 +02:00
Matthias Heiserer
463177281c 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>
2022-04-27 14:29:54 +02:00
Dominik Csapak
8315a64201 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>
2022-04-26 08:28:28 +02:00
Fabian Ebner
5c7c81d39b css: add proxmox-good-row class
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2022-04-23 10:32:25 +02:00
Thomas Lamprecht
3637defc27 edit window: small code style/nits
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-04-14 07:53:45 +02:00
Stefan Sterz
11d4f4de44 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>
2022-04-13 11:28:07 +02:00
Stefan Sterz
e914453239 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>
2022-04-13 11:23:47 +02:00
Thomas Lamprecht
7d602ae678 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>
2022-04-13 11:18:02 +02:00
Dominik Csapak
3b974606a6 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>
2022-04-13 10:34:51 +02:00
Thomas Lamprecht
f77ff713db 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>
2022-04-12 16:40:37 +02:00
Thomas Lamprecht
6dce03cf5a dns/time: small refactorings, style
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-04-12 16:40:12 +02:00
Thomas Lamprecht
38e653f14b 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>
2022-04-12 16:36:53 +02:00
Thomas Lamprecht
563cf87d59 icons: switch cpu/ram bitmaps to svg
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-04-01 10:35:50 +02:00
Dominik Csapak
01a79a9781 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>
2022-03-29 17:49:15 +02:00
Thomas Lamprecht
04070ce5b1 node: task filter: code style
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-03-29 17:48:13 +02:00
Dominik Csapak
64c1d6191c 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>
2022-03-29 17:42:25 +02:00
Thomas Lamprecht
96fb7eaacd utils: add inline comment about cookie set-for-clear
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-03-18 15:58:53 +01:00
Dominik Csapak
c1a3584103 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>
2022-03-18 15:56:20 +01:00
Thomas Lamprecht
9716d0def1 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>
2022-03-16 08:23:05 +01:00
Thomas Lamprecht
b33a25589c form: combo grid: fix whitespace/indendation and refactor slightly
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-03-16 07:46:10 +01:00
Matthias Heiserer
7e47328692 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>
2022-03-15 11:03:20 +01:00
Thomas Lamprecht
6971ce9d6b log view: comment length fixup
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-03-04 14:54:59 +01:00
Dominik Csapak
80ea69b416 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>
2022-03-04 14:54:21 +01:00
Thomas Lamprecht
4fecfeef70 toolkit: add comment regarding upstream changes
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-02-23 13:02:59 +01:00
Dominik Csapak
da24e83f64 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>
2022-02-23 12:14:13 +01:00
Thomas Lamprecht
4f5e2bd12b 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>
2022-02-16 07:58:27 +01:00
Thomas Lamprecht
bfc6233d92 tfa view: fix WebAuthn casing
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-02-16 07:57:43 +01:00
Thomas Lamprecht
017a637682 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>
2022-02-14 11:28:29 +01:00
Matthias Heiserer
aca2ab3cb2 edit: fix comment typos
Signed-off-by: Matthias Heiserer <m.heiserer@proxmox.com>
2022-02-14 11:21:41 +01:00
Fabian Ebner
1025802ef1 sorters: use correct property 'direction' and keep default 'ASC'
Ext.util.Sorter does not have an 'order' property, so 'order: DESC'
didn't have an effect. The default is 'ASC' and it is arguably the
preferred direction for realm anyways.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2022-02-10 13:56:33 +01:00
Matthias Heiserer
e06715d2e5 utils: render default value correctly 2022-02-10 13:08:11 +01:00
Fabian Ebner
cd7e37fa95 window: safe destroy: make note more visible
by not using a smaller font size and using the pmx-hint class. Also
don't align to the middle, as everything else is left-aligned.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2022-01-13 12:53:42 +01:00
Fabian Ebner
79580cd0b6 zfs detail: hide the pool itself in tree view
and show the overall health in the grid instead.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2022-01-13 12:50:49 +01:00
Fabian Ebner
a18a674d51 zfs detail: increase window height
If there are mirrors and log/special vdevs it just feels too small.
It also doesn't help if there are errors in the upper part taking up
space. Make it 600, which was used in PVE before.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2022-01-13 12:50:49 +01:00
Thomas Lamprecht
c4ac6d1c14 toolkit: fix noisy ext warning of feature we do not want/use
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-12-10 13:23:02 +01:00
Wolfgang Bumiller
834cc8476d improve error handling when adding webauthn entries
There are cases where we directly throw a string error
(particularly, when navigator.credentials.create() fails,
for example when trying to register the same WA device to
the same user twice), which would end up with the WA window
simply not closing before.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-12-02 19:19:31 +01:00
Thomas Lamprecht
d739e44117 tfa login: hide u2f and yubico-otp if not available
Else it may be to confusing for users to see TFA types they cannot
configure anymore (or never could, in the PBS/PMG case).

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-11-29 17:19:58 +01:00
Thomas Lamprecht
1eb5c21d91 log viewer: add heuristic for triggering a new limit load early
Less latency for the user

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-11-24 18:26:24 +01:00
Thomas Lamprecht
4e95d1e906 log viewer: add heuristic for scroll-direction dependent ratio distribution
if the user scrolls down make 2/3 of the buffer load the downward
(newer) buffer and only 1/3 the upward (older), and vice versa, if
the user scrolls up load 2/3 of the older messages vs. 1/3 of newer
ones.

If the user scrolls around frantically we're roughly as good as
previously and in all other cases we're better now.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-11-24 18:23:37 +01:00
Thomas Lamprecht
a16b036be0 log view: code cleanup and refactoring
save some lines while trying to keep or even improve readability a
bit

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-11-24 11:42:09 +01:00
Dominik Csapak
2f47411867 ui: logpanel: catch up to very fast task logs with api calls
by updating the start to 'total-limit' if we follow the task log live.
to do that, we decouple the 'scroll' event from updating the 'start'
parameter and call that directly after we scrolled down.

to not trigger the scroll event multiple times, suspend the scroll event
while doing that.

while we're touching those lines, remove the 'setTimeout' workaround
for touchscreens, since it seems to work fine since extjs 7.0

this also fixes the issue that the scroll event is not called sometimes

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-11-23 14:47:20 +01:00
Dominik Csapak
b5ff20a615 ui: logpanel: fix glitching fast task logs
if the total we got was bigger than the last line number, we appended
empty lines at the end of the panel, to which we scrolled

the only time we need to do that is when we do not follow the task log
'live' but when we are elsewhere (to keep the scroll position/size)

so give the lines directly to 'updateView' and let it decide
if we append the empty lines at the end

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-11-23 14:47:20 +01:00
Dominik Csapak
aeecc06ce1 ui: journalview: fix wrong first load with timespan
calling updateParams here lead to making an api call with the default
timespan (last 3 days) on pbs/pmg when going to the 'administration'
panel, even though it would never be shown since on tab activate we would
show the 'live mode' which does not use the timespan

on pve this did not happen since the journalview is on its own page and
the change to livemode triggered too fast..

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-11-23 12:58:03 +01:00
Thomas Lamprecht
3ccdce4055 utils: format_duration_human: calculate years too
Add years and skip showing minute scale once we got over a year,
that's just not relevant anymore at that scale..

Months are just not an ideal thing to show, as they have different
lengths too (leap years have similar issue, but they differ 0.27%
from a normal year, while shortest to longest month is 10.7%
difference!)

Weeks could be done though, they're fixed at 7 days, but for now I
want to avoid unwieldy day numbers like 2634 d as that's just hard to
frame correctly. Also adding years now does not makes adding weeks in
the future impossible anyway..

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-11-23 09:39:50 +01:00
Thomas Lamprecht
6654703de6 bandwidth field: allow to submit auto-scaled size-units as string
opt-in to avoid breaking existing users and a bit of an experiment in
general..

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-11-20 21:39:25 +01:00
Thomas Lamprecht
851ebc36cd utils: add size unit related helpers to parse/auto-scale/format
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-11-20 21:36:01 +01:00
Thomas Lamprecht
1fad0e8822 bandwidth/utils: move out SizeUnits definition to more common module
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-11-20 21:35:26 +01:00
Dominik Csapak
52a0eae95a form: copy BandwidthSelector/SizeField from PVE
and replace pve with pmx

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-11-19 16:04:55 +01:00
Thomas Lamprecht
ec12ffb90e ui: OpenID realm: allow to edit acr values
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-11-19 07:36:46 +01:00
Thomas Lamprecht
5c5cee2dea ui: OpenID realm: allow to edit prompt
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-11-19 07:36:36 +01:00
Thomas Lamprecht
0dce277c5a ui: OpenID realm: allow to edit scopes
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-11-19 07:36:19 +01:00
Thomas Lamprecht
c860b3490a ui: OpenID edit: make username-claim field editable for arbitrary values
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-11-19 07:35:40 +01:00
Dominik Csapak
c75098386d data: diffstore: fix autoDestroyRstore option
the change from extjs 6.0.1 to 7.0.0 removed 'onDestroy' but brought
us 'doDestroy' for stores

we did not notice since 'onDestroy' was a private method and thus
the changelog did not mention this (doDestroy is a public method meant
exactly for our use case)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-11-18 11:14:31 +01:00
Thomas Lamprecht
4ec859d9bc proxmox checkbox: add clearOnDisable config
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-11-15 10:22:02 +01:00
Dominik Csapak
55e47317c0 window/TfaWindow: fix text format
Ext.String.format was missing to show the number correctly

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-11-12 16:14:00 +01:00
Thomas Lamprecht
d6f0eee91c totp: add location hostname into default issuer
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-11-11 21:11:01 +01:00
Thomas Lamprecht
05da27edef tfa: yubico otp: nudge users in WebAuthn direction
to avoid that they have a yubikey in their hands and think they need
to use Yubico/YubiCloud otp for it to work..

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-11-11 19:55:45 +01:00
Thomas Lamprecht
82a386530e TFA panel: code/style cleanup
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-11-11 19:53:55 +01:00
Thomas Lamprecht
65c39bc04a tfa view: avoid showing start of unix epoch when no creation date
as that is a bit unrealistically, rather use N/A (not applicable)

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-11-11 19:26:33 +01:00
Fabian Ebner
7edda053ea disk list: allow wiping individual partitions
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-11-11 14:40:39 +01:00
Wolfgang Bumiller
20b39dd8f6 add yubico otp windows & login support
has to be explicitly enabled since this is only supported in
PVE

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-11-10 08:58:44 +01:00
Wolfgang Bumiller
ab2538f5e5 add Proxmox.panel.TfaView
copied from pbs with s/pbs/pmx/ and s/PBS/Proxmox/

DELETE call changed from using a body to url parameters,
since pve doesn't support a body there currently, and pbs
doesn't care

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-11-10 08:58:44 +01:00
Wolfgang Bumiller
641764474d add totp, wa and recovery creation and tfa edit windows
plain copy from pbs with s/pbs/pmx/ and s/PBS/Proxmox/

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-11-10 08:58:44 +01:00
Wolfgang Bumiller
9e1f1ef616 add Proxmox.window.TfaLoginWindow
copied from pbs and added u2f tab

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-11-10 08:58:44 +01:00
Wolfgang Bumiller
c7f2b15ac9 add Utils used for u2f and webauthn
base64url parts copied from pbs
render_u2f_error copied from pve

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-11-10 08:37:03 +01:00
Wolfgang Bumiller
d3812684c2 add pmxUserSelector
copied from pbs

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-11-10 08:37:03 +01:00
Dominik Csapak
71295836e5 cbind: document cbind by adding a small summary and example
Explain the use-case, the difference to normal binds, and give an
example that contains all features that can be used with explanations.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-10-27 11:22:00 +02:00
Thomas Lamprecht
511c7843d0 disk: smart: code & indentation level cleanup
drop some intermediate variables that are 1:1 the original

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-10-18 08:43:28 +02:00
Dominik Csapak
53ecc2ad95 fix #3589: show device name in title for SMART values window
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-10-18 07:08:05 +02:00
Thomas Lamprecht
17c580c2a3 code style: text-width, indentation improvements
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-10-18 07:06:59 +02:00
Fabian Ebner
f340cf64fc (multi) disk selector: allow requesting partitions too
No functional change for existing users is intended.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-09-30 18:14:24 +02:00
Dominik Csapak
c91a73150f panel/RRDCharts: enable scrolling for RRDCharts on touchscreens
quote from extjs docs (AbstractChart.js):

 If you do have a chart inside a scrollable view, even if it has no
 interactions, you have to set its touchAction config to the following:

 touchAction: {
     panX: true,
     panY: true
 }

 Otherwise, if a touch action started on a chart,
 a swipe will not scroll the view.

Since we have RRDCharts always in a scrollable view, and it does not seem to
hurt non-touchscreens, enable it by default so that users on touchscreens
can scroll it.

Reported by users in the forum:
https://forum.proxmox.com/threads/minor-but-annoying-ipad-swipe-bug.93686

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-08-23 18:17:02 +02:00
Thomas Lamprecht
8daf5b0955 node: network: do not gettext MTU
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-27 16:38:00 +02:00