Commit Graph

1067 Commits

Author SHA1 Message Date
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
Thomas Lamprecht
60e1c56233 bump version to 4.1.0
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-11-14 09:19:18 +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
1326f771b9 bump version to 4.0.9
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-10-03 10:40:11 +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
4187bffeeb bump version to 4.0.8
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-09-13 17:16:06 +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
Wolfgang Bumiller
49bb8516ed bump version to 4.0.7
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2023-08-16 10:43:13 +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
Thomas Lamprecht
81562cea8d bump version to 4.0.6
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-26 20:25:01 +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
Thomas Lamprecht
589317b094 bump version to 4.0.5
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2023-06-16 15:58:33 +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