From 4405be0277f7351c9a9c157d79d4760daa7239de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Gomez?= Date: Sat, 17 Apr 2021 23:33:31 +0200 Subject: [PATCH] Allow entities to be shown in system diagram to live in different namespaces MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Kévin Gomez --- .../src/components/SystemDiagramCard/SystemDiagramCard.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/catalog/src/components/SystemDiagramCard/SystemDiagramCard.tsx b/plugins/catalog/src/components/SystemDiagramCard/SystemDiagramCard.tsx index 78288c46e9..e601b443de 100644 --- a/plugins/catalog/src/components/SystemDiagramCard/SystemDiagramCard.tsx +++ b/plugins/catalog/src/components/SystemDiagramCard/SystemDiagramCard.tsx @@ -20,6 +20,7 @@ import { RELATION_PROVIDES_API, RELATION_PART_OF, serializeEntityRef, + ENTITY_DEFAULT_NAMESPACE, } from '@backstage/catalog-model'; import { catalogApiRef, @@ -71,7 +72,10 @@ export function SystemDiagramCard() { return catalogApi.getEntities({ filter: { kind: ['Component', 'API', 'Resource', 'System', 'Domain'], - 'spec.system': currentSystemName, + 'spec.system': [ + currentSystemName, + `${ENTITY_DEFAULT_NAMESPACE}/${currentSystemName}`, + ], }, }); }, [catalogApi, currentSystemName]);