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

Add database connection modal #86

Open
chriswhong opened this issue Aug 12, 2018 · 2 comments
Open

Add database connection modal #86

chriswhong opened this issue Aug 12, 2018 · 2 comments
Milestone

Comments

@chriswhong
Copy link
Contributor

chriswhong commented Aug 12, 2018

Let's make this thing even more user-friendly and just have a modal for the database connection info.

I am not sure how to implement this.

  • The credentials need to make their way back to the server and stored somewhere (new express endpoint?)
  • They should persist when the server stops and starts again (manually edit .env file?)
  • Let the user test the connection before closing the modal

Any ideas?

Here's a connection modal from Franchise we can use for inspiration. We should totally throw in an elephant or two.

franchise

@chriswhong chriswhong added this to the 0.2.0 milestone Aug 12, 2018
@jczaplew
Copy link
Contributor

I'm thinking about the following flow:

  • User enters credentials into modal
  • When the user is done entering their credentials, the credentials are sent to the express app (/validate-connection?), where they are used to create a connection to Postgres. The error or ok status are then returned to the client. If there was an error, that is presented to the user. If the credentials were valid, a POST request with the credentials is sent to the express app (/save-credentials?) where they are stored in a JSON file.
  • This structure would also allow for a user to create multiple connections and name them, similar to what you see in something like Postico. In that case, the credential entering modal can also be repurposed for editing existing connections.

@brianbancroft
Copy link
Contributor

I think this is a great idea!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants