]> git.proxmox.com Git - proxmox-widget-toolkit.git/log
proxmox-widget-toolkit.git
4 months agod/changelog: drop duplicate 'for'
Thomas Lamprecht [Thu, 18 Jan 2024 11:59:54 +0000 (12:59 +0100)]
d/changelog: drop duplicate 'for'

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 months agoi18n: use correct ISO 639-1 code for Korean with backward compat
Thomas Lamprecht [Mon, 15 Jan 2024 17:15:06 +0000 (18:15 +0100)]
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>
4 months agofix #5074: notify: sendmail: smtp: fix mailto/mailto-user parameter deletion
Fiona Ebner [Thu, 4 Jan 2024 12:29:34 +0000 (13:29 +0100)]
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>
5 months agobump version to 4.1.3
Thomas Lamprecht [Thu, 23 Nov 2023 10:16:28 +0000 (11:16 +0100)]
bump version to 4.1.3

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 months agonotification ui: display yellow warning triangle instead of red icon
Lukas Wagner [Thu, 23 Nov 2023 08:57:56 +0000 (09:57 +0100)]
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>
5 months agonotification ui: change icon for for match-field tree nodes
Lukas Wagner [Thu, 23 Nov 2023 08:57:55 +0000 (09:57 +0100)]
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>
5 months agoschema: do not translate SMTP
Thomas Lamprecht [Thu, 23 Nov 2023 08:09:59 +0000 (09:09 +0100)]
schema: do not translate SMTP

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
6 months agobump version to 4.1.2
Thomas Lamprecht [Tue, 21 Nov 2023 20:36:07 +0000 (21:36 +0100)]
bump version to 4.1.2

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
6 months agonotification ui: add 'unknown' to match-severity dropdown
Lukas Wagner [Tue, 21 Nov 2023 16:01:45 +0000 (17:01 +0100)]
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>
6 months agonotification ui: add appropriate onlineHelp anchors
Lukas Wagner [Tue, 21 Nov 2023 14:47:58 +0000 (15:47 +0100)]
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>
6 months agonotification matcher: fix inverted match modes
Fiona Ebner [Mon, 20 Nov 2023 14:53:56 +0000 (15:53 +0100)]
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>
6 months agobump version to 4.1.1
Thomas Lamprecht [Fri, 17 Nov 2023 15:56:10 +0000 (16:56 +0100)]
bump version to 4.1.1

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
6 months agonotification matcher: improve wording for mode
Dominik Csapak [Thu, 16 Nov 2023 11:57:53 +0000 (12:57 +0100)]
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>
6 months agonotification matcher: improve handling empty and invalid values
Dominik Csapak [Thu, 16 Nov 2023 11:57:52 +0000 (12:57 +0100)]
notification matcher: improve handling empty and invalid values

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
6 months agonotification ui: add column for 'origin'
Lukas Wagner [Tue, 14 Nov 2023 12:59:53 +0000 (13:59 +0100)]
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>
6 months agonotification ui: add enable checkbox for targets/matchers
Lukas Wagner [Tue, 14 Nov 2023 12:59:52 +0000 (13:59 +0100)]
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>
6 months agopanel: notification: add gui for SMTP endpoints
Lukas Wagner [Tue, 14 Nov 2023 12:59:51 +0000 (13:59 +0100)]
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>
6 months agonoficiation: matcher edit: make 'field' an editable combobox
Lukas Wagner [Tue, 14 Nov 2023 12:59:50 +0000 (13:59 +0100)]
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>
6 months agonotification ui: unprotected mailto-root target
Lukas Wagner [Tue, 14 Nov 2023 12:59:49 +0000 (13:59 +0100)]
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>
6 months agonotification: matcher: add UI for matcher editing
Lukas Wagner [Tue, 14 Nov 2023 12:59:48 +0000 (13:59 +0100)]
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>
6 months agonotification ui: rename filter to matcher
Lukas Wagner [Tue, 14 Nov 2023 12:59:47 +0000 (13:59 +0100)]
notification ui: rename filter to matcher

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
6 months agonotification ui: remove notification groups
Lukas Wagner [Tue, 14 Nov 2023 12:59:46 +0000 (13:59 +0100)]
notification ui: remove notification groups

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
6 months agonotification ui: remove filter setting for targets
Lukas Wagner [Tue, 14 Nov 2023 12:59:45 +0000 (13:59 +0100)]
notification ui: remove filter setting for targets

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
6 months agonotification ui: add target selector for matcher
Lukas Wagner [Tue, 14 Nov 2023 12:59:44 +0000 (13:59 +0100)]
notification ui: add target selector for matcher

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
6 months agoform: displaye-edit: add one of the two missing returns
Thomas Lamprecht [Fri, 17 Nov 2023 14:00:30 +0000 (15:00 +0100)]
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>
6 months agoapi-viewer: implement basic oneOf support
Dominik Csapak [Thu, 16 Nov 2023 15:21:52 +0000 (16:21 +0100)]
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>
6 months agobump version to 4.1.0
Thomas Lamprecht [Tue, 14 Nov 2023 08:11:27 +0000 (09:11 +0100)]
bump version to 4.1.0

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
6 months agocombogrid: initialze value with [] by default
Dominik Csapak [Wed, 19 Jul 2023 12:11:09 +0000 (14:11 +0200)]
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>
6 months agoapt: drop ChangeLogUrl
Fabian Grünbichler [Tue, 4 Jul 2023 09:45:06 +0000 (11:45 +0200)]
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>
6 months agowindow/FileBrowser: enable tar button by default
Dominik Csapak [Thu, 19 Oct 2023 09:13:55 +0000 (11:13 +0200)]
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>
6 months agoDiskList: render osdid-list if present
Aaron Lauterer [Tue, 22 Aug 2023 09:04:56 +0000 (11:04 +0200)]
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>
6 months agofix #4442: Extend LogView for firewall datetime filtering
Christian Ebner [Wed, 9 Aug 2023 10:55:27 +0000 (12:55 +0200)]
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>
6 months agofix #4442: adapt DateTimeField to be more declarative
Christian Ebner [Wed, 9 Aug 2023 10:55:26 +0000 (12:55 +0200)]
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>
6 months agopanel: sendmail edit: don't translate 'Proxmox VE' in author field
Lukas Wagner [Mon, 9 Oct 2023 14:15:16 +0000 (16:15 +0200)]
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>
6 months agoschema: endpoint types: don't translate endpoint type names
Lukas Wagner [Mon, 9 Oct 2023 14:38:29 +0000 (16:38 +0200)]
schema: endpoint types: don't translate endpoint type names

