Stefan Sterz [Fri, 1 Mar 2024 09:54:30 +0000 (10:54 +0100)]
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.
Thomas Lamprecht [Tue, 27 Feb 2024 13:41:31 +0000 (14:41 +0100)]
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>
Thomas Lamprecht [Mon, 26 Feb 2024 16:16:30 +0000 (17:16 +0100)]
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>
Thomas Lamprecht [Mon, 26 Feb 2024 15:17:10 +0000 (16:17 +0100)]
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>
Dominik Csapak [Thu, 22 Feb 2024 14:29:41 +0000 (15:29 +0100)]
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.
Dominik Csapak [Thu, 22 Feb 2024 09:14:19 +0000 (10:14 +0100)]
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.
Dominik Csapak [Thu, 22 Feb 2024 09:14:18 +0000 (10:14 +0100)]
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
From a UX perspective flat buttons, i.e. buttons without a frame or
background, are not obviously clickable without an icon.
The choice of icons was taken from the storageSchema map in PVE.Utils
module currently residing in the pve-manager repo.
Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
[TL: clarify where the choice come from and other small nits] Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Thomas Lamprecht [Wed, 28 Jun 2023 09:32:48 +0000 (11:32 +0200)]
user view: disable unlock TFA button initially
set the initial state to disabled and let the selection model, which
is backing the enableFn, handle it when actually selected, like the
other buttons here.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Dominik Csapak [Mon, 26 Jun 2023 14:52:53 +0000 (16:52 +0200)]
fix tracking center with newer proxmox-widget-toolkit
newer widget-toolkit versions did change the DateTimeField a bit, and
now breaks when there is no viewModel anywhere, so add one as a stopgap
fix for now in the tracking center.
the real fix would have to be in DateTimeField itself, probably checking
if there is a bind.
Leo Nunner [Tue, 28 Mar 2023 12:08:21 +0000 (14:08 +0200)]
mail filter: properly html-encode rule names
Rule names were not HTML-encoded in the rule overview. While some
encoding did happen, it was only on the first load for the info panel
on the right hand side, which was overriden as soon as the edit
window was opened/closed again.
The variable binding now gets HTML-encoded automatically, and the
renderer for rule names has been set to Ext.htmlEncode.
Signed-off-by: Leo Nunner <l.nunner@proxmox.com>
[ T: rework commit message a bit (mostly subject) ] Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Christoph Heiss [Mon, 20 Mar 2023 10:35:47 +0000 (11:35 +0100)]
fix #2437: proxy: Add 'TLS Inbound Domains' panel
This panel can be used to configure sender domains for which TLS will be
enforced my postfix. As this takes the usual transport domain format,
either a FQDN or .FQDN (for matching subdomains) can be specified.
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
Stefan Sterz [Thu, 9 Mar 2023 08:01:41 +0000 (09:01 +0100)]
quarantines: add support for a theme toggle
this allows toggling the presentation of the email previews depending
on the current theme. in the default "light" mode the toggle is hidden
to avoid clutter. enable the toggle in other themes to allow switching
back to the original way the email was rendered.
this requires a bump of the widget toolkit. the toolkit provides the
styles necessary for the toggle to work.
Stefan Sterz [Thu, 9 Mar 2023 08:01:26 +0000 (09:01 +0100)]
mobile quarantine: add dark theme support to the mobile quarantine
enable the `autoDarkTheme` option for the mobile quarantine and add
minimal styling to correct the look of the logo and the mail preview
rendering. this makes the quarantine behave like the "auto" theme of
the main gui, it will change it's theme depending on a media query.
Stefan Sterz [Thu, 9 Mar 2023 08:01:05 +0000 (09:01 +0100)]
subscription: remove hard-coded white background
setting the background color in js code adds that property as a style
attribute to the element. that makes it hard to alter later via css
and makes it hard to dynamically change the color e.g. if we want to
add different themes. the background color for this element is white
already anyway, so just remove them here.
Dominik Csapak [Wed, 23 Nov 2022 14:52:22 +0000 (15:52 +0100)]
fix #3287: add recipient filter for virus & attachment quarantines
So that users can filter these quarantine views, e.g. useful if they
have many mails there.
Replaced the emailSelection config with a quarantineType configs
since we want to have different behaviour for different quaratine
types. E.g., we want to show 'all' mails by default for the
virus/attachment quarantine, but not for the spam one.
Thomas Lamprecht [Fri, 11 Nov 2022 17:37:26 +0000 (18:37 +0100)]
attachment grid: move all-parts controls to tbar, transform back to collapsible title
just better ergonomics and I don't think a lot of people will care
about the parts list, especially if the raw email is already visible
anyway.
Also note that while yes, the content-disposition is user
controllable, most (all?) MUAs only show it if set so even
spammers/attackers have it in their interest to set it.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Dominik Csapak [Mon, 7 Nov 2022 14:36:20 +0000 (15:36 +0100)]
attachment grid: default to filtering by content-disposition
Normally, attachments are given the 'content-disposition: attachment'
mime attribute, so we use that to filter the attachments.
But since we're dealing with spam & virus mails here, and that field
is client controlled, give the user a way to toggle the remaining parts
of the mail too.
Added the checkbox in the header part, but that made it necessary to
manually implement the expand/collapse toggle (since the tools are on
the wrong side of the default toggle)
spam quarantine controller: fix args when calling the parent multiSelect
arguments needs to be an array, often we call with all of ours, iow.
using `arguments` which itself is an array already.
Both, manual construction and just a passing `arguments` have their
advantage and disadvantage, e.g., if either the inheriting or
bequesting class becomes more specialized, but most of the time using
`arguments` is more future proof.
Fixes: e66c888 ("quarantine: refactor spamquarantine controller") Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>