Composability updates for Splunk On-Call plugin
Signed-off-by: Tim Hansen <timbonicus@gmail.com>
This commit is contained in:
@@ -25,27 +25,24 @@ cd packages/app
|
||||
yarn add @backstage/plugin-splunk-on-call
|
||||
```
|
||||
|
||||
Add it to the app in `plugins.ts`:
|
||||
|
||||
```ts
|
||||
export { plugin as SplunkOnCall } from '@backstage/plugin-splunk-on-call';
|
||||
```
|
||||
|
||||
Add it to the `EntityPage.tsx`:
|
||||
Add it to your `EntityPage`:
|
||||
|
||||
```ts
|
||||
// packages/app/src/components/catalog/EntityPage.tsx
|
||||
import {
|
||||
isPluginApplicableToEntity as isSplunkOnCallAvailable,
|
||||
SplunkOnCallCard,
|
||||
isSplunkOnCallAvailable,
|
||||
EntitySplunkOnCallCard,
|
||||
} from '@backstage/plugin-splunk-on-call';
|
||||
// ...
|
||||
{
|
||||
isSplunkOnCallAvailable(entity) && (
|
||||
<Grid item md={6}>
|
||||
<SplunkOnCallCard entity={entity} />
|
||||
</Grid>
|
||||
);
|
||||
}
|
||||
const overviewContent = (
|
||||
<Grid container spacing={3} alignItems="stretch">
|
||||
<EntitySwitch>
|
||||
<EntitySwitch.Case if={isSplunkOnCallAvailable}>
|
||||
<Grid item md={6}>
|
||||
<EntitySplunkOnCallCard />
|
||||
</Grid>
|
||||
</EntitySwitch.Case>
|
||||
</EntitySwitch>
|
||||
```
|
||||
|
||||
## Client configuration
|
||||
|
||||
Reference in New Issue
Block a user