Dynamic text panel

Hi,

I am trying to get used to Dynamic text panel and checking functionalities it has to offer.
I am trying button example but does not work as expected.

Any idea?

Moreover, I would like to know if it is possible to implement dropdown on labels using this panel. If yes, how?

1 Like

Can you please expound on “does not work” what exactly is not working?

There should only be a button and not the html content beneath.
Plus onclick func does not work, as it does not display a Hi message.

Please see attached image.

what version of grafana and dynamic text are you on?

works on grafana 9.1.5 and dynamic text 3.1.0

Grafana 9.4.3 and DTP 3.1.0

in your grafana config you need the following

disable_sanitize_html = true

[panels]
# here for to support old env variables, can remove after a few months
enable_alpha = false
disable_sanitize_html = true     
2 Likes

@yosiasz You are correct. It’s sanitizing.

It’s explained in the plugin documentation:

2 Likes

@yosiasz and @mikhailvolkov Thanks for the response. I will check this.
Moreover, I visited Volkov Labs and I wanted to know which if this is Grafana panels which is being used ? if yes, which panel it is? I have same kind of requirement.

See attached image please.

Instead of inage please post the link to this panel cause volkov has tons of them

Link in my message would have redirected you to the same panel I am referring to.

https://release.volkovlabs.io/d/p2QspFaVk/release?orgId=1&refresh=5m&viewPanel=2

1 Like

@yosiasz and @mikhailvolkov

let me brief about my requirement.

I am using loki as data source and stream/labels I am getting is →
timestamp
event type
and Line (has some json content.)

  1. Need to convert unix based timestamp to ISO.
  2. Now, event type will have collapsible content, when you click on event type value, it will show the json structured data/content in an collapsible manner. Just we apply in markdown. (Collapsed block for GitHub markdown)

Let me know if any suggestion or help on this.

Is this question related to your first question or is this something new?

Basically, I am checking how DT panel can help with my requirement.

Hence, I was going through doc and came across issue. So, I posted it here. (First question)

At the end, what I want to achieve with DT is what I have just posted.

The panel I have asked, which is being used in volkov labs, I can think of something similar to implement as well (if that works)

It is all related to my requirement which I have posted already.

This looks to be the calendar grafana plugin see details here

1 Like

@yosiasz Bingo!

@parpitku Here is the latest video about the Calendar panel

@yosiasz @mikhailvolkov Thanks for your help.

Let me know if any idea for below as well.

I am using loki as data source and stream/labels I am getting is →
timestamp
event type
and Line (has some json content.)

  1. Need to convert unix based timestamp to ISO.
  2. Now, event type will have collapsible content, when you click on event type value, it will show the json structured data/content in an collapsible manner. Just we apply in markdown. (Collapsed block for GitHub markdown)

Let me know if any suggestion or help on this

@parpitku Try the calendar panel.

  1. Unix-based timestamp and ISO supported out of the box.
  2. Event Type can be selected as a label and displayed using cards in the side Drawer when looking at the particular event of the whole day.

The JSON content can be parsed into separate fields and displayed as titles, descriptions, colors, etc.

We have a new version coming later this week.

How to handle multiple data source in dynamic text panel?

Use mixed multiple queries.

Replied on YouTube comments as well.

How do you access fields from multiple data sources in dynamic text panel?

I created 2 queries from 2 different data sources. Each of them returns only one row.

I am trying to display all the fields from both the queries in one single graphic. If I choose “All rows”, then even using “data.0” gives only the results of the first query. Using “data.1” does not return the second query, which is to be expected, I guess - because I think data works within only one single dataset.

My question is, if there are 2 datasets as a result of the A and B query, how do I pick the data from the second dataset? In some other components (like Canvas), I get the results of the second query merged with the first, so that picking the field name returns the data from either of the 2 datasets. How can I do the same within Dynamic Text?