-
-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sorting by "Feed type" only affects displayed rows #421
Comments
Hi can you specify what part of the frontend ? A screenshot will be appreciated. |
I realised that when I changed some backend code today for #419 . |
No I think it's a bug, I assign the issue to you. Edit: Obviously if you only wanted to report the bug and not work on it let me know 😄 |
No, I'm happy to have a look. :) But I would like to prioritise other things first. To be honest, I'm not sure if we should fix this at all or if it makes more sense to remove the functionality (sorting by feed type) altogether. |
Ok don't worry, I'll ping next weeks and you will tell me if you need more time or what do you prefer. Talking about the feature we can think about a solution together, so write what do you think about it and what you suggest |
I have thought about this a few times. We are working with a paginated query set here. If we sort at this point, we are only sorting the contents of the current page, which is clearly not what we want. What we should be doing is sorting at the database level (as we do for all the other properties, e.g. Last Seen). But the database, as it is now, has no concept of "feed type". I see two options:
I would prefer option 1. Option 2 would be a lot of work for little benefit. |
I agree with you that changing the IOC model is too much effort. What do you thin about ordering by multiple fields, Django allows to do it |
Could you please explain how ordering by multiple fields would solve the problem? I'm sorry, I don't understand. |
In the front end, when I click on "Feed type", only the currently displayed rows are sorted. Is this the intended behaviour? Because I assumed that all resulting IOCs would be sorted, as this is the behaviour of sorting by every other column.
The reason for this is, that sorting by "feed_type" is not done on a database level but just before the HTTP response is returned. But because of pagination, at this point the list of IOCs does only contain the IOCs for the requested page.
The text was updated successfully, but these errors were encountered: