Merge pull request #30889 from grantila/grantila/support-custom-relations-in-catalog-graph
Add support for customizing the catalog graph relations using an API
This commit is contained in:
@@ -14,18 +14,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {
|
||||
RELATION_API_CONSUMED_BY,
|
||||
RELATION_API_PROVIDED_BY,
|
||||
RELATION_CONSUMES_API,
|
||||
RELATION_DEPENDENCY_OF,
|
||||
RELATION_DEPENDS_ON,
|
||||
RELATION_HAS_PART,
|
||||
RELATION_OWNED_BY,
|
||||
RELATION_OWNER_OF,
|
||||
RELATION_PART_OF,
|
||||
RELATION_PROVIDES_API,
|
||||
} from '@backstage/catalog-model';
|
||||
import { createApp } from '@backstage/app-defaults';
|
||||
import { AppRouter, FeatureFlagged, FlatRoutes } from '@backstage/core-app-api';
|
||||
import {
|
||||
@@ -158,18 +146,6 @@ const routes = (
|
||||
<CatalogGraphPage
|
||||
initialState={{
|
||||
selectedKinds: ['component', 'domain', 'system', 'api', 'group'],
|
||||
selectedRelations: [
|
||||
RELATION_OWNER_OF,
|
||||
RELATION_OWNED_BY,
|
||||
RELATION_CONSUMES_API,
|
||||
RELATION_API_CONSUMED_BY,
|
||||
RELATION_PROVIDES_API,
|
||||
RELATION_API_PROVIDED_BY,
|
||||
RELATION_HAS_PART,
|
||||
RELATION_PART_OF,
|
||||
RELATION_DEPENDS_ON,
|
||||
RELATION_DEPENDENCY_OF,
|
||||
],
|
||||
}}
|
||||
/>
|
||||
}
|
||||
|
||||
@@ -292,6 +292,7 @@ export namespace DependencyGraphTypes {
|
||||
from: string;
|
||||
to: string;
|
||||
label?: string;
|
||||
distance?: number;
|
||||
};
|
||||
export type DependencyNode<T = {}> = T & {
|
||||
id: string;
|
||||
|
||||
@@ -46,6 +46,10 @@ export namespace DependencyGraphTypes {
|
||||
* Label assigned and rendered with the Edge
|
||||
*/
|
||||
label?: string;
|
||||
/**
|
||||
* Distance to a root entity
|
||||
*/
|
||||
distance?: number;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user