From ded6228837c9c94243db21d85dfa3343d8244513 Mon Sep 17 00:00:00 2001 From: Matthias Loibl Date: Tue, 8 Feb 2022 23:57:25 +0100 Subject: [PATCH] Fix ErrorsGraph by actually using mapped values --- ui/src/components/graphs/ErrorsGraph.tsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/ui/src/components/graphs/ErrorsGraph.tsx b/ui/src/components/graphs/ErrorsGraph.tsx index 9421507a..623dad1b 100644 --- a/ui/src/components/graphs/ErrorsGraph.tsx +++ b/ui/src/components/graphs/ErrorsGraph.tsx @@ -48,10 +48,12 @@ const ErrorsGraph = ({ api, labels, grouping, timeRange, uPlotCursor }: ErrorsGr setErrorsLoading(true) api.getREDErrors({ expr: labelsString(labels), grouping: labelsString(grouping), start, end }) .then((r: QueryRange) => { - const [x, ...ys] = r.values - ys.map((y: number[]) => [ - y.map((v: number) => 100 * v) - ]) + let [x, ...ys] = r.values + ys = ys.map((y: number[]) => + y.map(((v: number) => + 100 * v + )) + ) setErrorsLabels(r.labels) setErrorsQuery(r.query)