Skip to content
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

Getting rid or changing the url check for grafana datasource url's #75

Closed
Faffnir opened this issue Oct 27, 2017 · 4 comments
Closed

Getting rid or changing the url check for grafana datasource url's #75

Faffnir opened this issue Oct 27, 2017 · 4 comments
Assignees

Comments

@Faffnir
Copy link

Faffnir commented Oct 27, 2017

Currently every datasource is checked if it is starting with http(s) which leads to an error in the newest version of grafana (4.6.0) which supports postgresql as a datasource.
With this check it is impossible to set a valid postgresql datasource.

Valid solutions would be to remove this check or check the datasource type before.
What do you think?

@btravouillon
Copy link
Member

Hi @Faffnir,

Thank you for reporting this issue.
Indeed the url parameter must be host:port for both mysql and postgres datasources.

I will give a try with the check of the datasource type.

@btravouillon btravouillon self-assigned this Oct 27, 2017
@btravouillon
Copy link
Member

By looking at the granafa code, DataSource.Url is a string. I can't find any test nor documentation about a formal format for this string, thus we can expect other format than https?://www.example.com or host:port in the future.

@Faffnir , can you submit a PR with your change?

@btravouillon
Copy link
Member

Fix by #76
Thank you @Faffnir .

@Faffnir
Copy link
Author

Faffnir commented Nov 8, 2017

thank you for the fast merge @actatux

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants