Commit Graph

539 Commits

Author SHA1 Message Date
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
Oguz Bektas
d1f37e222d node: add MTU column in NetworkView
hidden by default since it's an "advanced" setting

Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
2021-07-27 16:37:27 +02:00
Fabian Ebner
14247821fb add NodeInfoRepoStatus
adapted from PMG, because it has an additional fix to avoid setting
undefined in the view model, which still affects PBS (see pmg-gui
commit 774418f08b10c651357d11ccb161ac075e1ae905).

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-07-27 16:34:12 +02:00
Dominik Csapak
0dbcfb8c64 fix #3542: node task logs: query correct node for tasks in clusters
While refactoring, we forgot to replace the 'localhost' URL (which is
valid for PMG/PBS) with the actual nodename we have in Proxmox VE.

Do this by setting the correct URL in the viewModel right at the
start of the initComponent

We now also have the possibility to overwrite the url if we want

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-07-27 16:32:38 +02:00
Fabian Ebner
5e76f7302a node: repos: add online help
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
Reviewed-by: Stoiko Ivanov <s.ivanov@proxmox.com>
Tested-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2021-07-19 17:39:38 +02:00
Thomas Lamprecht
f0de3268af api-viewer: ensure path starts with slash
should always be the case, but this is now an assumption, so better
to ensure it.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-19 17:38:25 +02:00
Dominik Csapak
6cc360f2b4 api-viewer: drop extra slash in api path
'endpoint' already begins with a slash, so drop it after /api2/json

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-07-19 17:32:23 +02:00
Fabian Grünbichler
8b06793b3d apt: match "Debian Backports" origin
some users might have that enabled, and we know it is from Debian and
not '?'

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-07-19 17:32:00 +02:00
Thomas Lamprecht
1820e77d5c add package version window
we want that component in all projects, PVE and PBS have the code
duplicated for now, as PMG is about to receive this too I rather want
to use the chance add add it here for actual reuse.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-19 16:58:27 +02:00
Thomas Lamprecht
d9c6e21492 service view: disable all buttons for masked/not-found/unknown services
at least if we have a unit state (atm only PVE and PMG report that)

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-13 18:39:43 +02:00
Oguz Bektas
0c15c08eee service view: fix stale stop/restart button enabled behavior
fix an issue where the stop or restart button stays enabled for
elements in 'startOnlyServices' after switching selection from a
service that was not restricted to start-only

note: front-end change only as the backend already refused to stop a
start-only service.

Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-13 18:35:43 +02:00
Thomas Lamprecht
ae6a1cc908 service view: avoid showing not installed services as error
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-13 18:35:36 +02:00
Thomas Lamprecht
7a17156d65 service view: code cleanup
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-13 18:15:55 +02:00
Stoiko Ivanov
66c5ceb848 acme: allow wildcards as domain
allow wildcard dns-names as defined in [0,1] (only the prefix '*.' in
front of a valid dns-name) as domain.

[0] https://tools.ietf.org/html/rfc8555#section-7.1.3
[1] https://community.letsencrypt.org/t/acme-v2-production-environment-wildcards/55578

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2021-07-13 10:03:14 +02:00
Dominik Csapak
8d4faa8821 panel/AuthView: handle different baseUrls for configuring realms
we need that for pbs.

also give the option to use the type in the path, like in AuthEditBase

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-07-12 09:50:24 +02:00
Dominik Csapak
335633d208 window/AuthEditBase: handle differenc config api urls
necessary for pbs. also give an option to use the type as url path
e.g. /config/access/<TYPE>/<ID>

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-07-12 09:50:24 +02:00
Thomas Lamprecht
bc2b6fdd21 fixup schema
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-09 17:30:26 +02:00
Fabian Ebner
7c65b8bfe0 utils: add helper to format node's repository status
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-07-09 16:58:51 +02:00
Thomas Lamprecht
770b2612d5 auth view: actually use new schema module ...
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-09 16:40:49 +02:00
Thomas Lamprecht
2908d35808 fixup new schema
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-09 16:21:27 +02:00
Thomas Lamprecht
5c085daf0b add schema and move authDomains there
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-09 16:11:19 +02:00
Dominik Csapak
8f30708d44 add generic OpenIDInputPanel
mostly copied from pve, but includes a realm displayeditfield
as well as the comment field

