Skip to content

Commit

Permalink
Merge pull request #34 from tangollama/master
Browse files Browse the repository at this point in the history
fix(timeRangeToNrql): handling begin_time and end_time.
  • Loading branch information
tangollama authored Jan 29, 2020
2 parents 899d9de + 50d99a6 commit 446f49d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/utils/timeRangeToNrql/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ export const timeRangeToNrql = function({ timeRange = false }) {

if (timeRange.beginTime && timeRange.endTime) {
return `SINCE ${timeRange.beginTime} UNTIL ${timeRange.endTime}`;
} else if (timeRange.begin_time && timeRange.end_time) {
return `SINCE ${timeRange.begin_time} UNTIL ${timeRange.end_time}`;
} else if (timeRange.duration <= HOUR) {
return `SINCE ${timeRange.duration / MINUTE} MINUTES AGO`;
} else if (timeRange.duration <= DAY) {
Expand Down

0 comments on commit 446f49d

Please sign in to comment.