Skip to content

Commit

Permalink
feat: compare end time and current time update the end time accordingly
Browse files Browse the repository at this point in the history
  • Loading branch information
rahulkeswani101 committed Sep 10, 2024
1 parent a66c78a commit 065d362
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions frontend/src/lib/dashboard/getQueryResults.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ export async function GetMetricQueryRange(
const { legendMap, queryPayload } = prepareQueryRangePayload(props);
console.log(extendedEnd);
if (extendedEnd) {
// const currentTime = Date.now();
const currentTime = Date.now();
queryPayload.end += 3 * 60 * 60 * 1000;
// queryPayload.end = Math.min(queryPayload.end, currentTime);
queryPayload.end = Math.min(queryPayload.end, currentTime);
}
const response = await getMetricsQueryRange(
queryPayload,
Expand Down

0 comments on commit 065d362

Please sign in to comment.