in contrast to the inputpanel in PVE, this is not extended
from a base input panel (where in pve the comment/realm/default/etc.
fields come from)

we do this, since not all products can define a default or tfa

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-07-09 14:46:27 +02:00
Dominik Csapak
c159449543 add panel/AuthView from PVE
added the following (necessary) changes:
* use Proxmox.Utils.authSchema
* omit the sync button/handler, but add a possibilty to add extra buttons
* check for an 'edit' property in the authSchema for enabling editing
* removed the onlineHelp property
* removed 'TFA' column (can be added by the caller)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-07-09 14:46:27 +02:00
Dominik Csapak
402964713a Utils: add authSchema from PVE and make it overrideable
like we do for the task_descriptions.
This way we can have a basic config that is true for all products
and override where necessary

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-07-09 14:46:27 +02:00
Dominik Csapak
6a504e1995 add window/AuthEditBase from PVE
basically a straight copy, with the exception that it references
Proxmox.Utils.authSchema instead of PVE.Utils.authSchema

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-07-09 14:46:27 +02:00
Fabian Ebner
e455399aef node: repos: only show suites warning at the top if enabled repository is affected
The warning still shows up for the disabled repository itself, but
having a disabled repository with a bad suite is not problematic for
the configuration status as a whole.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-07-09 14:42:55 +02:00
Dominik Csapak
68152254af window/SafeDestroy: add taskDone and apiCallDone callbacks
like in edit window, so we can reacto to a successful task/api call

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-07-08 14:07:19 +02:00
Fabian Ebner
bfab8fc134 node: tasks: use helper to format status again
which avoids the all-caps "WARNINGS:" and uses the localized version.
The call was thrown out by the big overhaul in
9e059d560c.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-07-08 11:50:27 +02:00
Thomas Lamprecht
bb5511d569 network: use std remove button for confirm
alows to make the code simpler too, but we need to instantiate the
selection model explicitly, as we use a bit of a weird layout here to
be able to show the pending changes at the bottom, if any, so the
main gridpanel is not the parent of the toolbar buttons, so the
std-remove button does not automatically finds the selection model
when searching in the parent

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-06 20:55:56 +02:00
Thomas Lamprecht
99f3e147e4 code cleanups, inline more, use arrow-fns
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-06 20:54:59 +02:00
Dominik Csapak
abde5f2bad node/Tasks: add 'clear filter' button
that does two things,

show the user that some filters are active (even if filters are collapsed),
and let the user to reset the filters all at once

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-07-05 16:44:37 +02:00
Dominik Csapak
a86b1f26da node/Task: show errors on store load
since we use a buffered store on a grid, we cannot use our
normal monStoreErrors from Utils (The store on the grid is a memorystore
without our 'proxmox' proxy, and the store in the viewmodel is not
initialized yet in the init)

simply set the mask in the already existing 'updateLayout' function
which is exactly the right place for the buffered store load

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-07-05 16:44:37 +02:00
Dominik Csapak
12a6f6824f node/Tasks: deselect entries when filter changes
since we use a remotefilter on a bufferedstore, the only event where
we can check if the selected element is still there is the 'refresh'
event. Simply deselect if the seleceted element is not in the store

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-07-05 16:44:37 +02:00
Dominik Csapak
f00e321173 node/Task: remove leftover 'datastore' reference
this does nothing here, since the 'datastore' would be an
'extraFilter' defined in pbs itself

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-07-05 16:44:37 +02:00
Thomas Lamprecht
6bac17e394 node: repos: always skip "you get updates" on parsing error
As normally that means that the host does not gets updates, as most
apt use will fail too.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-05 16:39:24 +02:00
Thomas Lamprecht
4227a5578a node: repos: improve repo-parsing error message
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-05 16:38:46 +02:00
Thomas Lamprecht
6c9af17882 node: repos: factor out addCritical into closure
now that there's more use for it

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-05 16:38:16 +02:00
Dominik Csapak
25d17082b0 node/APTRepositories: make 'no pve repositories' an error
since we also show it as error in the node summary

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-07-05 16:25:35 +02:00
Thomas Lamprecht
e1fc474412 bump version to 3.2-3
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-05 10:11:46 +02:00
Thomas Lamprecht
fb4bb95e9d utils: fix typo in variable name
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-05 10:11:46 +02:00
Thomas Lamprecht
5b2485ace3 utils: updateColumnWidth: allow overriding tresholdWidth and make that more general
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-05 09:46:58 +02:00
Thomas Lamprecht
8b7e349a25 utils: column width handler: drop duplicate
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-05 09:34:32 +02:00
Thomas Lamprecht
76899da698 info widget: early return from update if text & value stayed the same
No need then and if we'd call into update we'd still generate new
elements which is annoying for debugging and extra DOM work we can
avoid.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-04 22:01:40 +02:00
Thomas Lamprecht
1d3d61ead9 markdown: extend blocked tags in sanitizer
not all of those are really problematic, but it's always easier to
start out stricter than required and see if any user even would use
those.

