Revert "FIx: Diagram component using hardcoded namespace"

This reverts commit dd3fc3e6616ab801e7fc1c9deeb7270f07cb3892.

Signed-off-by: RISHABH BUDHIRAJA <rishabh.budhiraja@gmail.com>
This commit is contained in:
RISHABH BUDHIRAJA
2021-05-26 01:20:05 +05:30
parent 35cb3c21cf
commit 804a605ad8
@@ -149,7 +149,6 @@ 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(() => {
@@ -158,7 +157,7 @@ export function SystemDiagramCard() {
kind: ['Component', 'API', 'Resource', 'System', 'Domain'],
'spec.system': [
currentSystemName,
`${ref.namespace || 'Current Namespace'}/${currentSystemName}`,
`${ENTITY_DEFAULT_NAMESPACE}/${currentSystemName}`,
],
},
});