Skip to content

Commit

Permalink
history: fix empty and error in timeline requests
Browse files Browse the repository at this point in the history
  • Loading branch information
bmario committed Feb 24, 2023
1 parent c4a6f42 commit 335d395
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/history/metricq-history.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,10 @@ class Timeline {
return this;
}

_parse_result(result) {
let data = result["data"];
_parse_result({ data }) {
for (const metric_data of Object.values(data)) {
if (metric_data.mode === "empty" || metric_data.error !== undefined)
continue;
for (const value of metric_data[metric_data.mode]) {
value.timestamp = moment(value.timestamp / 1e6);
}
Expand Down

0 comments on commit 335d395

Please sign in to comment.