Skip to content

Commit

Permalink
chore: cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmadshaheer committed Dec 30, 2024
1 parent 682a7c3 commit b43aa08
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 17 deletions.
2 changes: 1 addition & 1 deletion frontend/src/container/MetricsApplication/Tabs/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export function generateExplorerPath(
? ROUTES.LOGS_EXPLORER
: ROUTES.TRACES_EXPLORER;

return `${basePath}?${urlParams.toString()}&selected={"serviceName":"${servicename}"}&filterToFetchData=["duration","status","serviceName"]&spanAggregateCurrentPage=1&selectedTags=${selectedTraceTags}&${
return `${basePath}?${urlParams.toString()}&selected={"serviceName":["${servicename}"]}&filterToFetchData=["duration","status","serviceName"]&spanAggregateCurrentPage=1&selectedTags=${selectedTraceTags}&${
QueryParams.compositeQuery
}=${JSONCompositeQuery}&${queryString.join('&')}`;
}
Expand Down
15 changes: 0 additions & 15 deletions frontend/src/hooks/useSafeNavigate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,28 +105,13 @@ export const useSafeNavigate = (): {
);
}

console.group('Safe Navigation Check');
console.log('Current URL:', currentUrl.toString());
console.log('Target URL:', targetUrl.toString());

const urlsAreSame = areUrlsEffectivelySame(currentUrl, targetUrl);
const isDefaultParamsNavigation = isDefaultNavigation(currentUrl, targetUrl);

if (urlsAreSame) {
console.log(
'🚫 URLs are effectively the same (ignoring compositeQuery id) - Navigation prevented',
);
console.groupEnd();
return;
}

console.log(
`✅ URLs are different - ${
isDefaultParamsNavigation ? 'Replacing' : 'Navigating'
}...`,
);
console.groupEnd();

const navigationOptions = {
...options,
replace: isDefaultParamsNavigation || options?.replace,
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/utils/timeUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ export const epochToTimeString = (epochMs: number): string => {
};

/**
* Converts any timestamp (milliseconds/nanoseconds) to milliseconds
* Converts nanoseconds to milliseconds
* @param timestamp - The timestamp to convert
* @returns The timestamp in milliseconds
*/
Expand Down

0 comments on commit b43aa08

Please sign in to comment.