Commit Graph

57 Commits

Author SHA1 Message Date
Dan Sosedoff
8413681db0 Fix typo in the list of env vars (#786) 2025-03-30 08:28:18 -07:00
Kian-Meng Ang
08b1ea71e7 Fix typos (#764)
Found via `codespell -S static,data -L selct`
2024-11-17 22:08:29 -08:00
Alexandru Gologan
f4e7643e22 Add support for a bookmarks-only mode (#716)
* Add support for bookmarks-only mode

* Add error for missing bookmarks in bookmarks-only mode

* Error when settings url or connect backend together with bookmarks-only

* Add tests for parsing options
2024-03-14 21:36:53 -07:00
Dan Sosedoff
fe5039d17a Allow retrying a connection on startup (#695)
* Allow retrying a connection on startup
* Remove unused vars
* Add an extra comment
* Restructure retry logic a bit
* Update retry logic
* Fix comment
* Update comment
* Change type for RetryCount and RetryDelay to uint
* Extra test cases
* Tweak
2023-11-04 11:12:48 -05:00
yanjingtu
14d8d80b86 fix when prefix has '/' and prefix is not end with '/' (#684) 2023-08-29 21:09:10 -07:00
Dan Sosedoff
41bf189e6b Local queries (#641)
* Read local queries from pgweb home directory
* Refactor local query functionality
* Allow picking local query in the query tab
* WIP
* Disable local query dropdown during execution
* Only allow local queries running in a single session mode
* Add middleware to enforce local query endpoint availability
* Fix query check
* Add query store tests
* Make query store errors portable
* Skip building specific tests on windows
2023-02-02 16:13:14 -06:00
Dan Sosedoff
bcba666507 Add default connect_timeout option to connection string (#626)
* Add default connect_timeout option to connection string
* Add an extra test
2022-12-20 16:58:54 -06:00
Dan Sosedoff
b31e7f1ea7 Setup basic prom metrics endpoint (#624)
* Setup basic prom metrics endpoint
* Use default prom handler to expose go runtime metrics
2022-12-20 10:13:42 -06:00
Dan Sosedoff
69233cd769 Establish connections using bookmark ID only (#619)
* Establish connections using bookmark ID only
* Refactor specs
* Extra tests
* Fix homedir assertion for bookmarks path
* Fix newline in the warning message
* Check for bookmark file existence before reading
* Connect code restructure
2022-12-19 12:33:13 -06:00
Dan Sosedoff
afe431c94d Request logging additions (request id, forwarded user) (#618)
* Add request-id logging
* Missing test file
* Add option to log forwarded user information if available via X-Forwarded-Header
* Format
2022-12-16 12:38:57 -06:00
Dan Sosedoff
e0a748812d Add support for .pgpass file (#617)
* Add support for .pgpass file
* Support password lookup in /api/connect endpoint
* Restrore removed code for BuildStringFromOptions
* Restructure connection string test and add extra case for pgpass
* Add test for FormatURL method
2022-12-14 13:37:49 -06:00
Dan Sosedoff
7557ac854e Configure client side query timeout (#610)
* Configure client side query timeout
* Update test command on windows
* Make query timeout cli opt an uint
* Fix windows test command
* Check for updates when rendering connection page
* Fix typo
2022-12-08 15:07:40 -06:00
Dan Sosedoff
d08dbf34aa Implement global query timeout option (#609)
* Add global query timeout
* Tweak option settings
* Add timeout test
* Move query timeout option close to idle timeout
2022-12-07 18:56:58 -06:00
Dan Sosedoff
dbd3b26f6c Configure logging level and format 2022-12-06 12:09:21 -06:00
Dan Sosedoff
dd1fb90355 Refactor bookmarks ssl params 2022-11-23 16:21:30 -06:00
Dan Sosedoff
c103eed463 Comment fixes 2022-11-22 16:17:28 -06:00
Dan Sosedoff
e1aa717b22 Print available environment variables in help message 2022-11-22 16:09:01 -06:00
Dan Sosedoff
a2a5415ace Print deprecation notice when using unprefixed env var 2022-11-22 15:20:49 -06:00
Dan Sosedoff
b1023cdcfd Add support for PGWEB_ prefixed env vars 2022-11-22 14:51:13 -06:00
Dan Sosedoff
fa0efb1597 Make getCurrentUser method private 2022-11-22 14:51:13 -06:00
Dan Sosedoff
89f84367ad Change binary codec back to none (#555) 2022-03-26 18:11:33 -05:00
Matthieu Vachon
5803295174 Added binary codec base58 as well as improving the help for --binary-codec flag (#548)
* Added binary codec `base58` as well as improving the help for `--binary-codec` flag
* Added tests for base58
* Fixed tests

Co-authored-by: Matthieu Vachon <matt@streamingfast.io>
2022-01-27 22:10:01 -06:00
Dan Sosedoff
706caa44bf Serialize binary bytea cols into hex/base64 (#537)
- Adds binary serialization into hex/base64
- Default codec is base64
- Codec can be changed via `--binary-codec` CLI option
2021-12-29 11:03:50 -06:00
Dan Sosedoff
ce4aea8da1 Add ssl cert/key options 2020-02-05 22:09:13 -06:00
Dan Sosedoff
9c7f566d4d Add option to support sslrootcert parameter 2020-02-05 22:01:25 -06:00
Dan Sosedoff
8428d268b1 Lint 2019-11-02 13:00:23 -05:00
Dan Sosedoff
c32d68809b Add extra note 2019-01-28 14:22:05 -06:00
Dan Sosedoff
d48172986e Fix error when automatic user detection fails 2019-01-28 14:03:45 -06:00
Dan Sosedoff
965cf754cf Allow settings url prefix with URL_PREFIX env var 2018-11-27 14:58:50 -06:00
Dan Sosedoff
1ecf18e41c Also flush bookmark under sessions/connect setup 2018-09-14 00:56:16 -05:00
Dan Sosedoff
badcf700b9 Clear out connection settings when running in session/connect mode 2018-09-14 00:54:42 -05:00
Dan Sosedoff
174b2ffdbb Make localhost to be a default db host 2018-09-14 00:04:02 -05:00
Dan Sosedoff
ad81f666a5 Switch to dep for dependency management 2018-08-31 21:49:24 -05:00
Dan Sosedoff
47500bf92e Specs refactor and tweaks
- Make ParseOptions func to take an arg and return struct so we can test it
- Refactor and add more tests for options parsing
- Run test suite on postgres 10.x branch
- Change format for connection idle timer from float64 to in
2018-02-22 14:20:18 -06:00
Dan Sosedoff
c3435e2ece Change CORS to Cors on CLI options, specify origins as an option 2017-11-16 22:10:14 -06:00
Dan Sosedoff
b52394a166 Add support for CORS 2017-11-15 15:26:31 -06:00
Dan Sosedoff
ec5a12b0f7 Rename disable connection timeout cli option 2017-10-20 22:18:07 -05:00
ldinc
3067b06bf6 #282: added timeout flags & tuned client.IsIdle() 2017-10-14 03:08:04 +03:00
Dan Sosedoff
4ad70d5392 Tweak wording 2017-10-07 11:30:12 -05:00
Dan Sosedoff
d8ce8231cc Dot now allow using startup bookmark in multi-session mode 2017-10-07 09:25:00 -05:00
Dan Sosedoff
b1dd4b5308 Add new CLI option to disable SSH connections 2017-09-26 23:56:27 -05:00
Dan Sosedoff
049aa4ec44 Require --connect-backend flag to be set if any other backend flags are specified 2017-09-21 02:06:14 -05:00
Dan Sosedoff
869fd8c6bc Refactor the third-party connect backend functionality 2017-09-21 01:21:26 -05:00
Dan Sosedoff
d175b0af34 Add descriptions for cli backend options 2017-09-19 00:45:07 -05:00
Dan Sosedoff
73816ff2d7 Add ability to connect with settings from third-party backend 2017-09-19 00:43:21 -05:00
Dan Sosedoff
26ea9fc1b8 Fix the JSON beautifier flag 2017-09-16 21:57:04 -05:00
Dan Sosedoff
d786d0018e Make JSON formatting a feature flag, enabled by default 2017-09-13 23:27:54 -05:00
Pavel Kiselev
9b1d915dd1 Ability to override bookmarks directory 2017-01-24 07:55:18 +07:00
Dan Sosedoff
412089948c Do not return error when session is locked and database url is blank 2016-11-20 16:44:33 -06:00
akarki15
1b4902f196 initClient uses bookmark if it exists
if options.Bookmark is set, initClient will now use
it to create a client from the bookmarked settings.

initClientUsingBookmark uses methods introduced in
previous commits. It constructs connection string
to db from Bookmark.Url if it exists. If not, it
uses other fields in Bookmark to construct the
connection string. An implication of this is that
the Url field of Bookmark takes precedence.
2016-11-10 20:06:39 -05:00