Repository navigation
[server][gui] Default database connection for new products (#2985) - #5206
Open
adnansamore wants to merge 1 commit into
Open
adnansamore wants to merge 1 commit into
adnansamore wants to merge 1 commit into
Conversation
adnansamore
requested review from
bruntib,
dkrupp and
gulyasgergely902
as code owners
November 23, 2026 15:24
adnansamore
force-pushed
the
feature/2985-product-defaults
branch
from
November 26, 2026 18:30
11b6189 to
5805cef
Compare
adnansamore
force-pushed
the
feature/2985-product-defaults
branch
from
November 26, 2026 18:47
5805cef to
f12c32f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this does
As suggested in the issue comments, the default database connection for new products can now be set in
server_config.json. When a super user opens the "New product" dialog, those values are already filled in.Example config:
Changes
getDefaultProductConnection()inproducts.thrift(super user only). API version bumped to 6.75.session_manager.pyreads theproduct_defaults.connectionsection on startup and again on--reload. Invalid values (unknown engine, a port that isn't a number, empty strings) are skipped with a warning, so the server still starts.NewProductBtn.vueasks for the defaults when the dialog opens. It only fills empty fields, so it never overwrites anything the user already typed. If the request fails, the form works the same as before.nullvalues toserver_config.json, so nothing changes by default. Documented it indocs/web/server_config.md.Testing
web/server/tests/unit/test_product_defaults.py: parsing, invalid values, password is never returned,$ENV:values, reload.test_products.py: a super user gets the defaults and a normal user getsRequestFailed.