mirror of
https://github.com/grafana/grafana.git
synced 2025-02-11 16:15:42 -06:00
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:
parent
930fd8b43a
commit
d0d5b38572
@ -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 {
|
||||
|
@ -35,6 +35,7 @@ function convertTimeSeriesToSeriesData(timeSeries: TimeSeries): SeriesData {
|
||||
},
|
||||
],
|
||||
rows: timeSeries.datapoints,
|
||||
labels: timeSeries.tags,
|
||||
};
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user