Skip to content

Commit c45329f

Browse files
authored
Merge pull request #115 from pyrra-dev/ui-error-rate-map
Fix ErrorsGraph by actually using mapped values
2 parents 55bc69f + ded6228 commit c45329f

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

ui/src/components/graphs/ErrorsGraph.tsx

+6-4
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,12 @@ const ErrorsGraph = ({ api, labels, grouping, timeRange, uPlotCursor }: ErrorsGr
4848
setErrorsLoading(true)
4949
api.getREDErrors({ expr: labelsString(labels), grouping: labelsString(grouping), start, end })
5050
.then((r: QueryRange) => {
51-
const [x, ...ys] = r.values
52-
ys.map((y: number[]) => [
53-
y.map((v: number) => 100 * v)
54-
])
51+
let [x, ...ys] = r.values
52+
ys = ys.map((y: number[]) =>
53+
y.map(((v: number) =>
54+
100 * v
55+
))
56+
)
5557

5658
setErrorsLabels(r.labels)
5759
setErrorsQuery(r.query)

0 commit comments

Comments
 (0)