Concatenating multiple variables with a newline as a separator

Hello,

I have recently noticed that the Status Panel in the Grafana dashboard is running on a deprecated plugin, so I am trying to recreate my status panel using as Canvas panel. The panel is being used to show warnings and faults, and essentially what it does is query some binary variables, and then list the variables that are high.

I am able to get each variable to appear/disappear when it’s high/low (respectively) when I give them each an element of their own, but I think it would look neater if I brought in the variables as strings and then concatenated the non-zero variables into a single string to display. I am having difficulties when it comes to concatenating the strings in that I would like each string to be separated by a newline so that it is clearer to see each individual active warning. For some reason using CONCAT_WS(‘\n’, …) doesn’t work, and I have tried using CHAR(10) and CHAR(13) as well. The string still appears as all on one line.

Does anyone have any ideas of what I might be doing wrong?

Here is the SELECT section of my query:

SELECT
CONCAT_WS(‘\n’,
CASE WHEN (db_Timestamp < DATE_SUB( NOW(), INTERVAL 60 MINUTE )) THEN “Last report too old” END,
CASE WHEN state_CF THEN “Critical fault” END,
CASE WHEN state_NCF THEN “Non-critical fault” END,
CASE WHEN state_BS THEN “User stop” END,
CASE WHEN state_IR THEN “Inverter not ready” END,
CASE WHEN state_LWS THEN “Low wind speed” END,
CASE WHEN state_HWS THEN “High wind speed” END,
CASE WHEN state_TMP THEN “Temperature too low” END,
CASE WHEN (NOT state_Brake_State_Rly) && (speedAverage = 0) && (windSpeedAverage > 3.5) THEN “Not spinning” END
) AS warnings