File tree Expand file tree Collapse file tree 3 files changed +10
-5
lines changed Expand file tree Collapse file tree 3 files changed +10
-5
lines changed Original file line number Diff line number Diff line change 1
1
# Changelog
2
2
3
+ ## 1.1.2
4
+
5
+ - Use scoped Variables in template variable replacement
6
+
7
+ ---
8
+
3
9
### 1.1.0
4
10
5
11
- Adds proper type reflection to support all databricks data types. (except type ` BINARY ` which is not supported)
6
- ---
7
12
8
13
### 1.0.0
9
14
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " mullerpeter-databricks-datasource" ,
3
3
"private" : true ,
4
- "version" : " 1.1.1 " ,
4
+ "version" : " 1.1.2 " ,
5
5
"description" : " Databricks SQL Connector" ,
6
6
"scripts" : {
7
7
"build" : " grafana-toolkit plugin:build" ,
Original file line number Diff line number Diff line change 1
- import { DataSourceInstanceSettings } from '@grafana/data' ;
1
+ import { DataSourceInstanceSettings , ScopedVars } from '@grafana/data' ;
2
2
import { DataSourceWithBackend , getTemplateSrv } from '@grafana/runtime' ;
3
3
import { MyDataSourceOptions , MyQuery } from './types' ;
4
4
5
5
export class DataSource extends DataSourceWithBackend < MyQuery , MyDataSourceOptions > {
6
6
constructor ( instanceSettings : DataSourceInstanceSettings < MyDataSourceOptions > ) {
7
7
super ( instanceSettings ) ;
8
8
}
9
- applyTemplateVariables ( query : MyQuery ) {
9
+ applyTemplateVariables ( query : MyQuery , scopedVars : ScopedVars ) {
10
10
const templateSrv = getTemplateSrv ( ) ;
11
11
return {
12
12
...query ,
13
- rawSqlQuery : query . rawSqlQuery ? templateSrv . replace ( query . rawSqlQuery ) : ''
13
+ rawSqlQuery : query . rawSqlQuery ? templateSrv . replace ( query . rawSqlQuery , scopedVars ) : ''
14
14
} ;
15
15
}
16
16
}
You can’t perform that action at this time.
0 commit comments