Embedding a Chart in a standard HTML Report

Hi Devs

Is it necessary to include these parameters in a standard HTML Report

chartPlugin.url = “http://localhost:9090/dhis”;

chartPlugin.username = “user”;

chartPlugin.password = “password”;

If yes is there a script/api call to get the user password.

Regards

Pooben

This message and any attachments are subject to a disclaimer published at http://www.hisp.org/policies.html#comms_disclaimer. Please read the disclaimer before opening any attachment or taking any other action in terms of this electronic transmission. If you cannot access the disclaimer, kindly send an email to disclaimer@hisp.org and a copy will be provided to you. By replying to this e-mail or opening any attachment you agree to be bound by the provisions of the disclaimer.

Hi Pooben

Assuming that you want data from the same instance, not you don’t want to use username/password, that would be very bad. Just fetch the resource directly, no authentication needed.

···

On Fri, Nov 25, 2016 at 5:30 PM, Pooben Dass pooben@hisp.org wrote:

Hi Devs

Is it necessary to include these parameters in a standard HTML Report

chartPlugin.url = “http://localhost:9090/dhis”;

chartPlugin.username = “user”;

chartPlugin.password = “password”;

If yes is there a script/api call to get the user password.

Regards

Pooben

This message and any attachments are subject to a disclaimer published at http://www.hisp.org/policies.html#comms_disclaimer. Please read the disclaimer before opening any attachment or taking any other action in terms of this electronic transmission. If you cannot access the disclaimer, kindly send an email to disclaimer@hisp.org and a copy will be provided to you. By replying to this e-mail or opening any attachment you agree to be bound by the provisions of the disclaimer.


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

Morten Olav Hansen

Senior Engineer, DHIS 2

University of Oslo

http://www.dhis2.org

Hi Jan

Thanks.

It works without the username and password but without the url parameter it does not work. This is the error that displays dhis-web-reporting/undefined/api/me/user-account.json 404 (Not Found)

Thanks again

Pooben

This message and any attachments are subject to a disclaimer published at http://www.hisp.org/policies.html#comms_disclaimer. Please read the disclaimer before opening any attachment or taking any other action in terms of this electronic transmission. If you cannot access the disclaimer, kindly send an email to disclaimer@hisp.org and a copy will be provided to you. By replying to this e-mail or opening any attachment you agree to be bound by the provisions of the disclaimer.

···

On Fri, Nov 25, 2016 at 12:56 PM, Jan Henrik Øverland jan@dhis2.org wrote:

Hi Pooben,

Url, username and password are only needed for CORS purposes.

Not sure however if it will work without the url currently. Give it a try. All requests should work well without the user credentials though.

Jan

On 25 November 2016 at 11:30, Pooben Dass pooben@hisp.org wrote:

Hi Devs

Is it necessary to include these parameters in a standard HTML Report

chartPlugin.url = “http://localhost:9090/dhis”;

chartPlugin.username = “user”;

chartPlugin.password = “password”;

If yes is there a script/api call to get the user password.

Regards

Pooben

This message and any attachments are subject to a disclaimer published at http://www.hisp.org/policies.html#comms_disclaimer. Please read the disclaimer before opening any attachment or taking any other action in terms of this electronic transmission. If you cannot access the disclaimer, kindly send an email to disclaimer@hisp.org and a copy will be provided to you. By replying to this e-mail or opening any attachment you agree to be bound by the provisions of the disclaimer.

Jan Henrik Øverland

Software developer, DHIS 2

University of Oslo

http://www.dhis2.org

Yes. One could use … “…/” as the url value and it works.

Thank you

This message and any attachments are subject to a disclaimer published at http://www.hisp.org/policies.html#comms_disclaimer. Please read the disclaimer before opening any attachment or taking any other action in terms of this electronic transmission. If you cannot access the disclaimer, kindly send an email to disclaimer@hisp.org and a copy will be provided to you. By replying to this e-mail or opening any attachment you agree to be bound by the provisions of the disclaimer.

···

On Fri, Nov 25, 2016 at 1:08 PM, Jan Henrik Øverland jan@dhis2.org wrote:

Is it OK to just provide the url for now?

On 25 November 2016 at 12:07, Pooben Dass pooben@hisp.org wrote:

Hi Jan

Thanks.

It works without the username and password but without the url parameter it does not work. This is the error that displays dhis-web-reporting/undefined/api/me/user-account.json 404 (Not Found)

Thanks again

Pooben

This message and any attachments are subject to a disclaimer published at http://www.hisp.org/policies.html#comms_disclaimer. Please read the disclaimer before opening any attachment or taking any other action in terms of this electronic transmission. If you cannot access the disclaimer, kindly send an email to disclaimer@hisp.org and a copy will be provided to you. By replying to this e-mail or opening any attachment you agree to be bound by the provisions of the disclaimer.


Jan Henrik Øverland

Software developer, DHIS 2

University of Oslo

http://www.dhis2.org

On Fri, Nov 25, 2016 at 12:56 PM, Jan Henrik Øverland jan@dhis2.org wrote:

Hi Pooben,

Url, username and password are only needed for CORS purposes.

Not sure however if it will work without the url currently. Give it a try. All requests should work well without the user credentials though.

Jan

On 25 November 2016 at 11:30, Pooben Dass pooben@hisp.org wrote:

Hi Devs

Is it necessary to include these parameters in a standard HTML Report

chartPlugin.url = “http://localhost:9090/dhis”;

chartPlugin.username = “user”;

chartPlugin.password = “password”;

If yes is there a script/api call to get the user password.

Regards

Pooben

This message and any attachments are subject to a disclaimer published at http://www.hisp.org/policies.html#comms_disclaimer. Please read the disclaimer before opening any attachment or taking any other action in terms of this electronic transmission. If you cannot access the disclaimer, kindly send an email to disclaimer@hisp.org and a copy will be provided to you. By replying to this e-mail or opening any attachment you agree to be bound by the provisions of the disclaimer.

Jan Henrik Øverland

Software developer, DHIS 2

University of Oslo

http://www.dhis2.org