gbrian / grafana-simple-sql-datasource

Grafana SQL datasource
MIT License
62 stars 20 forks source link

Template variable replaced #11

Closed buiductri closed 7 years ago

buiductri commented 7 years ago

Hi Brian, what a great plugin you made, it works nearly perfect on my study case. But now I have a trouble with the template variable. It seems to be replaced by its value each time the panel refreshed, which will broke the meaning of template because it changes the variable name into it value.

For example: if the template variable [[server]] is having value 'SERVERA' then $server => SERVERA and the query keeps SERVERA instead of $server.

I don't know if this is intention or not, but I prefer keeping the variable name because I really want some dynamic in my query.

I am not good with the js so may I ask you look into this if possible. It will be a great help. Thanks in advanced.

Billy B.

gbrian commented 7 years ago

@bily-gates , LOL! Just realized when working on new queries and fixed! Scoped vars (Repeat panel by template) fixed as well ;) So sorry was so disgusting :( , don't you?

buiductri commented 7 years ago

@gbrian Well, it looks like a tough kid to me, I can't get him so I have to ask for help from his parent. LOL. Now the kid is settle down, thank a lot for the quick update, Brian. Cheers.

Billy B.