mirror of
https://github.com/modoboa/modoboa.git
synced 2026-04-25 17:06:01 +03:00
[PR #8] [MERGED] Feature: score and sorting in quarantine #1949
Labels
No labels
bug
bug
dependencies
design
documentation
duplicate
enhancement
enhancement
enhancement
feedback-needed
help-needed
help-needed
installer
invalid
looking-for-sponsors
modoboa-contacts
new-ui
new-ui
pr
pull-request
pyconfr
python
question
security
stale
webmail
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/modoboa-modoboa#1949
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/modoboa/modoboa/pull/8
Author: @lddubeau
Created: 9/7/2013
Status: ✅ Merged
Merged: 12/3/2013
Merged by: @tonioo
Base:
master← Head:feature/score-and-sorting-in-quarantine📝 Commits (10+)
730af22If a limit is specified, we have to make sure the value is a string before trying to limit it, otherwise the code fails if the value is not a string (e.g. an integer).1a88976jquery.sortable.js is now needed by quarantine.js89da4b0Added everything needed to get the spam score out of the database and be able to sort on it (or any other data presented to the user).18fdda8Added support for sorting the table that is shown to the user.0b5b62dSpecify a default order in the default URL.726e2acPerform the sorting at the SQL level instead of Python.141ad9dReimplemented Quarantine on the basis of Listing.b5c6e90Merge branch 'master' into feature/score-and-sorting-in-quarantine5980925wip: sort spam messages by score.5dd3a4cwip: sort spam messages by score.📊 Changes
25 files changed (+623 additions, -337 deletions)
View changed files
📝
modoboa/extensions/admin/models/alias.py(+7 -3)📝
modoboa/extensions/admin/models/mailbox.py(+11 -0)📝
modoboa/extensions/amavis/general_callbacks.py(+22 -5)📝
modoboa/extensions/amavis/lib.py(+34 -0)📝
modoboa/extensions/amavis/sql_listing.py(+104 -65)📝
modoboa/extensions/amavis/static/amavis/css/quarantine.css(+22 -1)📝
modoboa/extensions/amavis/static/amavis/js/quarantine.js(+104 -25)📝
modoboa/extensions/amavis/templates/amavis/index.html(+5 -2)➕
modoboa/extensions/amavis/templates/amavis/main_action_bar.html(+38 -0)📝
modoboa/extensions/amavis/templatetags/amavis_tags.py(+10 -45)📝
modoboa/extensions/amavis/views.py(+87 -103)📝
modoboa/extensions/webmail/lib.py(+32 -23)📝
modoboa/extensions/webmail/static/webmail/css/webmail.css(+11 -0)📝
modoboa/extensions/webmail/static/webmail/js/webmail.js(+2 -2)➕
modoboa/extensions/webmail/templates/webmail/main_action_bar.html(+3 -0)📝
modoboa/extensions/webmail/templatetags/webmail_tags.py(+3 -6)📝
modoboa/extensions/webmail/views.py(+13 -34)📝
modoboa/lib/email_listing.py(+0 -13)📝
modoboa/lib/tables.py(+5 -2)📝
modoboa/lib/webutils.py(+51 -0)...and 5 more files
📄 Description
I don't think this is quite ready to pull yet but I don't see a way to get a discussion going about this without putting in a pull request.
I've reimplemented Quarantine on the basis of Listing. There was no inherent obstacle to doing so but the lack of code documentation made the task more difficult than it could have been. I use jsdoc3 for my own needs. Here's an example.
I've rebased my branch on the latest state of master but I've tested it on my own live modoboa installation by diffing the head of the branch against its base and applying this patch onto 1.0.0.
I've not bothered with pep8 because I'd rather focus on functionality rather than cosmetics for now.
I've noticed a problem but I think it is a preexisting architectural problem that my code revealed rather than a problem I've created. If I sort on spam score or date in the quarantine and then navigate to the webmail page, I get a error message that suggests that modoboa is trying to apply the sort I've selected in quarantine to the webmail window. The error is:
It looks like
request.session["navparams"]is shared by the two extensions. I'm not sure what the fix is here. Is there anything that should be shared at all between the two?🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.