Commit Graph

739 Commits

Author SHA1 Message Date
Dominik Csapak
39c926d051 login view: don't show save username field in quarantineview
like we had before, this is a regression from the recent oidc changes.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2025-02-27 10:40:12 +01:00
Dominik Csapak
af75134834 login view: hide realm selector on quarantine view
when we target the quarantine view, we don't want to show the realm
field, since the only valid users here are from LDAP and that is not a
realm in that sense.

We do this by moving the realmfield hide/disable up before the
autologin, but after the targetview check.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2025-02-27 10:40:12 +01:00
Dominik Csapak
cb73249d64 login view: fix realm change handler
record here can also be 'null', so it's not enough to check for
undefined. While at it, change the statement to conform to our style
guide.

This also fixes the quarantine link popup, because an exception in
a change handler interrupts normal extjs operation, which leads
to an invalid extjs state here.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2025-02-27 10:40:12 +01:00
Dominik Csapak
b3a7e3e5e4 login view: change formula name as per our style guide
use camelCase instead of snake_case

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2025-02-27 10:40:12 +01:00
Fiona Ebner
2187f3dcb8 quarantine view: improve wording for the text in the help window
In particular, align the descriptions for whitelist/blacklist and
avoid referring to the rather unspecific "the mail" and
"the messages" there.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
Reviewed-By: Alexander Zeidler <a.zeidler@proxmox.com>
2025-02-26 21:19:45 +01:00
Markus Frank
d4d778ceb9 user: add realm field for user creation
Signed-off-by: Markus Frank <m.frank@proxmox.com>
2025-02-26 20:08:38 +01:00
Markus Frank
4b4f0125ed add realms panel to user management
Make the realm configuration available in PMG and disable LDAP/AD
realms for now and use the name oidc instead of openid.

Signed-off-by: Markus Frank <m.frank@proxmox.com>
2025-02-26 20:08:38 +01:00
Markus Frank
4a5079c806 login: add option to login with OIDC realm
By adding a viewModel with an oidc variable, the username & password
fields are disabled/hidden when an OIDC realm is selected.

Signed-off-by: Markus Frank <m.frank@proxmox.com>
2025-02-26 20:08:38 +01:00
Dominik Csapak
693821d36b dkim selector view: fix viewing larger DKIM TXT records
It seems the 'grow' feature of the textarea only works properly on user
input, not when automatically filling it with data. So instead of trying
to do that, which only ever clipped the record if it was too large,
simply use a fixed size that is enough for 4096 bit sized keys and show
a scrollbar for larger ones.

With having a fixed height, and horizontal resizing a textarea also not
working properly in an edit window, prevent the whole window from
resizing.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2025-02-26 17:19:47 +01:00
Maximiliano Sandoval
d1cf7b2fb2 user edit: increase minimum length for new passwords to 8 characters
This follows current NIST recommendations and only impacts new
passwords. We rolled out similar changes in pve-manager [0] and the
installer [1] already.

[0]: https://git.proxmox.com/?p=pve-manager.git;a=commit;h=421f03779a3cf04fc15c3efdb6ae99197a858e7d
[1]: https://git.proxmox.com/?p=pve-installer.git;a=log;h=2be676622e57c9c57caf2765dc4d5e3d64b7ccc7

Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
 [TL: commit message style nits and add slightly more context]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-02-26 13:45:02 +01:00
Thomas Lamprecht
bc4350a654 html-encode more text-based object-grid rows
To avoid visual glitches that can happen if a text value is wrongly
interpreted as html. And while quite a few rows already had a rather
restricted format that avoided this in the first place it still
doesn't hurt to encode anyway, that also protects against the case
where a backend format becomes less restrictive in the future.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-02-26 11:38:31 +01:00
Thomas Lamprecht
0012b5d8a2 fix indentation and code style for various Options grid
Line-count increases but that small cost is easily covered by easier
to read code and better git change tracking, which is shown line-wise
by default.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-02-26 11:36:57 +01:00
Dominik Csapak
d6ab21faf4 system options: html encode 'admin-mail-from' field
Since the value of the 'admin-mail-from' field has normally a format
like "Full Name <some@email.example>" the <..> part would be
incorrectly interpreted as HTML without encoding it, causing visual
glitches here.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-02-26 10:57:58 +01:00
Hannes Laimer
152a8d382f ui: allow 'info' field to be shown in object lists
Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
2025-02-25 21:30:35 +01:00
Thomas Lamprecht
b81827a36d user quarantine: slightly rework help text and style
Use the semantic html kbd tag [0] for the keyboard short cut and style
it color-scheme agnostic, which was adapted from the style we use in
our PVE wiki.

[0]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/kbd