It seems that we should probably switch to a white-list approach...

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-04 20:52:56 +02:00
Thomas Lamprecht
f2c4f9bdc2 markdown: make sanitizer more strict
The href, and in some browser also the src attrs on img, or a tags
can be made to execute JS rather easily, catch thoseand just remove
the attr if, after creating an URL object from it, it does not looks
like it's a http(s) request.

Further, filter out the style tag completely, as that can be misused
too, even if only to break cosmetics.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-04 20:06:28 +02:00
Thomas Lamprecht
71bc0913bd markdown: encode bad nodes HTML instead of pruning it
As pruning means content an user wrote into the box, even if with
malicious intend, gets hidden and that can be quite confusing..

So rather get the outerHTML, transform it with ExtJS's htmlEncode and
set it again.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-04 19:22:40 +02:00
Thomas Lamprecht
65f4704b62 node: repos: handle that components can be undefined
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-04 19:09:42 +02:00
Thomas Lamprecht
eb1fff8294 node: repo: use more stati-schema like code style to configure store
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-03 16:34:46 +02:00
Thomas Lamprecht
7705801f48 node: repo: use more stati-schema like code style to set grouping feature
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-03 16:21:17 +02:00
Thomas Lamprecht
faacb77fb4 node: repo: avoid using IDs on elements, as that breaks easily on clusters
Anything where more instances can exist, even if only for a very
short time, must NOT use `id` as that needs to be unique in all
current instances of components/elements of the whole gui.

Here it broke most of the gui when switching between node, as the new
nodes repo gui was instantiated before the old ones was completely
destroyed, so there where (at least) two elements with the same id ->
💥 boom.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-03 16:06:17 +02:00
Thomas Lamprecht
c7ca21b4b8 node: repo: health: drop br line-breaks, replaced by flex display
Firefox ignores them anyway but chrome adds them additionally, making
it look rather weird..

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-03 00:09:09 +02:00
Thomas Lamprecht
96ecd62ac1 ui: repo status: adapt some warning/error gettexts
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-02 23:59:56 +02:00
Thomas Lamprecht
46231d0da2 ui: repo status: do not duplicate warning to health icon
It feels quite weird to have the last warning text duplicated, the
left health icon should be a very concise summary only.

allow one to force it by setting important, but that's not yet used
anywhere.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-02 23:58:27 +02:00
Thomas Lamprecht
fe787c8c12 fixup! ui: repo status: code cleanup/refactoring 2021-07-02 23:58:02 +02:00
Thomas Lamprecht
f411afb40c ui: repo status: adapt flex-ratio and center health vertically
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-02 23:57:20 +02:00
Thomas Lamprecht
5267494a87 css: add centered-flex-column class
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-02 23:56:19 +02:00
Thomas Lamprecht
df7def01a1 ui: repo status: code cleanup/refactoring
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-02 23:12:53 +02:00
Thomas Lamprecht
de73e0b3d8 add OpenID icon
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-02 21:58:09 +02:00
Dominik Csapak
5e0cecb7d5 node/APTRepositories: improve error/warning display
always show grid besides status, with the accumulated
stati/warnings/errors

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-07-02 16:28:53 +02:00
Dominik Csapak
f59d1076d7 node/APTRepositories: rework top status and error grid
instead of having a title bar and a seperate error grid,
add an always visible panel that displays the status (ok, warning, errors)
which also contains the error grid (if necessary, ala ceph summary)

this makes the panel more consistent to use and it is immediatly
visible if something is wrong

