I am building a “status check” view. I would like to show one of three values, for each status:Healthy
, Unhealthy
, and Critical
, based on the value of some underlying SQL query building a metric.
The way I currently have it built is with three hidden dimensions (one for each status), and a collections of metric dimensions for each things I want to track. Each metric dimension has a SQL CASE that returns a reference to one of my status dimensions, depending on its value.
This all works fine, but I would really like to add color to each status’s text (green, yellow, red). I added HTML annotations to the status dimensions, but it appears that referencing those dimensions in my metrics only pulls the value, not the HTML rendered value.
I know one way to solve this is to include my HTML formatting on each metric dimension, but I would rather “refactor” it out into a common spot so all metric dimensions can refer to a common formatter.