Skip to content

Commit

Permalink
Merge pull request #115 from pyrra-dev/ui-error-rate-map
Browse files Browse the repository at this point in the history
Fix ErrorsGraph by actually using mapped values
  • Loading branch information
metalmatze authored Feb 8, 2022
2 parents 55bc69f + ded6228 commit c45329f
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions ui/src/components/graphs/ErrorsGraph.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit c45329f

Please sign in to comment.