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

Receiving "Cannot read property 'queries' of undefined" while using PostgreSQL dashboard CorpGlory/grafana-data-exporter#23 #97

Merged
merged 3 commits into from
Sep 25, 2020

Conversation

sblrok
Copy link
Contributor

@sblrok sblrok commented Sep 25, 2020

CorpGlory/grafana-data-exporter#23
Problem
Library tried to send requests for an invalid url.
Also, data from the "datasource" object was lost
Solution
Changed url to "/api/tsdb/query"
Getting data from "target" object

@sblrok sblrok changed the title WIP: fixed "Receiving "Cannot read property 'queries' of undefined" while using PostgreSQL dashboard #23" Fixed "Receiving "Cannot read property 'queries' of undefined" while using PostgreSQL dashboard #23" Sep 25, 2020
@rozetko rozetko changed the title Fixed "Receiving "Cannot read property 'queries' of undefined" while using PostgreSQL dashboard #23" Receiving "Cannot read property 'queries' of undefined" while using PostgreSQL dashboard CorpGlory/grafana-data-exporter#23 Sep 25, 2020
@rozetko rozetko merged commit 896b0d0 into master Sep 25, 2020
@rozetko rozetko deleted the postgresql-datasource-issue-23 branch September 25, 2020 21:08
@@ -48,7 +54,7 @@ export class PostgresMetric extends AbstractMetric {

// TODO: support more than 1 metric (each res.data.results item is a metric)
let results = res.data.results[this._targetName];
if (results.series === undefined) {
if(!results.series) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like this implicit things....

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

Successfully merging this pull request may close these issues.

3 participants