Open ChristopherBull opened 4 years ago
I managed to get my instance working by using:
{Authorization: 'api-key ' + ctrl.template('$apiKey')}
I was lead to believe that unescaped dashboard variables could be parsed within a string, as I can see an example of that in the screenshot images in your README file.
My previous work-around no longer works with the latest versions of Grafana.
I have a varable in a template called apiKey
with a template value of REPLACE-WITH-KEY
. I update the variable in the Grafana web UI with an API key (it is still there after refreshing). But when I look at Chrome's inspection view, the AJAX panel is sending REPLACE-WITH-KEY
instead of the updated private API key. Presumably because it is getting the template variable value instead of the updated actual variable value.
I do not know how to get the variable value as I cannot find the documentation for ctrl
. Please send help.
Grafana version: 7.0.6 AJAX Panel version: 0.0.7-dev
This appears to be a joint problem with Grafana and this plugin:
I have a dashboard variable which I refer to in the 'Headers' field:
{Authorization: "api-key $apiKey"}
But Chrome Inspector shows it passing the variable as a string, instead of parsing the value of the variable. Chrome outputs:
authorization | api-key $apiKey
I expect it to parse the variable, i.e:
authorization | api-key the-value-of-my-variable
I can see the variable exists and has the correct value (as you have handily shown a list of variables in the panel edit page).
Variables are correctly parsed for the URL. So looks as if it is specific to parsing the header.
Would be good if there was a preview of the header too.
Grafana version: 6.7.2 AJAX Panel version: 0.0.6 (latest)