Skip to content

Commit fbc333b

Browse files
author
Niklas Aronsson
committed
feat(statuspage): use EntityInfoCard for the entity card.
The entity card is now using EntityInfoCard as the root component.
1 parent 329e51c commit fbc333b

3 files changed

Lines changed: 11 additions & 10 deletions

File tree

.changeset/stupid-tips-follow.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@axis-backstage/plugin-statuspage': patch
3+
---
4+
5+
Use EntityInfoCard as the entity card wrapper

.changeset/warm-spiders-vanish.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ The plugin provides three extensions out of the box:
1010
- `page:statuspage` — mounts the full statuspage at `/statuspage`
1111
- `entity-card:statuspage` — renders the `StatuspageEntityCard` on entity pages
1212

13-
1413
Configure the instance name for the page extension in `app-config.yaml`:
1514

1615
```yaml

plugins/statuspage/src/components/StatuspageEntityCard.tsx

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
1-
import {
2-
InfoCard,
3-
Progress,
4-
ResponseErrorPanel,
5-
} from '@backstage/core-components';
1+
import { Progress, ResponseErrorPanel } from '@backstage/core-components';
62
import OpenInNewIcon from '@mui/icons-material/OpenInNew';
3+
import { EntityInfoCard } from '@backstage/plugin-catalog-react';
74
import { useEntity } from '@backstage/plugin-catalog-react';
85
import { ComponentsTable } from './ComponentsTable';
96
import { ComponentGroupsList } from './ComponentGroupsList';
@@ -68,16 +65,16 @@ export const StatuspageEntityCard = () => {
6865

6966
if (noComponents) {
7067
return (
71-
<InfoCard title="Service Status" action={linkAction}>
68+
<EntityInfoCard title="Service Status" headerActions={linkAction}>
7269
<Typography variant="body2" color="#FF5555">
7370
The specified statuspage.io components could not be found. Check your
7471
annotation.
7572
</Typography>
76-
</InfoCard>
73+
</EntityInfoCard>
7774
);
7875
}
7976
return (
80-
<InfoCard title="Service Status" action={linkAction}>
77+
<EntityInfoCard title="Service Status" headerActions={linkAction}>
8178
{filteredComponents && filteredComponents.length > 0 && (
8279
<ComponentsTable components={filteredComponents} />
8380
)}
@@ -88,6 +85,6 @@ export const StatuspageEntityCard = () => {
8885
expanded={!fullStatuspage}
8986
/>
9087
)}
91-
</InfoCard>
88+
</EntityInfoCard>
9289
);
9390
};

0 commit comments

Comments
 (0)