-
Notifications
You must be signed in to change notification settings - Fork 304
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
#11285 Fixed issue of server config properties not getting rendered correctly #5070
base: master
Are you sure you want to change the base?
#11285 Fixed issue of server config properties not getting rendered correctly #5070
Conversation
✅ Deploy Preview for cbioportalfrontend ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
This PR fixes the issue: |
@arishta-dev Thanks so much for all your work! As mentioned on slack this works but was thinking a cleaner solution might be to fix this in the backend code directly (ensuring it generates JSON boolean properties correctly): https://github.com/cBioPortal/cbioportal/blob/be86bae2829f86cf9aeb091d60f582ce2a5f1110/src/main/resources/webapp/config_service.jsp#L145-L150 |
Hi @inodb, from what I understand, the property values are being fetched from various sources in the backend (application.properties, env variables, etc) and then being returned as
|
191f7bb
to
4190889
Compare
Hi @alisman I have addressed your review comments, but @inodb is suggesting an alternate approach to make the API return the correct response instead of processing it in the frontend, please TAL at my comment, if it looks good, will go with this approach. Thanks! |
…string by default
4190889
to
c0841ed
Compare
Thanks so much @arishta-dev ! That makes sense to me, but I'll double check with @alisman regarding the approach on Monday |
Describe changes proposed in this pull request:
Problem:
The server config API returns all values as strings, including boolean values (like 'true' or 'false'). Our current code only converts those strings to actual boolean values if they exist in our
ServerConfigDefaults
file. This caused a few boolean values likeskin_show_donate_button
to be rendered as string:true
.Solution:
Added a second pass after applying defaults that looks at all config values from the API and converts any 'true'/'false' strings to proper boolean values.
Checks
Any screenshots or GIFs?
If this is a new visual feature please add a before/after screenshot or gif
here with e.g. Giphy CAPTURE or Peek
Notify reviewers
Read our Pull request merging
policy. It can help to figure out who worked on the
file before you. Please use
git blame <filename>
to determine thatand notify them either through slack or by assigning them as a reviewer on the PR