Connecting Data Visualizer React app front-end to dhis2.39 backend

I am writing to seek your assistance in that I am facing with the configuration of the 2.39 backend and the Data Visualizer front-end React app.

I have been trying to configure the 2.39 backend from scratch and connect it to the Data Visualizer front-end React app, but have been unable to do so successfully. I have added the necessary CORS whitelist on the settings access backend instance, but I am still unable to connect the two.

Note from app: I am successfully connect on
Server : DHIS 2 Demo - Sierra Leone
Username : admin
Password : district

But I want to connect from my server

Thank you for your assistance, and I look forward to hearing from you soon.

Hi @rcpoudel

Thank you for sharing! Are you able to access the server using a custom app but only seeing this issue when trying to use the Data Visualizer app instead?

Could you share the steps to reproduce this issue?

BTW, it’d be interesting if you share with the community and software developers, what you’re trying to configure as it could be a feature request that’s helpful for the community.

Thank you!

Dear @Gassim

I have successfully configured Ubuntu 20.04, Java 11, and Postgres 12.6 on my system. You can check the following URL: http://202.166.195.132:8080/ and login with the username “test” and password “Test@123”.

An issue that I am experiencing with my server of this instance with connect dhis react app.( Configuration locally )

As a developer, I am eager to fully explore all the existing features and to join the developer community. Currently, I am studying the workflow and development process of React applications and backend systems. As a developer from Nepal, my team and I are planning to localize the Nepali calendar selection within the data visualizer’s “Periods” section, specifically within the “Fixed Periods” option. This will allow users to select the Nepali calendar when customizing their calendar settings.

I am reaching out to you because I am a new user of DHIS2, and I am interested in connecting with the developer community to learn more about the platform.

Thank you,

1 Like

Hi @rcpoudel , are you running the app from localhost or somewhere else? a potential issue could be mixed content as an error would be thrown trying to call an http endpoint from an https client. Are you getting an error on the console within these lines?

Also regarding Nepali support, please note we have a PR for Data Visualiser that supports Nepali fixed periods: feat: support non-gregorian fixed periods by kabaros · Pull Request #2233 · dhis2/data-visualizer-app · GitHub … it would be great if you can test it and point it to your DHIS2 implementation from the deploy link or locally (after clearing https://*.netlify.app in the CORS list) and let us know of any issues.

We also built some UI components that support a Nepali day picker , and these are already released in dhis/ui, here it is in the docs and storybook , any feedback for either will be highly appreciated (:

3 Likes

Dear @mozafar

Thank you for your response.

Regarding your query about the app, I am running dhis2 instance on server(http://202.166.195.132:8080 ) and development visualization app on localhost.

I have attached the issue regarding
" Mixed Content: The page at ‘https://pr-2233--dhis2-data-visualizer.netlify.app/’ was loaded over HTTPS, but requested an insecure resource ‘http://202.166.195.132:8080/api/system/info’. This request has been blocked; the content must be served over HTTPS"


Regarding Nepali Calendar
Based on my testing on both the https://pr-2233--dhis2-data-visualizer.netlify.app/ and dhis debug link, I can confirm that everything works perfectly as expected. Furthermore, I have also tested the UI components on my local machine and can confirm that they are working properly. I will keep you updated on any developments related to Nepali calendar updates coming from Nepal.

Thank you,

@rcpoudel will you be able to install SSL on your server? here is a guide on DHIS2 docs if you’re using nginx

Good to hear about the PRs and UI component … if you have any notes or notice any issues, please don’t hesitate to get in touch

2 Likes

Dear @mozafar

I have recently installed an SSL certificate on my server at dhis.amakomaya.com, but I am still experiencing issues connecting to the visualizer app.

I have attached a document outlining the error message that I am receiving

Additionally, I would like to request the latest version of the visualizer app with war file. If possible, could you please share the updated file with me so that I can ensure that my visualizer app is up-to-date?

Thank you,

Dear @rcpoudel ,

I think this latest error is about the CORS whitelist, you’d need For this to add https://*.netlify.app under the CORS whitelist in your DHIS2 test instances (system settings → Access → CORS whitelist). Let me know if that works.

We should have a war file ready this week with latest core and apps that support Nepali calendar. I will keep you in the loop.

Dear @mozafar,

I have tried logging into the server URL https://dhis.amakomaya.com using the username “test” and password “Test@123,” but I am still encountering the same error.

On: https://pr-2233--dhis2-data-visualizer.netlify.app

If it is possible to verify the above credentials. Could you kindly check and provide me with a solution?

Thank you for keeping me informed about latest war with Nepali Calender

@rcpoudel it is hard to tell and I do not know of an easy way to reset the admin password. But if the user is locked (because of too many failed login attempts, as I’d suspect), then you could connect to the database with psql and run update userinfo set disabled = false where username='test' and try again. Otherwise, you could also copy the password hash of another user with a known password into the database entry for this user update userinfo set password='HASH_VALUE' where username = 'test';

Dear @mozafar

I am writing to inquire about the release of the 2.38 war file that support Nepali calendar for purposes. We have been eagerly awaiting its release and I was wondering if there is any good news regarding its availability.

I apologize for any inconvenience this may cause and for bothering you with this request.

And,
As per our previous conversation, I have tested the user manually logging in from the web and it works, but I am still unable to connect. Despite my efforts, I have been unable to resolve this issue.

Thank you,

Hi @rcpoudel - sorry for the late reply as I’ve been off most of the last two weeks. I believe you should have received the war? otherwise let me know on (mozafar at dhis2.org) and we can continue the conversation there

3 Likes