|
|
@ -34,7 +34,6 @@ export function getLastMetricValue( |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
export function filterMetricListByAlias(list: any[], alias: string | undefined, option: string): any[] { |
|
|
|
export function filterMetricListByAlias(list: any[], alias: string | undefined, option: string): any[] { |
|
|
|
console.log(list); |
|
|
|
|
|
|
|
const filteredSeries = _.filter(list, (serie) => serie.alias === alias); |
|
|
|
const filteredSeries = _.filter(list, (serie) => serie.alias === alias); |
|
|
|
if (filteredSeries.length === 0) { |
|
|
|
if (filteredSeries.length === 0) { |
|
|
|
throw new Error(`${option}: Can't find metric for ${alias} name.`); |
|
|
|
throw new Error(`${option}: Can't find metric for ${alias} name.`); |
|
|
|