FIx: Diagram component using hardcoded namespace

Signed-off-by: RISHABH BUDHIRAJA <rishabh.budhiraja@gmail.com>
This commit is contained in:
RISHABH BUDHIRAJA
2021-05-21 01:36:28 +05:30
parent dc7ac4076a
commit 35cb3c21cf
@@ -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}`,
],
},
});