bbovenzi commented on code in PR #70699:
URL: https://github.com/apache/airflow/pull/70699#discussion_r3731866264


##########
airflow-core/src/airflow/ui/src/utils/links.ts:
##########
@@ -54,6 +54,26 @@ export const getRedirectPath = (targetPath: string): string 
=> {
 export const getNextHref = (location: Pick<Location, "hash" | "pathname" | 
"search">): string =>
   `${location.pathname}${location.search}${location.hash}`;
 
+export const getDagAdditionalPath = (pathname: string, tabValues: 
Array<string>): string => {

Review Comment:
   We shouldn't need regex for this. Let's use react-router to more 
deterministically figure out what dag or task route we are on.
   
   https://reactrouter.com/how-to/using-handle we coudl store both the entity 
in question and the tab like `handle: { entity: "dag", tab: "runs" }` so then 
if our new page isn't a dag then we don't do anything
   
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to