propagate entity spec to EntityNode
Signed-off-by: Long Zhang <long.zhang@electrolux.com>
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
|
||||
import { DependencyGraphTypes } from '@backstage/core-components';
|
||||
import { JsonObject } from '@backstage/types';
|
||||
import { MouseEventHandler } from 'react';
|
||||
|
||||
/**
|
||||
@@ -63,6 +64,10 @@ export type EntityNodeData = {
|
||||
* Namespace of the entity.
|
||||
*/
|
||||
namespace: string;
|
||||
/**
|
||||
* Optional spec of the entity.
|
||||
*/
|
||||
spec?: JsonObject;
|
||||
/**
|
||||
* Whether the entity is focused, optional, defaults to false. Focused
|
||||
* entities are highlighted in the graph.
|
||||
|
||||
+1
@@ -75,6 +75,7 @@ export function useEntityRelationNodesAndEdges({
|
||||
kind: entity.kind,
|
||||
name: entity.metadata.name,
|
||||
namespace: entity.metadata.namespace ?? DEFAULT_NAMESPACE,
|
||||
spec: entity.spec ?? undefined,
|
||||
focused,
|
||||
color: focused ? 'secondary' : 'primary',
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user