Refactor: Rename Tags to Labels in SeriesData (simple) (#16284)

* rename Tags to Labels in SeriesData

* copy timeseries tags to labels
This commit is contained in:
Ryan McKinley 2019-03-29 01:24:16 -07:00 committed by Torkel Ödegaard
parent 930fd8b43a
commit d0d5b38572
2 changed files with 4 additions and 2 deletions

View File

@ -21,7 +21,7 @@ export interface Field {
dateFormat?: string; // Source data format
}
export interface Tags {
export interface Labels {
[key: string]: string;
}
@ -29,7 +29,7 @@ export interface SeriesData {
name?: string;
fields: Field[];
rows: any[][];
tags?: Tags;
labels?: Labels;
}
export interface Column {
@ -51,6 +51,7 @@ export interface TimeSeries {
target: string;
datapoints: TimeSeriesPoints;
unit?: string;
tags?: Labels;
}
export enum NullValueMode {

View File

@ -35,6 +35,7 @@ function convertTimeSeriesToSeriesData(timeSeries: TimeSeries): SeriesData {
},
],
rows: timeSeries.datapoints,
labels: timeSeries.tags,
};
}