-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Support PostgreSQL connection with SSL #1243 #1244
base: dev
Are you sure you want to change the base?
Conversation
I now made the select and checkbox two seperated form groups and remove handleChange() |
Your comments suggest fixing the frontend part of the new feature, are there problems with the backend commited code? |
Is the connection string building for the DB correct (in internal/install/install_req.go)?. I assume the pem and crt files should be found in the folder data/cache/certs/ |
An important point is that you have locally verified the code you submitted now? Can the front-end project run correctly? I checked it and it still didn't handle the translation completely. In addition, if your editor uses vscode, it is recommended to install the eslint plugin. SSL Mode On element, why not apply to react-bootstrap components? And why doesn't the checkbox value apply to the value you passed in, but continue to use the value on the current page? I'm not sure if you end up submitting and saving the value of SSL Mode checkbox to the database. If it's just a logic of whether select is displayed, then it doesn't need to be saved in formData, it just needs to be processed within the current component. |
I currently only review the front-end code, and the back-end code needs to wait for @LinkinStars to review it. |
I am in the process of testing right now, I will check your comments and make the changes in the next commits |
I made few other frontend fixes (except relating to handle the translations) |
There are some tutorials on Answer development on the official blog that may be helpful for you to be familiar with projects and development. You can read it. |
@unical1988 All the files required for SSL, such as .pem and .crt, have an input field where users can directly enter the directory path. Users can place the files in the specified directory themselves. |
All the files required for SSL, such as .pem and .crt, have an input field where users can directly enter the directory path. Users can place the files in the specified directory themselves.
|
@unical1988 Make it simple. Only need three input text fields. |
This kind of problem should be solved on its own by searching or AI. Fix single file command It should also be noted that I'm not going to look at the implementation logic until it passes format checking |
By the way, the base branch of PR should be |
value: 'require', | ||
isInvalid: false, | ||
errorMsg: '', | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The ssl_enabled
and ssl_mode
checksum is not needed and is meaningless, it's just a variable that controls the data underneath.
What needs to be checked is the value of key_file
and pen_file
and cert_file
if ssl_enabled is true and ssl_mode is not required.
In addition, when switching ssl_anabled, please reinitialize these relevant values (ssl_mode、key_file、pen_file、cert_file)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is ssl_enabled
initialized somewhere? I can edit the code to account only for the values of %_file
but how and where default values for ssl_mode
and ssl_enabled
are set? the current logic initilizes them, but you say it is not needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have also added the re-initialization of the relevant variables when switching ssl_enabled
I added tsx and go codes for backend and frontend to support SSL for PostgreSQL.