Dashboarding
Dynatrace dashboards, notebooks, and data explorer explained.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Use "If" based on the variable to show an image

wellpplava
Contributor

Hello!

Is it possible to use the "code" of the new dashboard version to display an image using a URL through the variable selected in the dashboard?

The idea is to display the corresponding image of the product selected in the variable.

2 REPLIES 2

ChadTurner
DynaMight Legend
DynaMight Legend

You can put images on a dashboard, however, I don't think you can add in logic so when you lick windows sever the image goes from a Linux Logo to a Windows logo. Or selecting a VMware host vs onprem host. maybe with workflows to update the image on the dashboard but that would result in the need of constant refreshing. 

-Chad

pcifuef
Observer

Hi, perhaps you’ve already solved your question, but we did it the following way:

  1. Add your image repository in Settings -> Allowed URL pattern rules.
  2. Add a table query like this to your notebook / dashboard, Display the image in the table if the error count for my service exceeds 50.:

fetch bizevents
| filter contains(event.type,"web.event.")
| filter class == "Error"
| summarize count(), by:{service}
| filter `count()` > 50
| fieldsAdd URL_IMG= "YOUR_IMG/GIF_URL(from step1)"
| fieldsAdd IMG= concat("![](",URL_IMG,")")

3. In the table's Visual options, look for the Custom column types setting and add the "IMG" column as a Markdown type.

✌🏻😁 I hope I'm not too late to help!

Featured Posts