The rule names ain't _that_ long and it looks a bit better if name
and value are closer together
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
based on the color of the recent patch add a darker and lighter level
for both, good and bad.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
sorting the matching spam rules, e.g. by score, makes it easier to see
which rules have more weight in determining spam.
Additionally, color code the scores with colors akin to the rationale
in commit:
365f84c ("quarantines: color code deliver and delete buttons")
(red for positive spam scores, blue for negative ones)
and increase the font-weight for large spamscore contributing rules.
i chose a different blue tone that is more muted than what we use in
'info-blue' but is different from both the 'hover' color and the
'selected' color
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
By making use of the optional chaining operator, we don't need to
override the 'onSelectMail' in both the attachment quarantine and the
spam quarantine. Instead, we opportunistically call lookup(id)?.setID
in the common handler for both, the attachments and the spaminfo
references.
As that was the single change from the parent class we can now drop
the specialized controller classes.
While at it, remove the stray 'xtype' property of the quarantine
controller, which make only sense for component derived classes.
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
[T: fix typos and reword message a bit]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
fixes#1674 (the comment about multiselect for the virus quarantine)
fixes#3947 (multiselect for attachment quarantine)
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
over the time the spam quarantine has gained quite a few nice
usability improvments and features, which would be useful in
the virus and attachment quarantines as well - e.g.:
* multi-mail selection
* keyboard actions
* context menu
* download mail as .eml
this patch splits the controller part into a file of its own, while changing
'var' to 'let' and removing the parts only relevant for the spamquarantine
and adapts the current SpamQuarantine.js to use it.
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
left over from initially trying out different stuff
meh, would be a lot simpler if there weren't a 5 copies or so from
that stuff.
Reported-by: Stoiko Ivanov <s.ivanov@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
In some languages, e.g. widely used English, "Delete" and "Deliver"
are looking rather similar without too much eye squinting required.
Add an accent on their icons using for, at least in the western
hemisphere, the respective associated color, like red for trash can.
To 1) avoid to much messing with those cultures that got it switched
and 2) some more common color blindness use blue for the delivery
button, just to make it stand out.
Keep the white/black list as is, as such accents work best if not
everything uses them, i.e., so that they more common options actually
stand out.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
extends on the improvements from the previous commit, reduces code
lines while (hopefully, as slightly subjective) not reducing
readability
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
the attachment and virus quarantines contain all quarantined mail for
all recipients - so we should display which mail is being
delivered/deleted - mostly if a mail is sent to multiple addresses
served by the same PMG.
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
The `ACME` panel may be rendered out of sight (overflow) when there
are enough SANs on the upper `Certificates` panel to push it down
enough and the browser/display height is too small.
Enable the `scrollable` config for the parent certificate view panel
in the y-axis (vertical) to make ExtJS automatically add a scrollbar
if the content overflows. Avoid enabling it for the x-axis too as
that breaks reflow of the layout if the browser window gets resized.
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
[T: fix commit message to one from manager]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
by limiting the store of the day selector by the selected month
reported by a user in the forum:
https://forum.proxmox.com/threads/wrong-calendar.111631/
Reviewed-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
To have a visual feedback about the actions, similar to the swipe
buttons in the quarantine list view. Single difference is that the
default color is grey for swipe buttons and blue for the "normal"
ones, so the whitelist one got different colors, but each fit in
their context somewhat...
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
the change to the rust based subscription code change the case of the
status field, so do the same change as in the desktop ui
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
mostly by s/Regular Expression/Regex/ and transforming some
checkboxes' fieldLabel into boxLabels
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
restructure the existing field positions a bit to make it more
balanced with the new NS field.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
similar in spirit of PVE's storage entries for PBS, changing those
after create can make backups disappear and just shouldn't be done,
user should add a new remote instead.
Same for user name, changing it will make backup almost definitively
fail the owner check, so only keep the password field, for PW
rotations (we should disable it for tokens though).
For UX it's better to check if params are correct and the repo is
accessible on create and to add scan datastore and namespace
endpoints to allow a friendlier selection of those, avoiding typos.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Ext.util.Sorter does not have an 'order' property, so 'order: DESC'
didn't have an effect. The default is 'ASC' and it is arguably the
preferred direction for all affected sorters anyways.
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
Allows an user to actually see what the current state is and wastes
less space for the actual header view.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Showing the sender and subject is sufficient in the case of the
spam-quarantine - when viewed by a single user.
If an admin views any of the quarantines the information of the
recipient should be helpful in general, but is needed in case a mail
was sent to multiple recipients.
Reported in our community forum:
https://forum.proxmox.com/threads/.103276/
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
so that we can reuse the saved one and the admin does not have
to enter the password on each config change (similar to PVE).
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
The default changed sometimes between ExtJS 6.0.1, which used 'br',
and ExtJS 7.0, which has 't' (top) as new default.
So set it explicitly to the previous used one, less intrusive and was
intended to be there.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Like we did in PBS, which has a very similar GUI structure as PMG.
Rationale is that the network panel is flexed and thus normally the
biggest, while DNS and time are fixed and short, and an inverted
pyramid, height-wise, looks a bit off as layout.
Also network will show the pending changes at the bottom, which is
nicer if its really at the bottom of the view.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
undefined is used as delete when set to a normal data-path of a view
model, so, we need an actual defined value here as else we cannot
decide if the view model was ever initialized or not.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Essentially the same as in PBS, but needed to use 'rootfs' instead of
'root' for the disk usage, avoid 'cpu' as an itemId (already used by
the cluster resources), and get rid of the fingerprint button. Also
added the link to the repositories panel like in Dominik's pending
patch for PBS.
Rename the existing resources panel to clarify what it actually is.
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
like we have in pbs/pve but only for non-quarantine view
we have to increase the width of the window, so it fits together
with the 'send quarantine link' button
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
like we do in pve and pbs
for now the user cannot change the preferred columns and the default is 'auto'
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Similar like we did for Proxmox VE's manager. The main title and
version should stand a bit more out compared to simple nav/button
texts.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
in extjs 7.0 the css changed slightly so that we need to define
the 'fit' layout explicitely to maintain the full width/height
otherwise it can happen that the iframe gets cut off
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
this patch adds the cleanup for the attachment quarantine from
0e26e20aa5 to the virus- and
spamquarantine.
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
This fixes a UX regression stemming from the recently introduced
commit 9aed379a70
"spam quarantine: avoid full store reload on single-element actions"
A load restored the saved selection after load complete, with the
neat and very useful feature to jump to the next in line if the old
one did not exist anymore.
Call this now factored out code part ourself in the fast-path.
This was reported in the forum:
https://forum.proxmox.com/threads/proxmox-mail-gateway-6-4-released.86760/#post-380971
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
A store load may require several seconds to complete, which can get
frustrating fast.
For single actions we have a callback which gets only executed on a
successful API call, so we can just remove the entry there directly
from the in-memory store.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
With ~20 bytes per message-id and separator we get over the current
HTTP post size limit of 64 KiB with ~ 3200 messages.
As 2500 is a relatively nice number for humans to deal with rather go
for that one, that leaves also some room for potential longer IDs in
the future.
Send the batches of async in pairs, as with that the pmgproxy can
still cope well and is not overloaded.
Mask the whole list panel with a 'Processing...' loading-mask during
sending of requests affecting multiple messages, so that the user
gets some instant visible feedback that something is actually
happening (the api calls may return only after a few seconds).
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
If the API call returned more than one pmail entry, inject an "all"
entry which, if selected, drops the user parameter and loads the
quarantine mails of all users from the backend.
The webinterface has only some issues regarding deselection (all in
the grid header or if we need to deselect due to the search filtering
out some elements) - for that the underlying issue was found and a
widget toolkit patch was provided.
The rest seems now pretty performant, albeit more than a few 100k
mails may become a problem here. But, in such big setups the mail
admin won't tinker to much whith the users mail anyway, if they are
even alowed to do so depending on their jurisdictions privacy laws
and companies privacy policy.
So, basically this is more for evaluation or for smaller setups but
got quite often requested, and as there's not more data
exposed/returned then already available I see no real argument
against it.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Deselect those entries which got filtered out, to avoid doing
some action (delete, deliver) on hidden records.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
the for development designed incremental lint target is still non
strict, and allows warnings allowing less interrupted dev workflow
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
by creating an edit-window when clicking on the respective Backup now
button.
This is the second part of the enhancement request
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
the new /statistics/detail api calls takes the type (contact, sender,
receiver) and address for which to display the statistics as explicit
parameter instead of path-component.
This makes it possible to accept '/' as part of an e-mail address
which is allowed (in the local-part by RFC5322 [0], and accepted by
postfix.
[0] https://tools.ietf.org/html/rfc5322
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
if the template has 'quarantinelink' enabled, we
show a button 'Request Quarantine Link' on the quarantine login ui
there a user can enter their e-mail and request a link to the quarantine
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
we cannot have xtype nor cbind in the defaults, as moving xtype there
breaks our cbind "when to stop descendant+apply" heuristic and cbind
cannot be moved there as it'd be only copied over by initComponent
and that happens later than the cbind apply step.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
The PBSConfig panel enables creation/editing/deletion of PBS instances.
Each instance can lists its snapshots and each snapshot can be restored
Inspired by the LDAPConfig panel and PBSEdit from pve-manager.
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
by moving the item definition to initComponent, and changing the check
for a provided filename, we can reuse the window for restores from PBS
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
Move it away from the tab list in the Configuration entry to a submenu in
preparation for adding PBS integration
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
the regular expression field is not necessarily after the regex tester
(mostly it is before). In order to be more robust, use the child
method of the parent window instead of previousSibling of the button.
The child method gets any direct descendant matching the query, the
sibling one is always directional and there's no method for "any
sibling".
Tested with:
* mailproxy whitelist
* match field
* match filename
* who object
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
Since/Until is not quite correct, especially in other languages
(e.g., in German "from" and "to" was translated to "Von" and "An",
respectively.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
lint the build file, as else eslint does not has the full picture.
Add a prelude to define globals once at the top
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
The mailq results are potentially very large, why a BufferedStore is used.
BufferedStores only support [0] remote filtering (which is already done) and
remote sorting (which this patch enables).
simpleSortMode (getting sortfield and sortdirection as two parameters instead
of an array with multiple objects containing those fields), is enabled to
work with our API.
[0] quite naturally, since you'd need to have the complete result to sort it,
however only documented in the source code (and not the reference docs)
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
in the gui, we always expect an end and starttime, the only case
where we do not get this is when the fields are invalid, so bail out
in that case instead of searching
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>