... that are not really translatable.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
6 months agoutils: fix trailing comma
Thomas Lamprecht [Tue, 31 Oct 2023 20:47:12 +0000 (21:47 +0100)]
utils: fix trailing comma

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
6 months agotext field: add trimValue config
Thomas Lamprecht [Tue, 24 Oct 2023 11:58:04 +0000 (13:58 +0200)]
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>
6 months agoutils: code style cleanup/reduction
Thomas Lamprecht [Tue, 24 Oct 2023 11:57:39 +0000 (13:57 +0200)]
utils: code style cleanup/reduction

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
7 months agobump version to 4.0.9
Thomas Lamprecht [Tue, 3 Oct 2023 08:40:11 +0000 (10:40 +0200)]
bump version to 4.0.9

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
7 months agoparser: split checking IMG and A tags, make the latter more strict
Thomas Lamprecht [Tue, 3 Oct 2023 07:43:47 +0000 (09:43 +0200)]
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>
7 months agoparser: make it clearer that we mark HTTP-like URLs always as safe
Thomas Lamprecht [Tue, 3 Oct 2023 06:44:02 +0000 (08:44 +0200)]
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>
7 months agoparser: use safer mechanism for allowing URLs
Thomas Lamprecht [Tue, 3 Oct 2023 06:37:34 +0000 (08:37 +0200)]
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>
7 months agoparser: factor out getting lower-case canonical tag name
Thomas Lamprecht [Tue, 3 Oct 2023 06:27:22 +0000 (08:27 +0200)]
parser: factor out getting lower-case canonical tag name

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
8 months agonotification config view: add missing parameter for Ext.String.format
Lukas Wagner [Mon, 18 Sep 2023 09:49:43 +0000 (11:49 +0200)]
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>
8 months agosendmail edit panel: fix using gettext with parameter
Thomas Lamprecht [Thu, 14 Sep 2023 06:14:25 +0000 (08:14 +0200)]
sendmail edit panel: fix using gettext with parameter

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
8 months agonotification config view: fix using gettext with parameter
Thomas Lamprecht [Wed, 13 Sep 2023 16:17:07 +0000 (18:17 +0200)]
notification config view: fix using gettext with parameter

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
8 months agonotification config view: fix using gettext with parameter
Thomas Lamprecht [Wed, 13 Sep 2023 16:15:09 +0000 (18:15 +0200)]
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>
8 months agobump version to 4.0.8
Thomas Lamprecht [Wed, 13 Sep 2023 15:16:06 +0000 (17:16 +0200)]
bump version to 4.0.8

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
8 months agoutils: language map: add entry for Croatian translation
Thomas Lamprecht [Wed, 13 Sep 2023 15:05:03 +0000 (17:05 +0200)]
utils: language map: add entry for Croatian translation

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
8 months agoauth: ldap: openid: use proxmoxtextfield for comment
Lukas Wagner [Tue, 18 Jul 2023 11:57:07 +0000 (13:57 +0200)]
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>
8 months agofix #4951: accept undefined as value for the MultiDiskSelector
Dominik Csapak [Thu, 7 Sep 2023 12:18:05 +0000 (14:18 +0200)]
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>
8 months agofix #4531: acme plugins: correct change detection of dirty form fields
Filip Schauer [Wed, 30 Aug 2023 11:57:44 +0000 (13:57 +0200)]
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>
8 months agoutils: Remove outdated url in comment
Christian Ebner [Fri, 11 Aug 2023 10:43:54 +0000 (12:43 +0200)]
utils: Remove outdated url in comment

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
9 months agobump version to 4.0.7
Wolfgang Bumiller [Wed, 16 Aug 2023 08:43:13 +0000 (10:43 +0200)]
bump version to 4.0.7

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
9 months agonotification: add ui for managing notification filters
Lukas Wagner [Thu, 3 Aug 2023 12:17:18 +0000 (14:17 +0200)]
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>
9 months agonotification: allow to select filter for notification targets
Lukas Wagner [Thu, 3 Aug 2023 12:17:17 +0000 (14:17 +0200)]
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>
9 months agonotification: add gui for notification groups
Lukas Wagner [Thu, 3 Aug 2023 12:17:16 +0000 (14:17 +0200)]
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>
9 months agonotification: add gui for gotify notification endpoints
Lukas Wagner [Thu, 3 Aug 2023 12:17:15 +0000 (14:17 +0200)]
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>
9 months agonotification: add gui for sendmail notification endpoints
Lukas Wagner [Thu, 3 Aug 2023 12:17:14 +0000 (14:17 +0200)]
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>
9 months agocertificates: delete: Fix a typo
Filip Schauer [Mon, 14 Aug 2023 10:13:06 +0000 (12:13 +0200)]
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>
9 months agoutils: add entry for Georgian translation
Thomas Lamprecht [Thu, 3 Aug 2023 14:31:35 +0000 (16:31 +0200)]
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>
9 months agofix #4874: improve error message for invalid hostname
Amin Vakil [Thu, 3 Aug 2023 01:04:13 +0000 (04:34 +0330)]
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>
9 months agoui: add some missing `htmlEncode`s
Friedrich Weber [Tue, 25 Jul 2023 11:52:45 +0000 (13:52 +0200)]
ui: add some missing `htmlEncode`s

