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
Refactored due/overdue for audit, added due/overdue for checkin API endpoint and GUI #14655
Conversation
Signed-off-by: snipe <snipe@snipe.net>
Signed-off-by: snipe <snipe@snipe.net>
Signed-off-by: snipe <snipe@snipe.net>
Signed-off-by: snipe <snipe@snipe.net>
Signed-off-by: snipe <snipe@snipe.net>
Signed-off-by: snipe <snipe@snipe.net>
Signed-off-by: snipe <snipe@snipe.net>
Signed-off-by: snipe <snipe@snipe.net>
Signed-off-by: snipe <snipe@snipe.net>
Signed-off-by: snipe <snipe@snipe.net>
Signed-off-by: snipe <snipe@snipe.net>
Signed-off-by: snipe <snipe@snipe.net>
Signed-off-by: snipe <snipe@snipe.net>
Signed-off-by: snipe <snipe@snipe.net>
Signed-off-by: snipe <snipe@snipe.net>
Signed-off-by: snipe <snipe@snipe.net>
Signed-off-by: snipe <snipe@snipe.net>
Signed-off-by: snipe <snipe@snipe.net>
Signed-off-by: snipe <snipe@snipe.net>
Signed-off-by: snipe <snipe@snipe.net>
Signed-off-by: snipe <snipe@snipe.net>
Signed-off-by: snipe <snipe@snipe.net>
Signed-off-by: snipe <snipe@snipe.net>
Signed-off-by: snipe <snipe@snipe.net>
Signed-off-by: snipe <snipe@snipe.net>
Signed-off-by: snipe <snipe@snipe.net>
Signed-off-by: snipe <snipe@snipe.net>
Signed-off-by: snipe <snipe@snipe.net>
Signed-off-by: snipe <snipe@snipe.net>
PR Summary
|
Signed-off-by: snipe <snipe@snipe.net>
Signed-off-by: snipe <snipe@snipe.net>
Signed-off-by: snipe <snipe@snipe.net>
Signed-off-by: snipe <snipe@snipe.net>
Signed-off-by: snipe <snipe@snipe.net>
Signed-off-by: snipe <snipe@snipe.net>
Signed-off-by: snipe <snipe@snipe.net>
Signed-off-by: snipe <snipe@snipe.net>
Signed-off-by: snipe <snipe@snipe.net>
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'm just diving in but I wanted to share this first:
I think we can increase confidence in these tests by creating an asset(s) in each "status" and then querying to make sure we only get back the ones expected. So the outline for a test might look like
- Create an asset that has upcoming audit
- Create an asset that is overdue for audit
- (maybe) Create an asset in another state that shouldn't show up?
- Send queries with
upcoming_status
set tooverdue
,due-or-overdue
,due
- Check if the asset ids you expect from the assets created above are included and the ones that shouldn't be included aren't.
The increased confidence comes from knowing the test created assets that shouldn't be returned and checking that they weren't.
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 did a pure-code review and found a couple changes. Going to pull it up and fully test in a browser soon.
Signed-off-by: snipe <snipe@snipe.net>
Signed-off-by: snipe <snipe@snipe.net>
Signed-off-by: snipe <snipe@snipe.net>
Signed-off-by: snipe <snipe@snipe.net>
Signed-off-by: snipe <snipe@snipe.net>
Whew. This got a lot messier and bigger than I had intended.
/api/v1/hardware/audits/due
and/api/v1/hardware/audits/overdue
endpoints/api/v1/hardware/checkins/due
and/api/v1/hardware/checkins/overdue
endpoints/api/v1/hardware/checkins/due-or-overdue
and/api/v1/hardware/audits/due-or-overdue
endpointsapi/v1/hardware/audit/due
API routes that somehow snuck through (they have been there a while)By expanding out the existing index API, it means we can still filter/sort/search/etc on these new endpoints the same as we can for any other asset listing page.
To do eventually:
Refactor the Notifications for expected checkins to use the new model scopes.