Skip to content

Commit 51e3408

Browse files
fix: Fixes public api changes
1 parent 255ae35 commit 51e3408

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

pkg/plugin/datasource.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ var (
3131
)
3232

3333
// NewDatasource creates a new datasource instance.
34-
func NewDatasource(settings backend.DataSourceInstanceSettings) (instancemgmt.Instance, error) {
34+
func NewDatasource(ctx context.Context, settings backend.DataSourceInstanceSettings) (instancemgmt.Instance, error) {
3535
log.DefaultLogger.Debug("NewDatasource called")
3636

3737
// settings contains normal inputs in the .JSONData field in JSON byte form

src/datasource.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export class DataSource extends DataSourceWithBackend<HaystackQuery, HaystackDat
4545

4646
let ops: string[] = [];
4747

48-
let defField = frame?.fields?.find((field: Field<any, [string]>) => {
48+
let defField = frame?.fields?.find((field: Field<[string]>) => {
4949
return field.name === 'def';
5050
});
5151
if (defField != null) {
@@ -58,7 +58,7 @@ export class DataSource extends DataSourceWithBackend<HaystackQuery, HaystackDat
5858
});
5959
} else {
6060
// Include back-support for old `ops` format, which uses "name", not "defs". Used by nhaystack
61-
let nameField = frame?.fields?.find((field: Field<any, [string]>) => {
61+
let nameField = frame?.fields?.find((field: Field<[string]>) => {
6262
return field.name === 'name';
6363
});
6464
if (nameField != null) {
@@ -79,7 +79,7 @@ export class DataSource extends DataSourceWithBackend<HaystackQuery, HaystackDat
7979
return availableQueryTypes;
8080
}
8181

82-
applyTemplateVariables(query: HaystackQuery, scopedVars: ScopedVars): Record<string, any> {
82+
applyTemplateVariables(query: HaystackQuery, scopedVars: ScopedVars): HaystackQuery {
8383
return {
8484
...query,
8585
eval: getTemplateSrv().replace(query.eval, scopedVars, 'csv'),

0 commit comments

Comments
 (0)