Skip to content

Commit ee22b0c

Browse files
authored
Fix Array Vector deprecation (#55)
* Updated ArrayVector to use Array per deprecation * Fix imports
1 parent ffed0d0 commit ee22b0c

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/preprocessors/timeseries.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ArrayVector, Field, FieldType, MutableDataFrame } from '@grafana/data';
1+
import { Field, FieldType, MutableDataFrame } from '@grafana/data';
22
import { getTemplateSrv } from '@grafana/runtime';
33
import { LightstepQuery, QueryTimeseriesRes } from '../types';
44

@@ -50,11 +50,11 @@ export function preprocessTimeseries(res: QueryTimeseriesRes, query: LightstepQu
5050
const timestampToIndexMap = createTimestampMap(timestamps);
5151

5252
const dataFrameFields: Field[] = [
53-
{ name: 'Time', type: FieldType.time, values: new ArrayVector(timestamps), config: {} },
53+
{ name: 'Time', type: FieldType.time, values: timestamps, config: {} },
5454
];
5555

5656
series.forEach((s) => {
57-
const values = new ArrayVector(new Array(timestamps.length));
57+
const values = new Array<number>(timestamps.length);
5858

5959
// API will currently return undefined for series.points for series without
6060
// data instead of an empty array
@@ -63,7 +63,7 @@ export function preprocessTimeseries(res: QueryTimeseriesRes, query: LightstepQu
6363
const timestampIndex = timestampToIndexMap.get(timestamp);
6464

6565
if (timestampIndex !== undefined) {
66-
values.set(timestampIndex, value);
66+
values[timestampIndex] = value;
6767
}
6868
});
6969
}

0 commit comments

Comments
 (0)