Commit Graph

627 Commits

Author SHA1 Message Date
Christoph Heiss
4aff870f6c window: add Active Directory auth panel
As AD realms are mostly just LDAP, reuse the LDAP panel and just
show/hide some elements based on the type.

Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
2024-03-25 17:15:24 +01:00
Thomas Lamprecht
a5d6c92f60 window: password edit: clarify labels
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-03-21 17:33:24 +01:00
Wolfgang Bumiller
be5b9a4393 window: password edit: add opt-in confirmation-password field
For when the product UI using this component wants to show an extra
confirmation field where the user that executes the password change,
have to confirm their own password.

Reported-by: Wouter Arts <security@wth-security.nl>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
 [ TL: use already included CBind mixin instead of constructor ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-03-21 17:30:27 +01:00
Dominik Csapak
d35cb8aa7c utils: api request: defer masking after layout
Since recently (not sure when exactly), the 'load()' method of the
edit window did not correctly mask the window anymore

The reason seems to be that the API2Request tries to mask the
component before it's rendered, and that did never work correctly.

Instead of simply calling `setLoading`, test if the component is
rendered, and if not, mask it after it has finished it's layout.

Since we cannot guarantee that there is only one API2Request with the
waitMsgTarget set to it, nor that the 'afterlayout' and api call
responses come in a specific order, we count the loads, and only
ever unmask the component when the counter reaches zero again.

Since we're strictly in non-async code here and JavaScript is
single-threaded, this should not result in a data race.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2024-03-19 18:05:13 +01:00
Maximiliano Sandoval
461bb2e56c certificates: removal prompt: don't display name if there is no name
The default certificate does not have a name, which caused this to
display an undefined text in the prompt.

Reported-by: Dietmar Maurer <dietmar@proxmox.com>
Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
 [ TL: drop useless instance of calling format, keep arrow-fn ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-03-07 15:30:50 +01:00
Dominik Csapak
03e44f5b60 edit window: add optional custom submit options
sometimes it's necessary or handy to add custom options to the submit
api call (e.g. timeout). So just expose a `submitOptions` where users
of the edit window can put their custom options.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2024-03-07 15:08:34 +01:00
Thomas Lamprecht
8d161ac19c dns: update comment to avoid coupling to downstream dependency
Not much of use, better comment why this exist, other products could
change or new ones get added with new semantic used there too, so the
previous comment would be guaranteed to become outdated rather sooner
than later.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-03-01 12:41:41 +01:00
Dominik Csapak
e3cf77e177 dns: optionally send delete for optional values
pbs only deletes the optional values here when they are sent with the
'delete' parameter, in contrast to pve/pmg that don't have a delete
parameter currently and always use the parameters as source of truth.

So to handle that, optionally set deleteEmpty if set from outside

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2024-03-01 12:34:55 +01:00
Lukas Wagner
d2c8fbfe0c utils: add extendable, translatable notification event descriptions
Add a similar mechanism like we have for adding and overriding task
description per product UI.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-02-28 11:40:48 +01:00
Thomas Lamprecht
36d167d629 form: combo grid: clarify that showClearTrigger cannot actively hide them
As getting a good setting name is a bit hard here, the current one
might me interpreted such that setting it to false will always hide
the trigger, but that's not the case, this is mostly a "force show
trigger even if allowBlank is set to false", and that's a bit of a
long name ;-)
So just add a comment and reevaluate if this really causes confusion.

While at it simplify the boolean expression to make it shorter and
easier to read.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-02-28 11:40:48 +01:00
Lukas Wagner
4bee6fb074 combogrid: add 'showClearTrigger' config
This allows one configure the clear trigger to be shown, even if
'allowBlank' is set false. This can be useful if one has a
non-editable combogrid where the value is set to something not
present in the store. Example: Match rule editing, one selects
a backup job to be match. If the backup job is removed and the match
rule edit window is opened again, then the old, deleted value cannot
be removed from the combogrid if there is no clear trigger.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-02-28 11:40:48 +01:00
Dominik Csapak
43b978658e datetimefield: fix changing date to end of month from short months
When selecting a new date, we get a date object from the currently
selected date before the change. If that month has less days than what
was selected for the new month, `setDate` will wrap that to the
following month since the old month is still selected there.

For example:

select any date in april (has 30 days)
then select the 31th of january

this will actually select the 1st of january since we first get

setDate: 20xx-04-XX -> 20xx-04-31 (wrap) -> 20xx-05-01
setMonth: 20xx-05-01 -> 20xx-01-01

To fix this, use the additional parameters of setFullYear[0] to set
all of them simultaneously

0: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setFullYear

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2024-02-27 14:33:41 +01:00
Thomas Lamprecht
fc792d6411 i18n: use correct ISO 639-1 code for Korean with backward compat
recently the proxmox-i18n repo got a fix where we moved the files for
Korean to the correct language code, i.e., from previously wrong used
kr (Kanuri) to the correct ko (Korean).

This loads the correct ExtJS locale and is less confusing for our
Korean speakers, but we still want a clean transition for those that
have still the 'kr' value set in their language cookie.
Note that this transition only happens when the user opens the
language selector, as otherwise we do not have the product-specific
cookie name available, so a better transition would need to happen in
the per-product UIs.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-01-15 18:40:59 +01:00
Fiona Ebner
905528a28d fix #5074: notify: sendmail: smtp: fix mailto/mailto-user parameter deletion
by doing a cbind of isCreate to the top-level widget so that cbind in
the nested widgets for deleteEmpty works.

In the GUI, when a sendmail/smtp target is edited and either
'Additional Recipients' or 'Recipients' is completely removed (only
possible if the other field contains a value), parameter deletion did
not work properly. After applying the changes, the old value would
still be in place.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
Tested-by: Lukas Wagner <l.wagner@proxmox.com>
Reviewed-by: Lukas Wagner <l.wagner@proxmox.com>
2024-01-05 10:33:26 +01:00
Lukas Wagner
1fc3d8cd1c notification ui: display yellow warning triangle instead of red icon
Instead of coloring the entire icon red, show a yellow warning
triangle containing an exclamation mark in case of validation errors.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2023-11-23 10:10:10 +01:00
Lukas Wagner
64821a108c notification ui: change icon for for match-field tree nodes
The old icon was slightly ambiguous since we also use it for LXC
containers.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2023-11-23 10:10:10 +01:00
Thomas Lamprecht
a5630fd2dd schema: do not translate SMTP
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-11-23 09:09:59 +01:00
Lukas Wagner
6ed92b735f notification ui: add 'unknown' to match-severity dropdown
This is the severity used for forwarded mails, since we cannot
reasonably infer a priority here.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2023-11-21 17:38:52 +01:00
Lukas Wagner
c972de233a notification ui: add appropriate onlineHelp anchors
This links the dialog windows to the correct help section (different
target types, matchers).

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2023-11-21 17:38:40 +01:00
Fiona Ebner
edd98f946b notification matcher: fix inverted match modes
The 'not' prefix is already stripped in the set() method of the view
model's 'rootMode' and not present anymore when updating the store.
The information about whether the mode is inverted or not is present
in the 'invert' data member.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
2023-11-20 16:17:42 +01:00
Dominik Csapak
1f8bfa3b30 notification matcher: improve wording for mode
by removing the 'invert' checkbox and instead show the 4 modes possible,
we still assemble/parse the invert for the backend

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-11-17 15:11:25 +01:00
Dominik Csapak
be5329512c notification matcher: improve handling empty and invalid values
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-11-17 15:11:25 +01:00
Lukas Wagner
6a0b0b376c notification ui: add column for 'origin'
This column shows whether a matcher/target was provided as a built-in
default config or if it was created by the user. For built-ins, it
also shows whether the built-in settings have been changed.

To reset a built-in entry to its defaults, one can simply delete it.
For best UX, the 'delete' button should change its text to 'reset
defaults' when a built-in target/matcher is selected. This will be
added in another patch.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2023-11-17 15:04:39 +01:00
Lukas Wagner
5f7b28cb19 notification ui: add enable checkbox for targets/matchers
Add a 'enable' checkbox for targets and matchers in their edit
windows. Also show a new 'enable' column in the overview panel.
The parameter in the config is actually called 'disable', so
the UI needs to invert the setting in the appropriate
on{Get,Set}Values hooks.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2023-11-17 15:04:39 +01:00
Lukas Wagner
3003f37779 panel: notification: add gui for SMTP endpoints
This new endpoint configuration panel is embedded in the existing
EndpointEditBase dialog window. This commit also factors out some of
the non-trivial common form elements that are shared between the new
panel and the already existing SendmailEditPanel into a separate panel
EmailRecipientPanel.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2023-11-17 15:04:39 +01:00
Lukas Wagner
de0cec409a noficiation: matcher edit: make 'field' an editable combobox
For now with fixed options that are shared between most notification
events - later, once we have a notification registry, this should be
filled dynamically.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2023-11-17 15:04:39 +01:00
Lukas Wagner
5bd3ad4e90 notification ui: unprotected mailto-root target
A default notification config will now be created in pve-manager's
postinst hook - which is not magic in any way and can be modified
and deleted as desired.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2023-11-17 15:04:39 +01:00
Lukas Wagner
03a54ebd29 notification: matcher: add UI for matcher editing
This modifies the old filter edit window in the following ways:
  - Split content into multiple panels
    - Name and comment in the first tab
    - Match rules in a tree-structure in the second tab
    - Targets to notify in the third tab

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2023-11-17 15:04:39 +01:00
Lukas Wagner
e8f1954c55 notification ui: rename filter to matcher
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2023-11-17 15:04:39 +01:00
Lukas Wagner
feacab72ca notification ui: remove notification groups
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2023-11-17 15:04:39 +01:00
Lukas Wagner
159fec230d notification ui: remove filter setting for targets
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2023-11-17 15:04:39 +01:00
Lukas Wagner
78d21b71d2 notification ui: add target selector for matcher
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2023-11-17 15:04:39 +01:00
Thomas Lamprecht
15f0d99534 form: displaye-edit: add one of the two missing returns
the other one _should_ not be problematic, as field-container itself
isn't picked up as a "real" field itself, but we might bind to that
somewhere, where enabling could break this.

The editable one seems to not be used yet, according to Dominik, so
fix that now already.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-11-17 15:00:32 +01:00
Dominik Csapak
e34b0f4a12 api-viewer: implement basic oneOf support
for parameters only for now, also only implement the basic use case we
want to have currently: use in section config apis where we have more
than one type.

we could improve upon that, e.g. by properly grouping the type relevant
options, and also implementing that for return types.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-11-17 09:58:17 +01:00
Dominik Csapak
4ecad70c66 combogrid: initialze value with [] by default
we have to initialize the value of a combogrid to something (else extjs
does not initialize everything in the object *sometimes* for yet unknown
reasons), but the empty string is wrong.

we already have at least two places where we set the default value to []
(namely NodeSelector and ha GroupSelector) with the comment:

 // set default value to empty array, else it inits it with
 // null and after the store load it is an empty array,
 // triggering dirtychange

so it makes sense to always set it to that by default. This only ever is
relevant when the combogrid has `allowBlank: true`, since if it does not
it's either invalid (and thus "dirty") or it has a selected value anyway

this should make the manual setting of

 value: [],

unnecessary in the child classes. We can even remove it direcly in the
NetworkSelector.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-11-14 09:03:59 +01:00
Fabian Grünbichler
7605e43eaa apt: drop ChangeLogUrl
it's not returned anymore by the corresponding backends, since fetching
changelogs is now fully delegated to `apt`.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2023-11-13 18:16:30 +01:00
Dominik Csapak
64ffc0378e window/FileBrowser: enable tar button by default
all endpoints now can handle the 'tar' parameter, so add it for all

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-11-13 16:45:55 +01:00
Aaron Lauterer
d981e33b1f DiskList: render osdid-list if present
Render all OSD IDs in 'osdid-list' if the parameter is present.

It is possible to have multiple OSD daemons on a disk. We want to list
them all in the UI.
Fall back to the 'osdid' parameter if 'osdid-list' is not available.

We check rec.data['osdid-list'] against its general truthiness as it
might not be present at all or null.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
2023-11-13 15:33:55 +01:00
Christian Ebner
40e341792e fix #4442: Extend LogView for firewall datetime filtering
Extends the current panels date filtering capability to date-time
based filtering, and adds a config option to switch between livemode
and filter mode, analogous to the JournalView panel.

The `submitFormat` config is introduced to adapt the formatting of
params values for their corresponding api calls.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
2023-11-13 15:23:12 +01:00
Christian Ebner
0e3cb037d6 fix #4442: adapt DateTimeField to be more declarative
Reworks the current implementation of the DateTimeField to be more
declarative by using a ViewModel and data bindings as well as formulas,
in order to reduce code and unwanted complexity.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
2023-11-13 15:23:12 +01:00
Lukas Wagner
8fc1d232ea panel: sendmail edit: don't translate 'Proxmox VE' in author field
The default value is determined by the backend and is never
translated (which does not make sense any way for a product name).
This was likely just a copy/paste mistake from other from fields.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2023-11-06 18:20:10 +01:00
Lukas Wagner
8a8b0428fd schema: endpoint types: don't translate endpoint type names
... that are not really translatable.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2023-11-06 18:19:29 +01:00
Thomas Lamprecht
3749f20c5e utils: fix trailing comma
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-10-31 21:47:12 +01:00
Thomas Lamprecht
5d7d30de0f text field: add trimValue config
Inspired by a recent bug detected in the subscription key field, where
a trailing white space caused verification issues.

We might even enable the trimming by default, after checking call
sites that is – most often one wants to trim the text to be submitted

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-10-24 13:59:19 +02:00
Thomas Lamprecht
5a3ac9b110 utils: code style cleanup/reduction
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-10-24 13:57:43 +02:00
Thomas Lamprecht
89699c6466 parser: split checking IMG and A tags, make the latter more strict
Split the logic so that each tag is handled explicitly on it's own
if-else branch, which is now safer to do as we default to
allow-only-http-like.

Also address a recently introduced regression from the implementation
of the #4756 where any user that could edit notes could use
javascript: script-urls for XSS purpose to prepare a link that could
leak private user information when another user clicked on it, at
least if they omitted basic sanity checks by looking at the URL
displayed by the browser before.

We have to override a false-positive triggered by a eslint heuristic,
a simple string compression should be always safe.

Fixes: 5cbbb9c ("fix #4756: markdown notes: allow any valid URL for a tags")
Reported-by: Hieu Dang Cong <HieuDC5@fpt.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-10-03 10:31:18 +02:00
Thomas Lamprecht
9ef8030535 parser: make it clearer that we mark HTTP-like URLs always as safe
we should make this controllable by the user for images, while modern
browser are quite safe w.r.t. not transmitting to much info on cross
origin requests, it still might be nicer if they have some control
over this.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-10-03 09:15:11 +02:00
Thomas Lamprecht
e21d3a40ad parser: use safer mechanism for allowing URLs
Having a default-remove boolean flag is making it easier to get this
right and decouple the if-branches that check if something is OK
(which may get more complex in the future) from the actual handling of
the result by always removing the href attribute if not explicitly
told otherwise.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-10-03 08:37:36 +02:00
Thomas Lamprecht
ade0e572d2 parser: factor out getting lower-case canonical tag name
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-10-03 08:27:22 +02:00
Lukas Wagner
b4b3bcad18 notification config view: add missing parameter for Ext.String.format
Fixes: 7e4b51 ("notification config view: fix using gettext with parameter")
Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2023-09-18 12:06:33 +02:00
Thomas Lamprecht
247304085f sendmail edit panel: fix using gettext with parameter
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-09-14 08:14:25 +02:00
Thomas Lamprecht
7e4b51778a notification config view: fix using gettext with parameter
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-09-13 18:17:07 +02:00
Thomas Lamprecht
72a355b8d7 notification config view: fix using gettext with parameter
One must use a parameter {0} replacement string as otherwise this
cannot be translated at all.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-09-13 18:15:12 +02:00
Thomas Lamprecht
6e70fce94f utils: language map: add entry for Croatian translation
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-09-13 17:05:03 +02:00
Lukas Wagner
0e1fa66f75 auth: ldap: openid: use proxmoxtextfield for comment
The regular `textfield` does not support the `deleteEmpty`
setting. Thus, if no comment was entered the configuration
would still end up with an empty `comment` key:

ldap: foo
    server ....
    bind-dn ...
    comment

Fixed by switching over to `proxmoxtextfield`, which properly
deletes empty keys.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
2023-09-07 17:52:38 +02:00
Dominik Csapak
9133d5b5f9 fix #4951: accept undefined as value for the MultiDiskSelector
otherwise it tries to string split it and throws an exception

This can happen when there was no initial value and the form is reset.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-09-07 17:49:38 +02:00
Filip Schauer
a5736f02e5 fix #4531: acme plugins: correct change detection of dirty form fields
Fix the ACME plugin edit form only detecting dirtychanges once the
value of a textfield was dirtied and then changed back to the
original.

This behaviour is caused as we cannot reuse the field's
resetOriginalValue method, due to that cause breakage here, e.g., if
the value was edited, then another plugin (without a schema) gets
selected, and then one would switch back again to the previous plugin,
it would cause the (actually still dirty) value to get registered as
new original one by mistake.

So the fix here is to keep the manual originalValue tracking, but add
the missing call to checkDirty after setting the originalValue to
refresh the dirty flag.

Fixes: 45708891 ("ui: add ACMEPluginEdit window") from pve-manager
Signed-off-by: Filip Schauer <f.schauer@proxmox.com>
 [TL: record reason for originalValue handling & sligthly reword ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-08-30 16:02:41 +02:00
Christian Ebner
575b4f3790 utils: Remove outdated url in comment
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
2023-08-23 10:14:15 +02:00
Lukas Wagner
5d1b587fdd notification: add ui for managing notification filters
This commit adds a new dialog window, containing all fields necessary
to configure notification filters.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
2023-08-16 10:37:44 +02:00
Lukas Wagner
90dbb2d359 notification: allow to select filter for notification targets
This commit adds a new selector field for existing endpoint
configuration where one is able to select a notification filter.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
2023-08-16 10:37:40 +02:00
Lukas Wagner
ea5aa12261 notification: add gui for notification groups
The GUI is based on the 'plugin-based' dialog window EndpointEditBase
that was introduced in an earlier commit.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
2023-08-16 10:37:35 +02:00
Lukas Wagner
6669a59fd1 notification: add gui for gotify notification endpoints
The GUI is based on the 'plugin-based' dialog window EndpointEditBase
that was introduced in an earlier commit.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
2023-08-16 10:37:31 +02:00
Lukas Wagner
84f70dfaad notification: add gui for sendmail notification endpoints
This commit adds a new panel 'NotificationConfigView' that is supposed
to be embedded in the datacenter configuration side-bar.
This new view lists all notification endpoints, allowing to
add/modify/delete/test them.

Furthermore, this commits adds the dialog for adding/modifying
sendmail endpoints. The dialog is 'plugin-in' based, meaning that it
consists of a base window (EndpointEditBase) and a panel that holds
the actual fields for the endpoint type configuration. This will show
be beneficial once the GUI for other endpoint types is added.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
2023-08-16 10:37:24 +02:00
Filip Schauer
a60c8dc0c0 certificates: delete: Fix a typo
Fix the UI not refreshing when a successful certificate deletion
requires it.

Signed-off-by: Filip Schauer <f.schauer@proxmox.com>
2023-08-14 12:39:33 +02:00
Thomas Lamprecht
6e5405767c utils: add entry for Georgian translation
which got recently submitted as new translation:
https://git.proxmox.com/?p=extjs.git;a=commitdiff;h=6ee3ee85552152132700448eab148a3bf9a30fcc
https://git.proxmox.com/?p=proxmox-i18n.git;a=commitdiff;h=323c79d6b4fb8c7eb4b5eab7fb0f66d9cd970632

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-08-03 16:31:37 +02:00
Amin Vakil
2d613cac1f fix #4874: improve error message for invalid hostname
Current error message is not correct because having underscores in
domain names are perfectly valid, although it's not acceptable at host
names, so it should be changed to "This is not a valid hostname".

https://www.ietf.org/rfc/rfc1123.txt section 2.1 "Host Names and Numbers"
https://www.rfc-editor.org/rfc/rfc2181#section-11

Signed-off-by: Amin Vakil <info@aminvakil.com>
 [TL: s/Host /host/ once more, reflow msg with 70cc & reword subject]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-08-03 10:49:39 +02:00
Friedrich Weber
e61ffdd6ee ui: add some missing htmlEncodes
Signed-off-by: Friedrich Weber <f.weber@proxmox.com>
2023-07-25 16:58:12 +02:00
Stefan Sterz
085eed30c2 window: ldap auth edit forbid specifying a bind_dn without a password
this commit enforces passwords when using an non-anonymous bind.
hence, it removes the possibility of configuring unauthenticated binds
and brings the gui in-line with the backend.

Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
2023-06-26 14:54:53 +02:00
Dominik Csapak
efcb34fa21 try using 'pve-eslint' if it exists
but fallback to 'eslint' otherwise

Suggested-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
 [T: move into www/manager Makefile directly]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-24 17:47:18 +02:00
Maximiliano Sandoval
c655b2f577 window: addtotp: Increase the size of the quiet zone
It is recommended that the quiet zone has the width of 4 blocks, since
each block is around 4 pixels each, we need a margin of 16 pixels and a
size of 256 + 2 * 16 pixels.

Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
2023-06-16 15:52:37 +02:00
Fiona Ebner
7d5201a32f apt repositories: add production ready warnings for Ceph repositories
Could've been done for the test repository already, but now that there
is a split between no-subscription and enterprise it becomes even more
relevant.

Reported-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
2023-06-16 15:50:03 +02:00
Thomas Lamprecht
01034bdb5f utils: add Українська - Ukrainian to language map
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-14 14:18:55 +02:00
Fiona Ebner
a14bafeca6 apt repositories: avoid potential type error in classifyOrigin helper
with undefined (or otherwise falsy) argument.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
2023-06-09 17:29:22 +02:00
Fiona Ebner
78be60a079 apt repositories: fix typo for getting the default unknown text
Could lead to a type error with classifyOrigin when there is a
repository that doesn't have an InRelease file and cannot be detected
as Debian/Proxmox origin from its URL. For me, it triggered with the
element.io repository after changing to bookworm (which currently
doesn't exist yet) and running apt update.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
2023-06-09 17:29:22 +02:00
Wolfgang Bumiller
33cfd1f6b4 tfa: show 'Locked' in 'Enabled' column if tfa is locked
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-06-07 18:05:24 +02:00
Wolfgang Bumiller
50af081a20 tfa: improve UX for recovery keys and when none are left
If we get an empty challenge, tell the user to contact an
administrator as it means no 2nd factors and no recovery
keys are available.

Currently if only 1 key was available and it had a high ID,
we'd show something like: "Recovery keys available: 9,
Warning, less than 4 keys available."
Let's start off with the warning, and then be explicit about
the IDs.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-06-07 18:05:20 +02:00
Fiona Ebner
e6ed4498cd apt repositories: detect mixed suites before major upgrade
Usually, differing suites already produce warnings/errors, but before
a major upgrade the current and the next suite are both valid. Mixing
them is an issue though.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
2023-06-07 17:19:38 +02:00
Fiona Ebner
b9b1a51a2e apt repositories: just ignore unknown info rather than throwing an error
This will avoid breaking older UI when extending the backend.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
2023-06-07 17:19:32 +02:00
Fiona Ebner
3d6b76ee2b apt repositories: add classifyOrigin helper
to be used again to detect mixed repositories before upgrade.

Needed to convert into an actual function for the 'this' usage.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-07 17:19:14 +02:00
Thomas Lamprecht
f6f29f8c1c date time field: fixup syntax error
Fixes: 6883083 ("form: date time field: add alias for backward compat")
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-07 17:19:14 +02:00
Fiona Ebner
fd468868dd apt repositories: actually ignore ignore-pre-upgrade-warning
when upgrading is possible rather than throwing an error by reaching
the else branch.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-07 17:19:14 +02:00
Max Carrara
ecdde39c1c toolkit/utils: fix whitespace
Signed-off-by: Max Carrara <m.carrara@proxmox.com>
2023-06-06 17:11:42 +02:00
Max Carrara
aec7e8d23c toolkit/utils: set SameSite attr of auth cookie to 'strict'
Overrides 'Ext.util.Cookies', optionally allowing the SameSite
attribute of cookies to be defined. Using this override, the SameSite
attribute of the auth cookie is now set to 'strict', prohibiting the
cookie from being sent along in cross-site sub-requests or when the
user navigates to a different site.

Signed-off-by: Max Carrara <m.carrara@proxmox.com>
2023-06-06 17:11:42 +02:00
Christian Ebner
95fa855701 DateTimeField: Extend and refactor to make field value bindable
Extends the date time field so that bindings are updated on value changes.
Also adds a config to disable child components and avoid modification of
current values by cloning the referenced object for min/max value calculation.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
2023-06-06 16:45:47 +02:00
Thomas Lamprecht
6883083e8a form: date time field: add alias for backward compat
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-06 16:43:56 +02:00
Christian Ebner
9531241400 DateTimeField: fix typo in xtype
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
2023-06-06 16:41:43 +02:00
Thomas Lamprecht
2d04f0165d markdown parser: allow setting target tag for links
If one really want's to force a link to open in a new tab (or window,
depending on the browser settings).

Note that we don't set target to _blank by default for links, as
opening in a new tab can already simply be done via a middle-click on
the link without that, but once the target is set opening in the same
tab cannot easily be done, i.e., without a target set the reader has
more freedom and flexibility.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-03 13:41:23 +02:00
Thomas Lamprecht
5cbbb9c44a fix #4756: markdown notes: allow any valid URL for a tags
As anchor elements cannot load things into the current browsing
context and are not necessarily more dangerous to users compared to
HTTP(S) links, which we allowed since adding markdown rendering in
the first place.

Allows adding short-cuts for virtual guest resources, like RDP or SSH
links.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-03 13:41:23 +02:00
Thomas Lamprecht
b0c7069a10 markdown parser: normalize tag names and protocol for check
As the tag names are often uppercase, and so this was overly strict
and didn't always match correctly

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-03 13:41:23 +02:00
Thomas Lamprecht
28f879c09e markdown parser: correctly remove src & href attribute if not valid URL
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-03 13:41:23 +02:00
Thomas Lamprecht
e09af56554 ship a minified version of the widget-toolkit JS library
so use sites can switch between literal and minified version like we
do already for ExtJS via the debug flag.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-03 13:41:23 +02:00
Thomas Lamprecht
0676eb3738 buildsys: avoid whitespace in build info heading
this is added to the URL as is by most index templates, and literal
(non-URL-encoded) white space might break things.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-03 13:41:23 +02:00
Noel Ullreich
01e64778ad fix #4551: ui: translate byte unit in format_size
Some languages translate byte units like 'GiB' or write them in their
own script.

By `gettext`ing the units in the `format_size` function, we can
translate the units for (almost) all of the web interface.

Signed-off-by: Noel Ullreich <n.ullreich@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-01 16:10:34 +02:00
Thomas Lamprecht
9dba61e674 parser: adapt to new marked Markdown renderer calling convention
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-01 16:03:57 +02:00
Aaron Lauterer
b515e164b7 tfa: paperkey: cleanup iframes for printing after window close
similar as recently done for the PBS storage add/edit window in
pve-manager

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
[ TL: refer to same change as done in pve-manager ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-28 19:40:02 +02:00
Thomas Lamprecht
9521d1768e buildsys: expand clean target
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-25 10:27:10 +02:00
Thomas Lamprecht
d7fa9ea42b buildsys: improve resolving package meta info
use the full version for the cache invalidation technique and fall
back to the commit ID and current time.

With that we can drop the exports in the top-level makefile, which
would only work for local direct builds anyway, but not for building
from DSC source package.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-25 10:13:39 +02:00
Thomas Lamprecht
89f321671f makefile: convert to use simple parenthesis
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-05-25 09:26:05 +02:00
Stefan Sterz
da639fb2ae fix #4618: dark-mode: lighten critical/warning charts/gauges colors
by increasing the lightness of these colors to to make them have the
same amount of lightness as the primary color.

Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
2023-05-17 11:41:49 +02:00
Stefan Sterz
4c435ee1c3 dark-mode: adjust panel header tool icons
by brigthenening the icons on a more individual basis some darker ones
can now feature higher contrasts while others won't be too bright.

Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
2023-05-17 11:41:49 +02:00