Signed-off-by: Friedrich Weber <f.weber@proxmox.com>
10 months agobump version to 4.0.6
Thomas Lamprecht [Mon, 26 Jun 2023 18:25:01 +0000 (20:25 +0200)]
bump version to 4.0.6

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
10 months agowindow: ldap auth edit forbid specifying a bind_dn without a password
Stefan Sterz [Mon, 26 Jun 2023 09:39:16 +0000 (11:39 +0200)]
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>
10 months agotry using 'pve-eslint' if it exists
Dominik Csapak [Fri, 23 Jun 2023 07:08:45 +0000 (09:08 +0200)]
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>
11 months agobump version to 4.0.5
Thomas Lamprecht [Fri, 16 Jun 2023 13:58:33 +0000 (15:58 +0200)]
bump version to 4.0.5

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
11 months agowindow: addtotp: Increase the size of the quiet zone
Maximiliano Sandoval [Tue, 13 Jun 2023 13:32:22 +0000 (15:32 +0200)]
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>
11 months agoapt repositories: add production ready warnings for Ceph repositories
Fiona Ebner [Fri, 16 Jun 2023 13:42:35 +0000 (15:42 +0200)]
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>
11 months agoutils: add Українська - Ukrainian to language map
Thomas Lamprecht [Wed, 14 Jun 2023 12:18:55 +0000 (14:18 +0200)]
utils: add Українська - Ukrainian to language map

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
11 months agobump version to 4.0.4
Thomas Lamprecht [Fri, 9 Jun 2023 15:29:54 +0000 (17:29 +0200)]
bump version to 4.0.4

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
11 months agoapt repositories: avoid potential type error in classifyOrigin helper
Fiona Ebner [Fri, 9 Jun 2023 14:16:26 +0000 (16:16 +0200)]
apt repositories: avoid potential type error in classifyOrigin helper

