fix: api-report exceptions
Signed-off-by: blbose <lillian.bose@philips.com>
This commit is contained in:
@@ -68,6 +68,9 @@ export const CodeSceneProjectDetailsPage = codescenePlugin.provide(
|
||||
}),
|
||||
);
|
||||
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
export const CodeSceneEntityKPICard = codescenePlugin.provide(
|
||||
createRoutableExtension({
|
||||
name: 'CodeSceneEntityKPICard',
|
||||
@@ -79,6 +82,9 @@ export const CodeSceneEntityKPICard = codescenePlugin.provide(
|
||||
}),
|
||||
);
|
||||
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
export const CodeSceneEntityPage = codescenePlugin.provide(
|
||||
createRoutableExtension({
|
||||
name: 'CodeSceneEntityPage',
|
||||
|
||||
@@ -16,8 +16,14 @@
|
||||
|
||||
import { Entity } from '@backstage/catalog-model';
|
||||
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
export const CODESCENE_PROJECT_ANNOTATION = 'codescene.io/project-id';
|
||||
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
export const getProjectAnnotation = (entity: Entity) => {
|
||||
const annotation =
|
||||
entity?.metadata.annotations?.[CODESCENE_PROJECT_ANNOTATION];
|
||||
@@ -25,5 +31,8 @@ export const getProjectAnnotation = (entity: Entity) => {
|
||||
return { projectId: Number(projectId) };
|
||||
};
|
||||
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
export const isCodeSceneAvailable = (entity: Entity) =>
|
||||
Boolean(getProjectAnnotation(entity).projectId);
|
||||
|
||||
Reference in New Issue
Block a user