]> git.proxmox.com Git - pmg-gui.git/commit
spam quarantine: batch actions into 2500-sized chunks
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 23 Mar 2021 11:15:56 +0000 (12:15 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 23 Mar 2021 11:26:03 +0000 (12:26 +0100)
commit3168b7f78063880e762c29eb0108ff65af0f551a
treeb5685a7dcd49a977b7c2720444128d34d626271d
parentb61e38d711c5e11d6cbcc55992788b2b8b77df29
spam quarantine: batch actions into 2500-sized chunks

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>
js/SpamQuarantine.js
js/Utils.js