Adapt app-driven entity page

Addresses the changes required after merging #2076. The Sentry plugin
now defines a router and the widget will be displayed as a tab.
This commit is contained in:
Björn Marschollek
2020-09-04 12:27:54 +02:00
parent 0837435531
commit eb4d54fcc4
5 changed files with 63 additions and 11 deletions
@@ -14,6 +14,7 @@
* limitations under the License.
*/
import { Router as GitHubActionsRouter } from '@backstage/plugin-github-actions';
import { Router as SentryRouter } from '@backstage/plugin-sentry';
import React from 'react';
import {
EntityPageLayout,
@@ -43,6 +44,11 @@ const ServiceEntityPage = ({ entity }: { entity: Entity }) => (
title="CI/CD"
element={<GitHubActionsRouter entity={entity} />}
/>
<EntityPageLayout.Content
path="/sentry"
title="Sentry"
element={<SentryRouter entity={entity} />}
/>
</EntityPageLayout>
);
@@ -58,6 +64,11 @@ const WebsiteEntityPage = ({ entity }: { entity: Entity }) => (
title="CI/CD"
element={<GitHubActionsRouter entity={entity} />}
/>
<EntityPageLayout.Content
path="/sentry"
title="Sentry"
element={<SentryRouter entity={entity} />}
/>
</EntityPageLayout>
);