Skip to content
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

Add support for a bookmarks-only mode #716

Merged
merged 4 commits into from
Mar 15, 2024

Conversation

agologan
Copy link
Contributor

@agologan agologan commented Mar 4, 2024

This adds the ability to disable manually-entered connection details in favor of bookmarks.
Feel free to recommend any changes that better align with project directions.

The use-case for this self-hosting and avoiding users to ever provide connection details.
A connect backend is sortof similar, but bookmarks already go 90% of the way and come baked-in.

@sosedoff
Copy link
Owner

sosedoff commented Mar 9, 2024

Thank you. I will have a look

@sosedoff
Copy link
Owner

When pgweb bookmarks dont exist i get this UI:

Screenshot 2024-03-11 at 10 15 13 PM

After clicking on the "Connect" button:

Screenshot 2024-03-11 at 10 15 22 PM

In this particular case i think its best if we can display a message like "No bookmarks available" and an explanation
that Pgweb is running in bookmarks-only mode and connecting to custom databases is not allowed.

@agologan
Copy link
Contributor Author

Hid the connect button and showed an error reading:

Running in bookmarks-only mode but NO bookmarks configured

Also added errors when attempting to start with URL or host + port or connect-backend set.

Copy link
Owner

@sosedoff sosedoff left a comment

Choose a reason for hiding this comment

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

Looking good so far. Left a few comments, i will test a bit more and merge if everything is in order after you make the changes.

pkg/command/options.go Outdated Show resolved Hide resolved
pkg/command/options.go Outdated Show resolved Hide resolved
@sosedoff sosedoff merged commit f4e7643 into sosedoff:master Mar 15, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants