Skip to content
This repository has been archived by the owner on Nov 30, 2022. It is now read-only.

Subject Request Events and Logs Section #1018

Merged
merged 16 commits into from
Aug 3, 2022

Conversation

TheAndrewJackson
Copy link
Contributor

@TheAndrewJackson TheAndrewJackson commented Aug 2, 2022

Purpose

Add Events and Logs to the Subject Request Details page. This PR implements everything that's possible right now. In order to finish out the whole issue the backend needs to add some additional logs for the activity timeline. This is a stop gap to merge in what's currently working. Once the backend has added everything that's needed a followup PR will finish this feature.

Changes

  • Add Events and Logs section to the subject request details page
  • Add slide out drawer to view dataset collection logs and errors.

Checklist

  • Update CHANGELOG.md file
    • Merge in main so the most recent CHANGELOG.md file is being appended to
    • Add description within the Unreleased section in an appropriate category. Add a new category from the list at the top of the file if the needed one isn't already there.
    • Add a link to this PR at the end of the description with the PR number as the text. example: #1
  • Applicable documentation updated (guides, quickstart, postman collections, tutorial, fidesdemo, database diagram.
  • If docs updated (select one):
    • documentation complete, or draft/outline provided (tag docs-team to complete/review on this branch)
    • documentation issue created (tag docs-team to complete issue separately)
  • Good unit test/integration test coverage
  • This PR contains a DB migration. If checked, the reviewer should confirm with the author that the down_revision correctly references the previous migration before merging
  • The Run Unsafe PR Checks label has been applied, and checks have passed, if this PR touches any external services

Ticket

Fixes #495

@TheAndrewJackson TheAndrewJackson changed the title 495 subject request activity and logs Subject Request Events and Logs Section Aug 2, 2022
@TheAndrewJackson TheAndrewJackson marked this pull request as ready for review August 2, 2022 20:48
@seanpreston
Copy link
Contributor

Hey @TheAndrewJackson, what data have you been using to test this? Did you write a script or are you running requests through and using the logs? Just thinking a script might help because we can be sure it covers every edge case.

@TheAndrewJackson
Copy link
Contributor Author

I've been manually creating, or mocking, some of the data on the frontend. I created the execution logs by following the "Minimum API calls to create an Access Privacy Request" directory in our Postman collection.

I agree that a script would be really helpful. Maybe the test-data script could be updated to add logs to each example subject request.

onClose();
};

const headerText = isViewingError ? "Event detail" : "Event log";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did we think about having this popover update the URL? I could imagine a user wanting to share event logs for request failures for instance, as that's where the trace will be.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think so. That's a good idea but it won't work right now because our current BE router isn't able to resolve dynamic urls. Once we decide on a solution for dynamic urls we will be able support features like this.

Are you okay with adding this in a future PR once that BE supports this?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure! Have made a ticket

@seanpreston
Copy link
Contributor

Thanks @TheAndrewJackson — LGTM once we've addressed that question on the URLs

@seanpreston
Copy link
Contributor

I agree that a script would be really helpful. Maybe the test-data script could be updated to add logs to each example subject request.

We'd need to actually process the requests created, which means we'll need to run the server (rather than just access the DB directly). I'll have a play around this morning and see if that's an easy enough restructure.

More broadly we need to get better at planning test data in for these frontend features.

@seanpreston seanpreston merged commit 4fc5386 into main Aug 3, 2022
@seanpreston seanpreston deleted the 495_subject_request_activity_and_logs branch August 3, 2022 16:08
sanders41 pushed a commit that referenced this pull request Sep 22, 2022
* Fix small issue with eslint config

* Get initial drawer working

* Add jest config to eslintignore

* Fix small css issue

* Refactor components and get initial functionality

* Fix small logic error

* Fix couple of bugs and format code

* Conditinally display error tag

* Fix issues with merge

* Format and lint

* Sort imports

* Update to new solution

* Format code

* Update changelog

Co-authored-by: Sean Preston <sean@ethyca.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Admin UI] Subject Request details - Activity and Event logs
2 participants