From 3eba03755db9f83b4d08d353e2a0d6e5c3ae2456 Mon Sep 17 00:00:00 2001 From: Kavith Lokuhewage Date: Wed, 28 Jan 2026 11:25:15 +0530 Subject: [PATCH] Fix remaining hardcoded namespace references from migration audit Signed-off-by: Kavith Lokuhewage --- .../PipelineFlowVisualization.tsx | 11 +++++++---- .../EnvironmentOverview/EnvironmentPromotionCard.tsx | 10 +++++++--- plugins/platform-engineer-core/src/types.ts | 2 +- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/plugins/openchoreo-react/src/components/PipelineFlowVisualization/PipelineFlowVisualization.tsx b/plugins/openchoreo-react/src/components/PipelineFlowVisualization/PipelineFlowVisualization.tsx index 482c5443..02c2bcd9 100644 --- a/plugins/openchoreo-react/src/components/PipelineFlowVisualization/PipelineFlowVisualization.tsx +++ b/plugins/openchoreo-react/src/components/PipelineFlowVisualization/PipelineFlowVisualization.tsx @@ -49,16 +49,19 @@ const capitalizeFirst = (str: string) => { return str.charAt(0).toUpperCase() + str.slice(1); }; -const entityRefToUrl = (entityRef: string): string => { +const entityRefToUrl = ( + entityRef: string, + fallbackNamespace = 'default', +): string => { const colonIndex = entityRef.indexOf(':'); - if (colonIndex === -1) return `/catalog/default/${entityRef}`; + if (colonIndex === -1) return `/catalog/${fallbackNamespace}/${entityRef}`; const kind = entityRef.substring(0, colonIndex); const rest = entityRef.substring(colonIndex + 1); const slashIndex = rest.indexOf('/'); if (slashIndex === -1) { - return `/catalog/default/${kind}/${rest}`; + return `/catalog/${fallbackNamespace}/${kind}/${rest}`; } const namespace = rest.substring(0, slashIndex); @@ -119,7 +122,7 @@ export const PipelineFlowVisualization = ({ {showPipelineLink && pipelineEntityRef && (