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

Datastore management landing page #674

Merged
merged 34 commits into from
Jun 22, 2022

Conversation

TheAndrewJackson
Copy link
Contributor

@TheAndrewJackson TheAndrewJackson commented Jun 16, 2022

Purpose

Add a landing page that lets the user see what connections are currently setup and to test and see if they're working. The scope of this PR was modified and search/filtering, backend query updates, handling user pages permissions will addressed in future PRs.

Changes

  • Add landing page
  • Refactor routes into constants like in urn_registry.py
  • Refactor pagination footer into standalone component
  • Add .env.development file back. This caused a regression.

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 #601 #605

@TheAndrewJackson TheAndrewJackson changed the title datastore management landing page Datastore management landing page Jun 17, 2022
@TheAndrewJackson TheAndrewJackson marked this pull request as ready for review June 17, 2022 13:36
@seanpreston seanpreston self-assigned this Jun 17, 2022
@seanpreston
Copy link
Contributor

seanpreston commented Jun 17, 2022

Great start @TheAndrewJackson

—the test connection functionality sends the request successfully, but doesn't update the card on completion
Screenshot 2022-06-17 at 15 52 09

—it looks like something's off with the spacing for disabled connections when the connection name overflows onto a second line
Screenshot 2022-06-17 at 15 55 19

—we'll need to update the dropdown options
Screenshot 2022-06-17 at 15 58 33

—we should disable the Create New Connection button until we implement the flow

Copy link
Contributor

@seanpreston seanpreston left a comment

Choose a reason for hiding this comment

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

Thanks @TheAndrewJackson — nearly there. Some UX tweaks and this weird edge case still to go:

  • when you try to test a saas connector's connection the following error shows

Screenshot 2022-06-21 at 18 42 15

  • on closer inspection it could well be a server error causing this as the console shows

Screenshot 2022-06-21 at 20 44 00

  • and the server logs
fidesops    | INFO:uvicorn.access:MASKED - "MASKED MASKED HTTP/MASKED" 500
fidesops    | ERROR:uvicorn.error:Exception in ASGI application
fidesops    | Traceback (most recent call last):
fidesops    |   File "/usr/local/lib/python3.9/site-packages/uvicorn/protocols/http/httptools_impl.py", line 372, in run_asgi
fidesops    |     result = await app(self.scope, self.receive, self.send)
fidesops    |   File "/usr/local/lib/python3.9/site-packages/uvicorn/middleware/proxy_headers.py", line 75, in __call__
fidesops    |     return await self.app(scope, receive, send)
fidesops    |   File "/usr/local/lib/python3.9/site-packages/uvicorn/middleware/message_logger.py", line 82, in __call__
fidesops    |     raise exc from None
fidesops    |   File "/usr/local/lib/python3.9/site-packages/uvicorn/middleware/message_logger.py", line 78, in __call__
fidesops    |     await self.app(scope, inner_receive, inner_send)
fidesops    |   File "/usr/local/lib/python3.9/site-packages/fastapi/applications.py", line 269, in __call__
fidesops    |     await super().__call__(scope, receive, send)
fidesops    |   File "/usr/local/lib/python3.9/site-packages/starlette/applications.py", line 124, in __call__
fidesops    |     await self.middleware_stack(scope, receive, send)
fidesops    |   File "/usr/local/lib/python3.9/site-packages/starlette/middleware/errors.py", line 184, in __call__
fidesops    |     raise exc
fidesops    |   File "/usr/local/lib/python3.9/site-packages/starlette/middleware/errors.py", line 162, in __call__
fidesops    |     await self.app(scope, receive, _send)
fidesops    |   File "/usr/local/lib/python3.9/site-packages/starlette/middleware/base.py", line 68, in __call__
fidesops    |     response = await self.dispatch_func(request, call_next)
fidesops    |   File "/fidesops/src/fidesops/main.py", line 75, in dispatch_log_request
fidesops    |     prepare_and_log_request(
fidesops    |   File "/fidesops/src/fidesops/main.py", line 96, in prepare_and_log_request
fidesops    |     send_analytics_event(
fidesops    |   File "/fidesops/src/fidesops/analytics.py", line 42, in send_analytics_event
fidesops    |     analytics_client.send(event)
fidesops    |   File "/usr/local/lib/python3.9/site-packages/fideslog/sdk/python/client.py", line 88, in send
fidesops    |     run(self.__send(event))
fidesops    |   File "/usr/local/lib/python3.9/asyncio/runners.py", line 33, in run
fidesops    |     raise RuntimeError(
fidesops    | RuntimeError: asyncio.run() cannot be called from a running event loop

I suspect that's something to do with either:

  • the SaaS connector attempting to fire an async request to test the connection
  • the SaaS connector having no pre-configured connection test (it has not DatasetConfig, it's just test data)

const toast = useToast();
const handleSearchChange = (event: React.ChangeEvent<HTMLInputElement>) =>
dispatch(setRequestId(event.target.value));
const handleStatusChange = (event: React.ChangeEvent<HTMLSelectElement>) =>
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like something in this function is causing the other selects to deselect whenever another element is selected

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right now the dropdowns are more of a placeholder. The ones in this PR are replaced and fixed within #691

@seanpreston
Copy link
Contributor

Thanks for making those changes @TheAndrewJackson

@seanpreston seanpreston merged commit d9e345f into main Jun 22, 2022
@seanpreston seanpreston deleted the 601_datastore_management_landing_page branch June 22, 2022 14:56
sanders41 pushed a commit that referenced this pull request Sep 22, 2022
* Refactor routes into enums and create connections page

* Test switching back to double quotes

* Convert back to double quotes

* Add placeholder connection filters

* Set up api scaffolding

* Get basic grid going

* Initial grid card styling

* Fix simple eslint issues

* Add development config back in

* Finish draft of card

* Add working test button and landing page

* Add pagination and small fixes

* Fix testing issues

* Add auth tests for datastore connection page

* run formatter

* Update changelog

* update the create_test_data command to add connectionconfigs

* Disable create buttons & fix text overflow

* Update filter dropdown values

* Fix test timestamp bug

* Remove development variable

* Fix imports

* Update button hover color

* remove commented out code

* fix typo

* Remove Saas Option

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.

[Datastore Management] Landing page
2 participants