|
|
|
@ -19,14 +19,14 @@ export class Series {
|
|
|
|
|
if(this.gaugeValueOptions.useMetric && _.isEmpty(this.gaugeValueOptions.metricName)) { |
|
|
|
|
throw new Error(`Value or metric is not selected.`); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
this._selectedSerieName = this.gaugeValueOptions.metricName; |
|
|
|
|
this.processor = new DataProcessor({}); |
|
|
|
|
const series = grafanaData.series; |
|
|
|
|
const seriesList = this.processor.getSeriesList({ |
|
|
|
|
dataList: series, |
|
|
|
|
dataList: grafanaData.series, |
|
|
|
|
range: timeRange, |
|
|
|
|
}); |
|
|
|
|
console.log('_seriesList', seriesList); |
|
|
|
|
|
|
|
|
|
const filteredSeries = _.filter(seriesList, serie => serie.alias === this._selectedSerieName); |
|
|
|
|
if(filteredSeries.length === 0) { |
|
|
|
|
throw new Error(`Can't find metric for ${this._selectedSerieName} name`); |
|
|
|
@ -34,7 +34,7 @@ export class Series {
|
|
|
|
|
if(filteredSeries.length > 1) { |
|
|
|
|
throw new Error(`Get ${filteredSeries.length} metrics for ${this._selectedSerieName} name. Please choose one`); |
|
|
|
|
} |
|
|
|
|
console.log('filteredSeries', filteredSeries); |
|
|
|
|
|
|
|
|
|
this._seriesList = this._updateSeriesListWithChartwerkParams(filteredSeries); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|