-
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
front end and backend added for the feature #1243 #1244
base: main
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. |
…how ssl inputs when ssl mode on only fixed, TODO: testing
@LinkinStars I used this command to upgrade answer version:
Then to test it again Here's the database |
@unical1988 Get it. From your screenshot, no fields are missing from the database, so I tested it again locally. I don't encounter the issue. I use the v1.4.2 version and re-install using PostgreSQL. I have not found any error log.
|
@LinkinStars @shuashuai now testing for the postgres to check everythings alright, but encountered the error
Any idea what would be causing this error on the installation second step interface? |
It has nothing to do with the error you're talking about, it's because the form validation logic within your page isn't working.You can check this method In addition to some of the changes mentioned above which you have already completed please click on Please restore the eslint and preittier configurations in your project first. |
@shuashuai eslint and preittier are causing the ui not to build correctly. |
|
@shuashuai where to find the logs? |
You add the logs you need in development mode, and then view them in the browser console, or debug them in your editor, whichever you prefer. |
@shuashuai i was referring to server logs, where to find them? |
@LinkinStars The previous reported error is still being raised (linked_count not found), here's the error log (from the editor) and it is not caused by using SSL (I have also create another DB using a different version of postgres and yet the same error was displaying) *errors.Error {Code: 500, Reason: "base.database_error", Message: "", Err: error(*modernc.org/sqlite.Error) *{msg: "SQL logic error: no such column: linked_count (1)", code: 1}, Stack: "C:/Users/SelimSoufargi/Desktop/Answer/answer/internal/repo/question/question_repo.go:419 github.com/apache/answer/internal/repo/question.(*questionRepo).GetQuestionPage\nC:/Users/SelimSoufargi/Desktop/Answer/answer/internal/service/content/question_service.go:1420 github.com/apache/answer/internal/service/content.(*QuestionService).GetQuestionPage\nC:/Users/SelimSoufargi/Desktop/Answer/answer/internal/controller/question_controller.go:335 github.com/apache/answer/internal/controller.(*QuestionController).Ques...+1471 more"} |
@LinkinStars I found the previous error cause: I was running Answer without specifying the config, so when I added it:
UPDATE: The tests seem to be working fine (at least for verify-ca mode)! |
@shuashuai how to format the front-end according to the project styling? is there a prettier command to execute to do so? |
@LinkinStars @shuashuai i have tested the new feature and it works with the certificates. to note that in the field Database host (Installation) I had to specify hostname as an IP (e.g., 127.0.0.1) and then port number (e.g., 127.0.0.1:5432) for the database to connect using SSL.
|
I added tsx and go codes for backend and frontend to support SSL for PostgreSQL.