feat(sentry): added possibility to specify organization per component

Signed-off-by: Antonio Musolino <antoniomusolino007@gmail.com>
This commit is contained in:
Antonio Musolino
2022-07-06 12:36:02 +02:00
parent e0a993834c
commit 1b7c691a3b
11 changed files with 170 additions and 34 deletions
+6 -3
View File
@@ -26,7 +26,10 @@ import {
SentryApi,
sentryApiRef,
} from '../src';
import { SENTRY_PROJECT_SLUG_ANNOTATION } from '../src/components/useProjectSlug';
import {
SENTRY_PROJECT_SLUG_ANNOTATION,
getProjectSlug,
} from '../src/api/annotations';
import { Content, Header, Page } from '@backstage/core-components';
const entity = (name?: string) =>
@@ -47,8 +50,8 @@ createDevApp()
deps: {},
factory: () =>
({
fetchIssues: async (project: string) => {
switch (project) {
fetchIssues: async (e: Entity) => {
switch (getProjectSlug(e)) {
case 'error':
throw new Error('Error!');