this also adds a test for the 'test' repositories, as well as a test
for not correctly configured suites

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-07-02 15:31:25 +02:00
Dominik Csapak
fbbe68fd69 Utils: add get_health_icon from PVE
we'll need it here too

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-07-02 15:31:25 +02:00
Thomas Lamprecht
cd20320b7f utils: followup: fix base class
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-02 15:17:47 +02:00
Thomas Lamprecht
e722f108aa ui: Utils: refactor userid parsing to Utils
Originally-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-02 15:06:26 +02:00
Thomas Lamprecht
e8c60b3215 utils: add getOpenIDRedirectionAuthorization: to avoid code-duplication
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-02 13:53:11 +02:00
Thomas Lamprecht
665b206b0f css: fix debian openlogo background-size for chrom* based browsers
The debian one higher than wide and it seems, contrary to my belief,
the background-size is not taken for both, height and width if only
one param is set, but rather the second paramet height then defaults
to `auto` which Firefox and Chromium handle different in this case.

Set both to make this fixed.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-02 09:18:45 +02:00
Thomas Lamprecht
4fc57df439 fixup comment
forgot to save in vim when editing the comment before committing..

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-02 08:09:39 +02:00
Thomas Lamprecht
0668981954 node: repo: highlight proxmox repos that are not producition-ready
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-02 08:04:39 +02:00
Thomas Lamprecht
58b7186065 node: repos: fix reversed validation on configured
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-01 10:49:25 +02:00
Fabian Ebner
d7aeb02f3e apt repos: use correct URL
so there is a 'result' property, which the window expects.

Suggested-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-07-01 10:46:22 +02:00
Thomas Lamprecht
824f997749 node: repos: fix add repo validator
isValid is a boolean not a callback, so won't really work and just
set the state once.

Use the `validator` and first call into the parents helper, then do
our logic and return a string  with an explanation in the expected
invalid case.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-07-01 10:43:12 +02:00
Thomas Lamprecht
f0966f2930 node: repos: fallback to "Other" for unknown origin
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-30 21:58:29 +02:00
Thomas Lamprecht
5a1fddb622 node: repos: use warning, not critical for suite-errors if disabled
As in that case it's actually safe, so rather show as warning, albeit
even info/notice like would probably be enough, but still, it is not
a configuration that is wanted permanently.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-30 21:47:57 +02:00
Thomas Lamprecht
205d2751f4 node: repos: fade text of disabled rows
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-30 21:47:20 +02:00
Thomas Lamprecht
5e9eb2456c node: repos: increase width of add-repo window + style cleanup
We have some longer descriptions so the default width looks crammed.

Also, avoid a intermediate variable which is only used once without
any change.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-30 21:46:12 +02:00
Dominik Csapak
7f671fee58 APTRepositories: remove unecessary selection model
this is the default anyway, no reason to explicitely create it

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-06-30 21:27:04 +02:00
Dominik Csapak
e71fc6e438 APTRepositories: make the Suites warnings inline errors
by iterating only once over the info array and adding them directly
to the records this way we can avoid iterating over the records
again

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-06-30 21:27:04 +02:00
Dominik Csapak
003c49829d APTRepositories: change updating button text/state to viewcontroller
we already have a viewmodel we can use, and so the handler does
not have to navigate the component tree up/down

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-06-30 21:27:04 +02:00
Dominik Csapak
82071150f7 APTRepositories: make panel scrollable
so that it is still usable with many errors and/or repositories

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-06-30 21:27:04 +02:00
Dominik Csapak
d8b5cd80c8 APTRepositories: change separation style between panels
having double borders does not look so nice, separate them with a bit
of padding

also change the warning panel to a simple header

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-06-30 21:27:04 +02:00
Thomas Lamprecht
036f48c14d node: repos: render Origin logo for Debian & Proxmox
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-30 21:26:45 +02:00
Fabian Ebner
21860ea45c node: apt: spawn a window for adding repository
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-06-30 21:26:45 +02:00
Thomas Lamprecht
3dfb0b9a2b css: increase padding for Debian and Proxmox symbol logos
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-30 21:26:45 +02:00
Thomas Lamprecht
77d6d9929e images: use svgcleaner to reduce logo SVG sizes
Used svgcleaner[0] with the following safe[1] command:

