-
Notifications
You must be signed in to change notification settings - Fork 15
Clean up incident list GET parameters, step 1 #1512
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
base: master
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1512 +/- ##
==========================================
- Coverage 79.46% 78.65% -0.82%
==========================================
Files 121 121
Lines 5425 5504 +79
==========================================
+ Hits 4311 4329 +18
- Misses 1114 1175 +61 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
c3aa92a
to
5a06a26
Compare
5a06a26
to
441369a
Compare
441369a
to
119f3b2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here's what I got from testing the bugs on master branch versus PR branch:
Timeframe disappearing on auto-refresh or changing page.
- Occurs on master branch
- Does not occur on PR branch
Page size disappearing on auto-refresh or changing page.
- Does not occur on master branch
- Does not occur on PR branch
Paging when using the querystring tag duplicated the get-parameters from the filterbox.
- Does not occur on master branch
- Occurs on PR branch (in URL bar, automatic refresh requests, and page-change requests. Deduplicated in backend)
Timeframe is reset to none when changing page size or changing the filters in the filter box
- Occurs on master branch
- Does not occur on PR branch
The duplicated get-parameters in the URL bar as well as how to handle the possibility of adding the same filter multiple times in the UI (e.g. when using custom incident table columns that is filterable and that filters something that is being filtered already) will need a follow-up PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test name nitpicking
And I would like to have docstrings for the new methods, since they are not self explanatory to me
|
||
|
||
@tag("unit") | ||
class dedupe_querydict_Test(TestCase): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why the name like this? This goes against all other test names we have so far
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I realized that it is easier for my brain to match the thing being tested to the test when it is spelled the same way in the test class name.
I suspect a lot of this would no longer be needed if all the GET-parameters that works on the table swapped out all the GET parameters in addition to the table, that is: all of |
162247d
to
d213ade
Compare
d213ade
to
9af6c5e
Compare
|
Scope and purpose
On the way to using forms to validate All! The! Things! in the frontend there was a lot of mysterious things happening.
I think this is the most brutal code I've yet to write for argus. It fixes (and therefore masks) A LOT of sins/problems/design mistakes/beginner errors in the frontend. It's like fixing a misbehaving machine by hitting it with a hammer in just the right way then following up with duct tape and WD40.
This incidentally fixes any future occurrences of #1509 in a too brutal way: There's no alert that there is a problem in the site settings, the problem is just masked. Alerting about the error is left to a future PR.
Example problems now fixed:
There are no "look" changes, only "feel" changes (though there may still be duplicated params in the url, it just doesn't matter anymore.)
Lots of debug logging added, I'm considering adding another level TRACE (5) for these (or remove them) but that'll be in a final PR when everything else is done.
Best read commit by commit.
Contributor Checklist
Every pull request should have this checklist filled out, no matter how small it is.
More information about contributing to Argus can be found in the
Development docs.