mirror of
https://github.com/grafana/grafana.git
synced 2024-12-02 13:39:19 -06:00
Merge pull request #13708 from svenklemm/interpolateVariable
postgres: fix template variables error
This commit is contained in:
commit
cf93b1e700
@ -20,7 +20,7 @@ export class PostgresDatasource {
|
|||||||
this.interval = (instanceSettings.jsonData || {}).timeInterval;
|
this.interval = (instanceSettings.jsonData || {}).timeInterval;
|
||||||
}
|
}
|
||||||
|
|
||||||
interpolateVariable(value, variable) {
|
interpolateVariable = (value, variable) => {
|
||||||
if (typeof value === 'string') {
|
if (typeof value === 'string') {
|
||||||
if (variable.multi || variable.includeAll) {
|
if (variable.multi || variable.includeAll) {
|
||||||
return this.queryModel.quoteLiteral(value);
|
return this.queryModel.quoteLiteral(value);
|
||||||
@ -37,7 +37,7 @@ export class PostgresDatasource {
|
|||||||
return this.queryModel.quoteLiteral(v);
|
return this.queryModel.quoteLiteral(v);
|
||||||
});
|
});
|
||||||
return quotedValues.join(',');
|
return quotedValues.join(',');
|
||||||
}
|
};
|
||||||
|
|
||||||
query(options) {
|
query(options) {
|
||||||
const queries = _.filter(options.targets, target => {
|
const queries = _.filter(options.targets, target => {
|
||||||
|
Loading…
Reference in New Issue
Block a user