cb1cfc018b
Signed-off-by: Alisson Fabiano <afabiano@eshopworld.com>
1.8 KiB
1.8 KiB
@backstage/plugin-azure-devops, @backstage/plugin-azure-devops-common
| @backstage/plugin-azure-devops | @backstage/plugin-azure-devops-common |
|---|---|
| minor | minor |
Added README card EntityAzureReadmeCard for Azure Devops.
To get the README component working you'll need to do the following two steps:
-
First we need to add the @backstage/plugin-azure-devops package to your frontend app:
# From your Backstage root directory yarn add --cwd packages/app @backstage/plugin-azure-devops -
Second we need to add the
EntityAzureReadmeCardextension to the entity page in your app:// In packages/app/src/components/catalog/EntityPage.tsx import { EntityAzureReadmeCard, isAzureDevOpsAvailable, } from '@backstage/plugin-azure-devops'; // As it is a card, you can customize it the way you prefer // For example in the Service section const overviewContent = ( <Grid container spacing={3} alignItems="stretch"> <EntitySwitch> <EntitySwitch.Case if={isAzureDevOpsAvailable}> <Grid item md={6}> ... </Grid> <Grid item md={6}> <EntityAzureReadmeCard maxHeight={350} /> </Grid> </EntitySwitch.Case> </EntitySwitch> </Grid> );
Notes:
- You'll need to add the
EntitySwitch.Caseabove from step 2 to all the entity sections you want to see Readme in. For example if you wanted to see Readme when looking at Website entities then you would need to add this to thewebsiteEntityPagesection. - The
ifprop is optional on theEntitySwitch.Case, you can remove it if you always want to see the tab even if the entity being viewed does not have the needed annotation - The
maxHeightproperty on theEntityAzureReadmeCardwill set the maximum screen size you would like to see, if not set it will default to 100%