```
svgcleaner INPUT.svg OUTPUT.svg --indent 1 --resolve-use no \
 --convert-shapes no --group-by-style no --join-arcto-flags no \
 --join-style-attributes no --remove-comments no --remove-declarations no \
 --remove-invisible-elements no --remove-metadata no \
 --remove-nonsvg-attributes no --remove-nonsvg-elements no \
 --remove-text-attributes no --remove-title no \
 --remove-unreferenced-ids no --trim-ids no --ungroup-groups no \
 --list-separator comma
```

Resulting size reductions:

Debian   22.51% smaller
Proxmox  51.00% smaller

Note that the Debian one had a small issue with a unused variable set
which I reported[2] and cleaned up manually for now.

[0]: https://github.com/RazrFalcon/svgcleaner
[1]: https://commons.wikimedia.org/wiki/User:JoKalliauer/Optimization#svgcleaner
[2]: https://github.com/RazrFalcon/svgcleaner/issues/240

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-30 21:26:45 +02:00
Thomas Lamprecht
259c29df9f add Debian and Proxmox symbol logos and css
also add a new 'pmx-itype-icon' helper class for the classic bg
repeat/position option to allow more easier reuse

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-30 21:26:45 +02:00
Thomas Lamprecht
a8ab1d9820 node: services: fix logic for displaying unit state
still hacky but at least works now ;-)

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-30 21:26:45 +02:00
Thomas Lamprecht
03325cedcf buildsys: do not install css or images with executable flag
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-30 15:20:20 +02:00
Thomas Lamprecht
87c64c495e css: some markdown heading and paragraph font-size & padding tuning
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-30 14:21:50 +02:00
Fabian Ebner
d91987a558 apt repositories: replace OfficialHost with Origin
to adapt to the new backend behavior.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-06-30 13:41:21 +02:00
Thomas Lamprecht
6fc91fc698 node tasks: fixup overly-short comment lengths
The minimum "max length" should be 80cc, and 100cc is also fine.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-28 16:19:40 +02:00
Dominik Csapak
9e059d560c node/Tasks: merge improvements from PBS and make it more generic
this copies most of the task grid from pbs, but adds handling so that
users can add aribtrary filter fields

the filter fields always present are:
* since
* until
* task type
* task status

other filters fields can be added by giving an 'extraFilter' array
which must contain widget definitions that emit a 'change' event.
this is then used to update the filters for the api call

also you can add a 'preFilter' object, that sets the filter parameter
only once at the beginning

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-06-28 16:06:49 +02:00
Thomas Lamprecht
5995eddcc4 cbind mixin: also descend in elements with an cbind property
Not only into those with an xtype one, as we can either have a
implicit default xtype (e.g., in tbars for buttons, or set explicitly
via the `defaults` mechanism) or want to apply cbinds to stores or
other objects.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-25 08:42:44 +02:00
Thomas Lamprecht
03c4c65bab apt repos: move Official to the right & use checkbox to render enabled
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-23 19:57:33 +02:00
Thomas Lamprecht
3fc020f417 apt repos: add product config-option and rework warning renderer
product defaults to PVE. It is added in the warnings and should be
set by any instance correctly.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-23 19:42:14 +02:00
Thomas Lamprecht
0e79ce21c1 apt repos: make add-repo a checked command
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-23 19:40:54 +02:00
Thomas Lamprecht
994fe897b7 apt repos: style grouping headers a bit different
else the repo/header difference is not that big, and it gets a bit
hard to read as it feels a bit monotonic

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-23 19:39:48 +02:00
Thomas Lamprecht
bb64cd0341 apt repos: make enable/disable text selection dependent
the size hack is copied over from pve-manager's qemu/HardwareView

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-23 19:38:34 +02:00
Thomas Lamprecht
af48de6bf8 apt repos: code/format cleanups
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-23 19:01:24 +02:00
Fabian Ebner
d76eedb46f add buttons for add/enable/disable
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-06-23 16:01:06 +02:00
Fabian Ebner
24313a9d80 add UI for APT repositories
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2021-06-23 16:01:06 +02:00
Thomas Lamprecht
89de7ec504 node/services: show masked and some unknown units as disabled (greyed out)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-23 15:55:00 +02:00
Thomas Lamprecht
b6eedbba04 node/services: disable start/stop for masked and unknown units-states
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-23 15:54:17 +02:00