Additionally to some small rewording and touch up of the text and
slightly increase the font-size.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-02-25 21:27:24 +01:00
Stoiko Ivanov
c1e525e497 fix #4311: add quarantine help-page for end-users
Having a short explanation of what the quarantine interface provides,
in the end-user interface should help users who wonder why they get
mails from some system, and what quarantine means. Instead of adding
this to the regular documentation and linking it in the top-bar as we
do in the admin-view having a short description directly rendered on
the main panel should increase the chances of it getting read.

the code is inspired by the notesview (I found it when clicking
through a PBS system of mine looking for how to address this).

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2025-02-25 20:06:20 +01:00
Stoiko Ivanov
e438dda66f configuration: options: add admin-mail-from row.
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2025-02-25 18:28:31 +01:00
Stoiko Ivanov
d017b7bb33 fix #2709: rules: match-field: add top-level-only checkbox
Tested-by: Dominik Csapak <d.csapak@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
Tested-by: Friedrich Weber <f.weber@proxmox.com>
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2025-02-21 18:23:08 +01:00
Stoiko Ivanov
f4b2213ed0 rules/content-typefilter: add checkbox for file content only matching
Tested-by: Dominik Csapak <d.csapak@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
Tested-by: Friedrich Weber <f.weber@proxmox.com>
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2025-02-21 18:23:08 +01:00
Stoiko Ivanov
918bfd5b94 rules/object: remove icon from remove button
the icons were introduced to the listing, and it seems their rendering
when removing was not noticed - w/o this the message is e.g.:
"Are you sure you want to remove entry
'<span class="fa-fw fa fa-file-image-o'"></span> Content Type Filter:
..."

Fixes: ea4f2a7 ("add icons to the object types")

Tested-by: Dominik Csapak <d.csapak@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
Tested-by: Friedrich Weber <f.weber@proxmox.com>
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2025-02-21 18:23:08 +01:00
Dominik Csapak
1578076b70 mail queue: html encode fields in renderer
so we show the content as it was set by the backend.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2024-12-14 14:15:00 +01:00
Stoiko Ivanov
f9d006adc2 utils: fix typo in default notification body
reported in our community forum:
https://forum.proxmox.com/threads/.153492/

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2024-08-29 14:14:54 +02:00
Maximiliano Sandoval
e4fc927b7d fix #5251: login: set autocomplete on password and user
Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
2024-04-23 17:22:18 +02:00
Stefan Sterz
bf2ecac32c ui: trim whitespaces when adding a subscription key
users that add the correct subscription key just get unnecessarily
confused with a "value does not match the regex pattern" error if
they accidentally have a stray whitespace at the end or beginning
otherwise.

Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
2024-03-01 11:38:52 +01:00
Thomas Lamprecht
4a2fbe7ce8 dkim settings: improve label for signing domain source selection
And make the renderer be less noise w.r.t. coding style while at it.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-02-28 11:09:49 +01:00
Dominik Csapak
3f8d645783 dashboard: implement columns browser setting
like we do it e.g. for the node status

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2024-02-27 15:03:59 +01:00
Thomas Lamprecht
eb0a11182d user management: separate add/create and edit/remove buttons
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-02-27 14:58:23 +01:00
Thomas Lamprecht
536eb6e543 spam detector: custom rules: move apply/revert buttons to pending section
Move the buttons for applying or reverting pending changes into the
top bar of the pending changes diff panel, as then they are closer to
what they control and also only shown when relevant.

Drop the odd hint w.r.t. restarting pmg-smtp-filter from the top-bar,
as we can convey that better in the prompt, where there is already a
check-box that defaults to restarting that service.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-02-27 14:41:35 +01:00
Thomas Lamprecht
11bd23b8c9 spam detector: custom rules: consitent add/edit/remove button & modernization
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-02-27 14:41:17 +01:00
Thomas Lamprecht
216711f13c mail proxy: networks: consitent add/edit/remove button & modernization
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-02-27 13:55:47 +01:00
Thomas Lamprecht
a554911702 mail proxy: transports: consitent add/edit/remove button
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-02-27 13:47:44 +01:00
Thomas Lamprecht
9436a5037c mail proxy: relay domains: consitent add/edit/remove button
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-02-27 13:47:28 +01:00
Thomas Lamprecht
5b13e123ae mail proxy: tls destinations: consitent add/edit/remove button
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-02-27 13:47:06 +01:00
Thomas Lamprecht
ce33f608c6 object groups: consistent add/edit/remove button
Group and separate the actions that create or add new elements from
the ones that edit or remove exiting ones.

