starting point for entity page extension API
Co-authored-by: Philipp Hugenroth <tudi2d@users.noreply.github.com> Co-authored-by: Vincenzo Scamporlino <vinzscam@users.noreply.github.com> Co-authored-by: Camila Belo <camilaibs@gmail.com> Co-authored-by: Rickard Dybeck <r.dybeck@gmail.com> Co-authored-by: Ben Lambert <ben@blam.sh> Co-authored-by: Jack Palmer <UsainBloot@users.noreply.github.com> Co-authored-by: Elon Jefferson <Edje-C@users.noreply.github.com> Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
committed by
Camila Belo
parent
bae9015f2b
commit
39cd2d7a1f
@@ -283,3 +283,51 @@ export default createPlugin({
|
||||
CatalogNavItem,
|
||||
],
|
||||
});
|
||||
|
||||
/// IMAGINE THIS IS IN A DIFFERENT PLUGIN
|
||||
|
||||
// inside the @backstage/plugin-github-pull-requests plugin
|
||||
import {
|
||||
createEntityCardExtension,
|
||||
createEntityContentExtension,
|
||||
} from '@backstage/plugin-catalog-react';
|
||||
|
||||
const githubPullRequestsPlugin = createPlugin({
|
||||
id: 'github-pull-requests',
|
||||
extensions: [
|
||||
createEntityCardExtension({
|
||||
id: 'github-pull-requests',
|
||||
loader: () => import('./PullRequestsCard').then(m => m.PullRequestsCard),
|
||||
entityFilter: isPullRequestsAvailable,
|
||||
}),
|
||||
createEntityContentExtension({
|
||||
id: 'github-pull-requests',
|
||||
defaultPath: 'github-pull-requests',
|
||||
defaultTitle: 'GitHub Pull Requests',
|
||||
loader: () =>
|
||||
import('./PullRequestsContent').then(m => m.PullRequestsContent),
|
||||
entityFilter: isPullRequestsAvailable,
|
||||
}),
|
||||
],
|
||||
});
|
||||
|
||||
// /deployments
|
||||
const deploymentsPlugin = createPlugin({
|
||||
id: 'github-pull-requests',
|
||||
extensions: [
|
||||
createEntityCardExtension({
|
||||
id: 'github-pull-requests',
|
||||
attachTo: { id: 'plugin.deployments.content', input: 'cards' },
|
||||
loader: () => import('./PullRequestsCard').then(m => m.PullRequestsCard),
|
||||
entityFilter: isPullRequestsAvailable,
|
||||
}),
|
||||
createEntityContentExtension({
|
||||
id: 'github-pull-requests',
|
||||
defaultPath: 'github-pull-requests',
|
||||
defaultTitle: 'GitHub Pull Requests',
|
||||
loader: () =>
|
||||
import('./PullRequestsContent').then(m => m.PullRequestsContent),
|
||||
entityFilter: isPullRequestsAvailable,
|
||||
}),
|
||||
],
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user