Skip to content

Commit

Permalink
Merge pull request #115514 from cockroachdb/blathers/backport-release…
Browse files Browse the repository at this point in the history
…-23.2-115044

release-23.2: ui: keep timewindow with fixed range after Now button click
  • Loading branch information
koorosh committed Dec 4, 2023
2 parents 228ad8e + 3bd3219 commit afce36d
Showing 1 changed file with 6 additions and 1 deletion.
Expand Up @@ -183,7 +183,12 @@ export const TimeScaleDropdown: React.FC<TimeScaleDropdownProps> = ({
case ArrowDirection.CENTER:
// CENTER is used to set the time window to the current time.
endTime = now;
isMoving = true;
// Only predefined time ranges are considered to be moving window (ie Past Hour, Past 3 days, etc).
// Custom time window has specific start/end time and constant duration, and in this case we
// move time window with the same duration with end time = now() and keep it fixed as before.
if (key !== "Custom") {
isMoving = true;
}
break;
default:
getLogger().error("Unknown direction: ", direction);
Expand Down

0 comments on commit afce36d

Please sign in to comment.