Throw in some slight refactoring and code modernization while at it.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-02-27 12:56:06 +01:00
Dominik Csapak
758ddf0639 objects: add separator between match field selector and description
Make it easier to see that match-field selector and its description
are separate. For that we have to make the top level docked item a
'toolbar'.

Reported-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2024-02-27 11:45:22 +01:00
Maximiliano Sandoval
443e7de1f4 utils: anchor regex expression
Without anchoring this would match for example `a@b/c`.

Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
2024-02-27 10:21:38 +01:00
Thomas Lamprecht
a2afe563da dashboard: show ten of the current top receiver
not only five, as with the higher panels we already got enough space,
as one row needs roughly 24 px, lower top/bottom padding a bit to get
~242 of space, fitting ten entries nicely.

The performance aspect should not matter much, getting five or ten
entries from a DB like PostgreSQL is really not costing much,
especially as with the count query in use the hard work has already
been done anyway.

Makes the top-receiver panel look a bit more coherent compared to the
node info one beside it.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-02-26 17:25:54 +01:00
Thomas Lamprecht
95288fa867 dashboard: increase height of node-info and top-receiver panel to 300
Now that the node info one got another row we can use a bit more space
to avoid that it feels to crammed.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-02-26 17:02:25 +01:00
Thomas Lamprecht
505f5d7fbc dashboard: show boot-mode information
Add a extra row for showing the current boot mode, for that we need to
grow the height of the status panel and graphs to have enough space
again.

Mirrors commit 1f1d8bf3 ("ui: node summary: add boot-mode
information") from pve-manager.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-02-26 16:19:19 +01:00
Thomas Lamprecht
378a1024cb dashboard: reduce noise in current kernel version
use the new 'current-kernel' object returned by the node status API to
render a more usable (less noise) version information.

Keep fallback for old one to better work with upgrades (major and
minor) to this version in a cluster, where the web UI one uses might
be the new one, but a node one looks at still have the old API daemon.

Mirrors commit be04f8ee ("ui: node summary: reduce noise in current
kernel version") and commit 4fb7e9e4 ("fix #5121: ui: node status:
avoid invalid array access for certain foreign kernels") from
pve-manager.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-02-26 16:17:12 +01:00
Maximiliano Sandoval
9d89cc9073 fix #2971: DKIM: add gui setting to use From header when signing
Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
2024-02-26 16:42:52 +01:00
Dominik Csapak
a64bf633bd disclaimer edit: add 'add-separator' checkbox
for controlling if the separator should be included or not, default is
on (backend default).

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
 [ TL: explicitly submit unchecked value ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-02-22 16:58:44 +01:00
Dominik Csapak
99593c8571 disclaimer edit: add position comobobox
to enable setting the disclaimer position

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2024-02-22 16:34:37 +01:00
Dominik Csapak
107844176f objects: use font-weight for bold text
mdn[0] recommends using `font-weight: bold;` for making the text actually bold
While it has the same effect often, it depends on the font and browser
if the font is rendered bold in a <b> tag.

0: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/b

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2024-02-22 15:37:40 +01:00
Dominik Csapak
1f8397216a objects: don't reload on match mode change
instead update the record of the object list, and update the
visibility of the 'whatWarning'

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Tested-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2024-02-22 14:55:34 +01:00
Dominik Csapak
e3c8d4fd63 rules/objects: add mode selector dropdown
for objects and object types in rules. We add a simple dropdown for
the 'and' and 'invert' flags, to be somewhat consistent with the
notification matchers from pve and to make the wording more clear than
simple and/invert.

For What matches add a special warning hint, since that behaves a bit
special because of the mail parts.

When the mode changes for an object group, we reload the list of
objects since that holds the info about the attributes, so to avoid
having to keep track in the gui which field changed on the group, we
simply reload the list with the current information.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Tested-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2024-02-22 14:54:44 +01:00
Dominik Csapak
60875e2d74 rules: use tree panel instead of grouping feature of the grid
just in preparation for adding a column for the groups
will look similar (though not identical) to before, but this makes
the groups now real entries in the grid, which means we can have
content in additional columns

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Tested-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2024-02-22 14:54:16 +01:00
Thomas Lamprecht
318a58e2fb form: filter field: code cleanups
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-02-21 18:05:14 +01:00
Dominik Csapak
4703989ab1 fix #4510: add filter box to many grids
namely relay domains, transports, trusted networks, smtp whitelist +
when/what/who object grids.

Adds a new 'FilterField', that takes a store and a list of columns to
filter, and filters on every change.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2024-02-21 17:57:47 +01:00
Maximiliano Sandoval
1e8cfaf399 fix #4818: Revert "UserEdit: add minLength of 4 to username field"
So we match pmg-api.

This reverts commit 40ced6648d.

Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
2024-02-14 00:04:12 +01:00