Skip to content

Commit

Permalink
fix time range selection run merge request
Browse files Browse the repository at this point in the history
  • Loading branch information
monicawoj committed Mar 2, 2023
1 parent b7947c8 commit bca64ef
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions ui/packages/shared/profile/src/ProfileSelector/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -252,12 +252,19 @@ const ProfileSelector = ({
to={querySelection.to}
profile={profileSelection}
setTimeRange={(range: DateTimeRange) => {
const from = range.getFromMs();
const to = range.getToMs();
let mergedProfileParams = {};
if (query.profileType().delta) {
mergedProfileParams = {mergeFrom: from, mergeTo: to};
}
setTimeRangeSelection(range);
selectQuery({
expression: queryExpressionString,
from: range.getFromMs(),
to: range.getToMs(),
from,
to,
timeSelection: range.getRangeKey(),
...mergedProfileParams,
});
}}
addLabelMatcher={addLabelMatcher}
Expand Down

0 comments on commit bca64ef

Please sign in to comment.