with undefined (or otherwise falsy) argument.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
11 months agoapt repositories: fix typo for getting the default unknown text
Fiona Ebner [Fri, 9 Jun 2023 14:16:25 +0000 (16:16 +0200)]
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>
11 months agobump version to 4.0.3
Thomas Lamprecht [Fri, 9 Jun 2023 06:07:45 +0000 (08:07 +0200)]
bump version to 4.0.3

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
11 months agotfa: show 'Locked' in 'Enabled' column if tfa is locked
Wolfgang Bumiller [Tue, 6 Jun 2023 10:03:18 +0000 (12:03 +0200)]
tfa: show 'Locked' in 'Enabled' column if tfa is locked

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
11 months agotfa: improve UX for recovery keys and when none are left
Wolfgang Bumiller [Tue, 6 Jun 2023 10:03:17 +0000 (12:03 +0200)]
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>
11 months agoapt repositories: detect mixed suites before major upgrade
Fiona Ebner [Mon, 5 Jun 2023 15:43:12 +0000 (17:43 +0200)]
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>
11 months agoapt repositories: just ignore unknown info rather than throwing an error
Fiona Ebner [Mon, 5 Jun 2023 15:43:10 +0000 (17:43 +0200)]
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>
11 months agoapt repositories: add classifyOrigin helper
Fiona Ebner [Mon, 5 Jun 2023 15:43:11 +0000 (17:43 +0200)]
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>
11 months agodate time field: fixup syntax error
Thomas Lamprecht [Wed, 7 Jun 2023 15:16:27 +0000 (17:16 +0200)]
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>
11 months agoapt repositories: actually ignore ignore-pre-upgrade-warning
Fiona Ebner [Mon, 5 Jun 2023 15:43:09 +0000 (17:43 +0200)]
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>
11 months agotoolkit/utils: fix whitespace
Max Carrara [Wed, 15 Mar 2023 16:26:28 +0000 (17:26 +0100)]
toolkit/utils: fix whitespace

