Commit Graph

65 Commits

Author SHA1 Message Date
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
5b2d4e4454
Add context menu to display database tables stats (#639)
* Add context menu to display database tables stats

* Move table stats implementation into client
2023-01-23 14:10:26 -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
4e3e255575
Configure timeout and retries when testing connection status (#623) 2022-12-19 16:13:43 -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
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
4c40eef99a
Perform client version validation before executing pg_dump command (#614)
* Add func to parse out pg_dump version
* Perform client vs server version checking before dump exports
* Fix dump tests
* Add extra test to validate against empty server version
* Fix attachment filenames cleanup function
* Add extra test
* Fix small typos in comments
* Drop third-party package to deal with versions
* Tweak the pg dump incompatibility error message
* Run CI on pull requests
2022-12-12 15:09:12 -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
38051b9465
Add support for user functions (#608)
* Add initial support for functions
* Show functions definitions
* Fix client tests
* Fix schema objects search
* Perform partial matching for functions
* Add function test
* Make sure to close client connections so that database could be dropped in tests
* Fix lint
* Allow to copy the view/functions definitions
* Nits
2022-12-07 11:58:07 -06:00
Dan Sosedoff
695a99dade
Enable dev assets mode with PGWEB_ASSETS_DEVMODE env var 2022-12-03 18:27:46 -06:00
Dan Sosedoff
9074d4bfb8
Add internal sessions manager 2022-12-02 13:36:31 -06:00
Dan Sosedoff
f19f165afc
Configure logger for connect backend 2022-12-02 11:45:23 -06:00
Dan Sosedoff
f9e376a117
Code cleanup; add make lint task 2022-12-01 16:51:12 -06:00
Dan Sosedoff
dafda4a977
Add VersionInfo struct to render in the /info endpoint 2022-12-01 16:41:46 -06:00
Dan Sosedoff
9bfec11b48
Fix linting errors 2022-11-14 16:10:50 -06:00
Dan Sosedoff
e2f5e06c07
Add connect backend tests (#546) 2022-01-08 14:45:21 -06:00
Dan Sosedoff
0794c642e4
Use HTTP 302 status code for successful backend redirect (#544) 2022-01-08 12:25:24 -06:00
Tim Ings
17e95601ec
Explain analyze dropdown button (#532)
* Adds bootstrap dropdown plugin
* Float dropdown toggle left
* Extract query running message toggles
* Adds analyze function and api call
* Adds analyze api
2022-01-03 19:05:46 -06:00
Dan Sosedoff
46935a7a12
Fix broken path prefix 2021-08-10 12:12:05 -05:00
Nikita Kazarian
8e2c826ba3 go 1.16 features
- use go embed instead of go-binary and remove all about old assets (go 1.16 feature)
- pin gox version (go 1.16 feature)
- update ci to go 1.16
2021-03-05 03:47:01 +03:00
Simon Hanna
27a83bdf9e
Do not show other databases if session is locked
Fixes: #470
2020-07-15 18:11:05 +02:00
Dan Sosedoff
43a2945208 Include go version into info response 2019-12-04 20:29:23 -06:00
Dan Sosedoff
8428d268b1 Lint 2019-11-02 13:00:23 -05:00
Dan Sosedoff
7a6450091a
Code formatting and cleanup (#442)
* Formatting, extract error messages
* More refactor
* Move errors to a separate file
* Add missing file
* Misc
2019-09-29 12:16:42 -05:00
Sylvain DOIGNON
5bb339e1a2 fix SQL export filename 2019-07-31 14:43:55 +02:00
Dan Sosedoff
d48172986e Fix error when automatic user detection fails 2019-01-28 14:03:45 -06:00
Dan Sosedoff
794e5a22c1 Rename command.VERSION to command.Version 2018-12-13 22:35:43 -06:00
Dan Sosedoff
a5b8e02a98 Cleanup backend handler 2018-12-01 22:35:11 -06:00
Dan Sosedoff
72af00f1b7 Refactor api package 2018-11-30 21:40:28 -06:00
Dan Sosedoff
e2be689a05 Check if pg_dump is available before running database export 2018-04-25 23:29:18 -05:00
Dan Sosedoff
869fd8c6bc Refactor the third-party connect backend functionality 2017-09-21 01:21:26 -05:00
Dan Sosedoff
0aff72059b Check for response status when fetching credentials 2017-09-19 00:43:21 -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
e771d6f49e Export database or table to sql 2017-09-16 20:32:41 -05:00
Tamir Duberstein
c4a33206ce
api: properly check for errors
This results in NPE when cl.Info() returns an error.
2017-04-29 16:56:31 -04:00
Pavel Kiselev
9b1d915dd1
Ability to override bookmarks directory 2017-01-24 07:55:18 +07:00
Florian Duraffourg
5ffd6d612b Fix path rewrite on DB change 2017-01-10 16:14:50 +01:00
Dan Sosedoff
a3c341b5b4 Show list of databases and allow switching by clicking on current database name 2016-11-05 22:49:17 -05:00
Dan Sosedoff
7d08017c7f Add endpoint to switch active database 2016-11-05 22:23:26 -05:00
Dan Sosedoff
20da36416c Implement session locking with --lock-session option 2016-11-05 21:35:11 -05:00
Dan Sosedoff
c57b477dc9 Add tests for getSessionId helper 2016-02-26 08:48:55 -08:00
Dan Sosedoff
6edc384c05 Only run actual query without any comments 2016-02-18 22:18:07 -06:00
Dan Sosedoff
540613645f Replace url-unsafe characters in base64 query data 2016-02-18 21:17:31 -06:00
Dan Sosedoff
da43314332 Add disconnect endpoint 2016-02-04 23:05:42 -06:00
Dan Sosedoff
9bfaae7194 Merge with master 2016-01-17 15:22:33 -06:00
Dan Sosedoff
3167d96cfc use a different query to fetch materialized view structure 2016-01-17 15:00:33 -06:00
Dan Sosedoff
f0f447857f Tunnel implementation, allow using ssh on connection screen 2016-01-14 19:50:01 -06:00
Dan Sosedoff
556e7d445a Remove unused sequences code 2016-01-12 22:05:32 -06:00
Dan Sosedoff
9ffa05affb Initial support for multiple schemas 2016-01-12 21:33:44 -06:00
Dan Sosedoff
f3920afe8c Only expose sessions data in debug mode, otherwise return just a count of sessions 2016-01-10 15:16:31 -06:00