NoSQL datasources have id field in their config.url field.
SQL datasources don't have id field in config.url. All SQL queries are processed at /api/tsdb endpoint so datasource ID can be found only in response.
Solution
In ds-request-response event callback we get datasource ID from config.data.queries field if it exists, otherwise ID is taken from config.url.
fixes #33
fixes #32
Changes
get datasourceId for SQL datasources from config.data.queries field
Problem
NoSQL datasources have
id
field in theirconfig.url
field. SQL datasources don't haveid
field inconfig.url
. All SQL queries are processed at/api/tsdb
endpoint so datasource ID can be found only in response.Solution
In
ds-request-response
event callback we get datasource ID fromconfig.data.queries
field if it exists, otherwise ID is taken fromconfig.url
.fixes #33 fixes #32
Changes
datasourceId
for SQL datasources fromconfig.data.queries
field