Rename PeriskopErrorsTable -> EntityPeriskopErrorsCard

Per https://backstage.io/docs/plugins/composability#naming-patterns

Signed-off-by: Julio Zynger <julio.zynger@soundcloud.com>
This commit is contained in:
Julio Zynger
2022-03-04 09:46:18 +01:00
committed by Fredrik Adelöw
parent 4d7c6e2a11
commit bdfdace83c
6 changed files with 13 additions and 13 deletions
+3 -3
View File
@@ -6,7 +6,7 @@
## Periskop aggregated errors
The Periskop Backstage Plugin exposes a component named `PeriskopErrorsTable`.
The Periskop Backstage Plugin exposes a component named `EntityPeriskopErrorsCard`.
Each of the entries in the table will direct you to the error details in your deployed Periskop instance location.
![periskop-errors-card](./docs/periskop-plugin-screenshot.png)
@@ -27,7 +27,7 @@ yarn add @backstage/plugin-periskop
```tsx
// In packages/app/src/components/catalog/EntityPage.tsx
import { PeriskopErrorsTable } from '@backstage/plugin-periskop';
import { EntityPeriskopErrorsCard } from '@backstage/plugin-periskop';
const componentPage = (
<EntityLayout>
@@ -35,7 +35,7 @@ const componentPage = (
<EntityLayout.Route path="/periskop" title="Periskop">
<Grid container spacing={3} alignItems="stretch">
<Grid item xs={12} sm={12} md={12}>
<PeriskopErrorsTable />
<EntityPeriskopErrorsCard />
</Grid>
</Grid>
</EntityLayout.Route>
+1 -1
View File
@@ -102,7 +102,7 @@ export type PeriskopApiOptions = {
export const periskopApiRef: ApiRef<PeriskopApi>;
// @public (undocumented)
export const PeriskopErrorsTable: () => JSX.Element;
export const EntityPeriskopErrorsCard: () => JSX.Element;
// @public (undocumented)
export const periskopPlugin: BackstagePlugin<{}, {}>;
@@ -80,7 +80,7 @@ function isNotFoundInInstance(
return (apiResult as NotFoundInInstance)?.body !== undefined;
}
export const PeriskopErrorsTable = () => {
export const EntityPeriskopErrorsCard = () => {
const { entity } = useEntity();
const entityPeriskopName: string =
entity.metadata.annotations?.[PERISKOP_NAME_ANNOTATION] ??
@@ -15,7 +15,7 @@
*/
export {
PeriskopErrorsTable,
EntityPeriskopErrorsCard,
isPeriskopAvailable,
PERISKOP_NAME_ANNOTATION,
} from './PeriskopErrorsTable';
} from './EntityPeriskopErrorsCard';
+4 -4
View File
@@ -20,13 +20,13 @@ import { createComponentExtension } from '@backstage/core-plugin-api';
/**
* @public
*/
export const PeriskopErrorsTable = periskopPlugin.provide(
export const EntityPeriskopErrorsCard = periskopPlugin.provide(
createComponentExtension({
name: 'PeriskopErrorsTable',
name: 'EntityPeriskopErrorsCard',
component: {
lazy: () =>
import('./components/PeriskopErrorsTable').then(
m => m.PeriskopErrorsTable,
import('./components/EntityPeriskopErrorsCard').then(
m => m.EntityPeriskopErrorsCard,
),
},
}),
+2 -2
View File
@@ -15,10 +15,10 @@
*/
export { periskopPlugin, periskopApiRef } from './plugin';
export { PeriskopErrorsTable } from './extensions';
export { EntityPeriskopErrorsCard } from './extensions';
export {
isPeriskopAvailable,
PERISKOP_NAME_ANNOTATION,
} from './components/PeriskopErrorsTable';
} from './components/EntityPeriskopErrorsCard';
export * from './api/index';
export * from './types';