simPod / GrafanaJsonDatasource

Grafana datasource to load JSON data over your arbitrary HTTP backend
https://grafana.com/grafana/plugins/simpod-json-datasource/
MIT License
355 stars 72 forks source link

Exception when using the data source to query variables: TypeError Cannot read properties of undefined (reading 'datasource') #606

Closed bigqi0812 closed 3 months ago

bigqi0812 commented 4 months ago

Grafana: 9.5.1 plugin version 0.6.4

Steps:

  1. create a simple json data source pointing to an http endpoint.
  2. Create a dashboard with a "query" type of variable using the just created data source.
  3. click on "query data"

Expected:

Grafana should make the /variable query to the http endpoint via the simple json data source

Actual:

exception thrown: TypeError: Cannot read properties of undefined (reading 'datasource')

Exception Details

actions.ts:893 TypeError: Cannot read properties of undefined (reading 'datasource') at query (VariableSupport.ts:31:32) at I (runRequest.ts:201:37) at A (runRequest.ts:137:26) at up.runRequest (queryRunners.ts:149:12) at gp.onNewRequest (VariableQueryRunner.ts:120:10) at U.next (Subscriber.js:96:33) at P._next (Subscriber.js:63:26) at P.next (Subscriber.js:34:18) at Subject.js:41:34 at s (errorContext.js:19:9)

Everything was working fine with plugin version 0.6.3

simPod commented 4 months ago

Grafana 9 is not supported on v0.6. I'll bump the following constraint in v0.6.5

https://github.com/simPod/GrafanaJsonDatasource/blob/002b9ee3c1af85fc77290f19c99bfa42f08667d6/src/plugin.json#L40

There has been lib bump https://github.com/simPod/GrafanaJsonDatasource/pull/443

bigqi0812 commented 4 months ago

Thank you for your prompt reply. Do you mean I will need to use grafana >10.0.0?

simPod commented 4 months ago

Yes, or downgrade to v0.6.3.

On Tue, Jul 16, 2024 at 11:25 PM bigqi0812 @.***> wrote:

Thank you for your prompt reply. Do you mean I will need to use grafana

10.0.0?

— Reply to this email directly, view it on GitHub https://github.com/simPod/GrafanaJsonDatasource/issues/606#issuecomment-2231853658, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACQAJIUZIC4CO3VA2UO2ULZMWFWJAVCNFSM6AAAAABK7LDJ2SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMZRHA2TGNRVHA . You are receiving this because you commented.Message ID: @.***>

github-actions[bot] commented 3 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

github-actions[bot] commented 3 months ago

This issue has not seen any activity since it was marked stale. Closing.

simPod commented 2 months ago

I have submitted new version to Grafana