Signed-off-by: Max Carrara <m.carrara@proxmox.com>
11 months agotoolkit/utils: set SameSite attr of auth cookie to 'strict'
Max Carrara [Wed, 15 Mar 2023 16:26:27 +0000 (17:26 +0100)]
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>
11 months agoDateTimeField: Extend and refactor to make field value bindable
Christian Ebner [Thu, 23 Mar 2023 14:42:02 +0000 (15:42 +0100)]
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>
11 months agoform: date time field: add alias for backward compat
Thomas Lamprecht [Tue, 6 Jun 2023 14:43:56 +0000 (16:43 +0200)]
form: date time field: add alias for backward compat

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
11 months agoDateTimeField: fix typo in xtype
Christian Ebner [Thu, 23 Mar 2023 14:42:01 +0000 (15:42 +0100)]
DateTimeField: fix typo in xtype

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
11 months agobump version to 4.0.2
Thomas Lamprecht [Sat, 3 Jun 2023 11:15:09 +0000 (13:15 +0200)]
bump version to 4.0.2

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
11 months agomarkdown parser: allow setting target tag for links
Thomas Lamprecht [Sat, 3 Jun 2023 11:07:54 +0000 (13:07 +0200)]
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>
11 months agofix #4756: markdown notes: allow any valid URL for a tags
Thomas Lamprecht [Sat, 3 Jun 2023 10:25:36 +0000 (12:25 +0200)]
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>
11 months agomarkdown parser: normalize tag names and protocol for check
Thomas Lamprecht [Sat, 3 Jun 2023 10:33:48 +0000 (12:33 +0200)]
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>
11 months agomarkdown parser: correctly remove src & href attribute if not valid URL
Thomas Lamprecht [Sat, 3 Jun 2023 11:04:14 +0000 (13:04 +0200)]
markdown parser: correctly remove src & href attribute if not valid URL

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
11 months agoship a minified version of the widget-toolkit JS library
Thomas Lamprecht [Sat, 3 Jun 2023 10:36:59 +0000 (12:36 +0200)]
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>
11 months agobuildsys: avoid whitespace in build info heading
Thomas Lamprecht [Sat, 3 Jun 2023 10:35:42 +0000 (12:35 +0200)]
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>
11 months agobump version to 4.0.1
Thomas Lamprecht [Thu, 1 Jun 2023 14:35:36 +0000 (16:35 +0200)]
bump version to 4.0.1

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
11 months agofix #4551: ui: translate byte unit in `format_size`
Noel Ullreich [Thu, 6 Apr 2023 11:38:06 +0000 (13:38 +0200)]
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>
11 months agoparser: adapt to new marked Markdown renderer calling convention
Thomas Lamprecht [Thu, 1 Jun 2023 14:03:57 +0000 (16:03 +0200)]
parser: adapt to new marked Markdown renderer calling convention

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
11 months agotfa: paperkey: cleanup iframes for printing after window close
Aaron Lauterer [Mon, 3 Apr 2023 12:28:49 +0000 (14:28 +0200)]
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>
11 months agobuildsys: expand clean target
Thomas Lamprecht [Thu, 25 May 2023 08:27:10 +0000 (10:27 +0200)]
buildsys: expand clean target

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
11 months agobump version to 4.0.0
Thomas Lamprecht [Thu, 25 May 2023 08:15:45 +0000 (10:15 +0200)]
bump version to 4.0.0

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
11 months agod/control: raise compat level to 13
Thomas Lamprecht [Thu, 25 May 2023 08:15:32 +0000 (10:15 +0200)]
d/control: raise compat level to 13

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>