From 35cb3c21cf789e77bdbf20532ee83c1a5a3b9ab4 Mon Sep 17 00:00:00 2001 From: RISHABH BUDHIRAJA Date: Fri, 21 May 2021 01:36:28 +0530 Subject: [PATCH] FIx: Diagram component using hardcoded namespace Signed-off-by: RISHABH BUDHIRAJA --- .../src/components/SystemDiagramCard/SystemDiagramCard.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/catalog/src/components/SystemDiagramCard/SystemDiagramCard.tsx b/plugins/catalog/src/components/SystemDiagramCard/SystemDiagramCard.tsx index 5fd32a6298..42d493912c 100644 --- a/plugins/catalog/src/components/SystemDiagramCard/SystemDiagramCard.tsx +++ b/plugins/catalog/src/components/SystemDiagramCard/SystemDiagramCard.tsx @@ -149,6 +149,7 @@ export function SystemDiagramCard() { const currentSystemNode = stringifyEntityRef(entity); const systemNodes = new Array<{ id: string; kind: string; name: string }>(); const systemEdges = new Array<{ from: string; to: string; label: string }>(); + const ref = parseEntityRef(currentSystemNode); const catalogApi = useApi(catalogApiRef); const { loading, error, value: catalogResponse } = useAsync(() => { @@ -157,7 +158,7 @@ export function SystemDiagramCard() { kind: ['Component', 'API', 'Resource', 'System', 'Domain'], 'spec.system': [ currentSystemName, - `${ENTITY_DEFAULT_NAMESPACE}/${currentSystemName}`, + `${ref.namespace || 'Current Namespace'}/${currentSystemName}`, ], }, });