VolkovLabs / business-text

The Business Text panel plugin allows you to construct a text visualization template from the values of a dataset returned by a data source query.
https://volkovlabs.io
Apache License 2.0
83 stars 13 forks source link

Not able to see data source After Content Ready #242

Closed pjJedi closed 11 months ago

pjJedi commented 1 year ago

I may just be a total newbie and not always understand everything, but I upgraded my Dynamic Text Panel, and wanted to try out the new features.

I am not able to find the data variable in the after content ready? Am I missing something?

image

Volkovlabs really make my life so much easier!! I don't know how I would have been able to do what I do without you! Thanks!

mikhail-vl commented 1 year ago

@pederjohnJedi Thank you, it should be just data

console.log(data)
pjJedi commented 1 year ago

I tried just data, it gives the same error.

Here is a screenshot of where I can retrieve data on the "before content rendering" and then not on the "after content ready".

I tried it on another docker image too, its doing the same. I am using MySQL as the datasource.

image

mikhail-vl commented 1 year ago

We implemented a single context object for data, Grafana functions for the After Content Ready:

console.log(context, context.data);

I will update documentation:

Screenshot 2023-12-01 at 7 01 40 AM

pjJedi commented 1 year ago

Awesome! Thanks that worked a charm! Much Appreciated

pjJedi commented 1 year ago

I hope its ok if I ask another question about data sources.

If I have 2 queries, how do I access both the queries data? I can access the first query with data.data, how do I access the second one? or do I need to use the dropdown at the bottom to access either?

mikhail-vl commented 11 months ago

@pederjohnJedi We added a new render mode for all queries in the upcoming release.

There is one more PR to merge and I plan to release tomorrow.

mikhail-vl commented 11 months ago

If you interested, you can test the latest CI build.

mikhail-vl commented 11 months ago

We will update document for the context parameter in: https://github.com/VolkovLabs/volkovlabs.io/issues/585