@axis-backstage/plugin-statuspage 0.10.0 → 0.10.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +33 -0
- package/dist/api/StatuspageApi.esm.js.map +1 -1
- package/dist/api/StatuspageClient.esm.js.map +1 -1
- package/dist/components/ComponentGroupCard.esm.js.map +1 -1
- package/dist/components/ComponentGroupStatusChips.esm.js.map +1 -1
- package/dist/components/ComponentGroupsList.esm.js.map +1 -1
- package/dist/components/ComponentsTable.esm.js.map +1 -1
- package/dist/components/StatusChip.esm.js.map +1 -1
- package/dist/components/StatuspageComponent.esm.js.map +1 -1
- package/dist/components/StatuspageEntityCard.esm.js.map +1 -1
- package/dist/hooks/useComponents.esm.js.map +1 -1
- package/dist/index.d.ts +8 -8
- package/dist/plugin.esm.js.map +1 -1
- package/dist/routes.esm.js.map +1 -1
- package/package.json +8 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,38 @@
|
|
|
1
1
|
# @axis-backstage/plugin-statuspage
|
|
2
2
|
|
|
3
|
+
## 0.10.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 36858a7: Bumped to backstage 1.50.2
|
|
8
|
+
- Updated dependencies [36858a7]
|
|
9
|
+
- @axis-backstage/plugin-statuspage-common@0.9.1
|
|
10
|
+
|
|
11
|
+
## 0.10.1
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- 199bd49: Fix critical security vulnerabilities by upgrading Backstage dependencies:
|
|
16
|
+
|
|
17
|
+
**Security Fixes:**
|
|
18
|
+
|
|
19
|
+
- Fixed CVE-2025-8101 (High Severity) in linkifyjs/linkify-react by upgrading @backstage/core-components from ^0.18.4 to ^0.18.6
|
|
20
|
+
- Fixed CVE-2026-24046 (High Severity) - UNIX Symbolic Link Following in @backstage/backend-plugin-api by upgrading from ^1.6.0 to ^1.6.2
|
|
21
|
+
- Fixed CVE-2026-24047 (High Severity) - Symlink Attack in @backstage/backend-defaults by upgrading from ^0.14.0 to ^0.15.1
|
|
22
|
+
- Fixed SNYK-JS-QS-14724253 (High Severity) - Allocation of Resources Without Limits or Throttling in qs by adding resolution to ^6.14.1
|
|
23
|
+
|
|
24
|
+
**Additional Package Upgrades:**
|
|
25
|
+
Upgraded packages to versions that depend on patched Backstage core packages:
|
|
26
|
+
|
|
27
|
+
- @backstage/plugin-mcp-actions-backend: ^0.1.6 → ^0.1.8
|
|
28
|
+
- @backstage/plugin-search-backend: ^2.0.9 → ^2.0.11
|
|
29
|
+
- @backstage/plugin-techdocs-backend: ^2.1.3 → ^2.1.4
|
|
30
|
+
- @backstage/backend-test-utils: ^1.10.2 → ^1.10.4 (in jira-dashboard-backend and readme-backend)
|
|
31
|
+
|
|
32
|
+
**Code Improvements:**
|
|
33
|
+
|
|
34
|
+
- Removed redundant @backstage/backend-defaults imports from production code paths in backend plugins (jira-dashboard-backend, readme-backend, statuspage-backend)
|
|
35
|
+
|
|
3
36
|
## 0.10.0
|
|
4
37
|
|
|
5
38
|
### Minor Changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatuspageApi.esm.js","sources":["../../src/api/StatuspageApi.ts"],"sourcesContent":["import { createApiRef } from '@backstage/core-plugin-api';\n\nimport type {\n Component,\n ComponentGroup,\n} from '@axis-backstage/plugin-statuspage-common';\n\n/**\n * The definition for the statuspage api.\n *\n * @public\n */\nexport type StatuspageApi = {\n getComponents(name: string): Promise<Component[]>;\n getComponentGroups(name: string): Promise<ComponentGroup[]>;\n getLink(name: string): Promise<{ url: string }>;\n};\n\n/**\n * The apiref for the statuspage plugin.\n *\n * @public\n */\nexport const statuspageApiRef = createApiRef<StatuspageApi>({\n id: 'plugin.statuspage',\n});\n"],"names":[],"mappings":";;AAuBO,MAAM,mBAAmB,
|
|
1
|
+
{"version":3,"file":"StatuspageApi.esm.js","sources":["../../src/api/StatuspageApi.ts"],"sourcesContent":["import { createApiRef } from '@backstage/core-plugin-api';\n\nimport type {\n Component,\n ComponentGroup,\n} from '@axis-backstage/plugin-statuspage-common';\n\n/**\n * The definition for the statuspage api.\n *\n * @public\n */\nexport type StatuspageApi = {\n getComponents(name: string): Promise<Component[]>;\n getComponentGroups(name: string): Promise<ComponentGroup[]>;\n getLink(name: string): Promise<{ url: string }>;\n};\n\n/**\n * The apiref for the statuspage plugin.\n *\n * @public\n */\nexport const statuspageApiRef = createApiRef<StatuspageApi>({\n id: 'plugin.statuspage',\n});\n"],"names":[],"mappings":";;AAuBO,MAAM,mBAAmB,YAAA,CAA4B;AAAA,EAC1D,EAAA,EAAI;AACN,CAAC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatuspageClient.esm.js","sources":["../../src/api/StatuspageClient.ts"],"sourcesContent":["import { DiscoveryApi, FetchApi } from '@backstage/core-plugin-api';\nimport { StatuspageApi } from './StatuspageApi';\nimport {\n Component,\n ComponentGroup,\n} from '@axis-backstage/plugin-statuspage-common';\n\n/**\n * The client implementation for the frontend api.\n *\n * @public\n */\nexport class StatuspageClient implements StatuspageApi {\n private readonly discoveryApi: DiscoveryApi;\n private readonly fetchApi: FetchApi;\n\n constructor(options: { discoveryApi: DiscoveryApi; fetchApi: FetchApi }) {\n this.discoveryApi = options.discoveryApi;\n this.fetchApi = options.fetchApi;\n }\n\n /**\n * Fetches link for a statuspage\n *\n * @param name - name of the statuspage instance (from config)\n * @returns the url\n */\n async getLink(name: string): Promise<{ url: string }> {\n const baseUrl = await this.discoveryApi.getBaseUrl('statuspage');\n const response = await this.fetchApi.fetch(\n `${baseUrl}/fetch-link/${encodeURIComponent(name)}`,\n {\n method: 'GET',\n headers: {\n 'Content-Type': 'application/json',\n },\n },\n );\n if (response.ok) {\n const data = await response.json();\n return data;\n }\n throw new Error(\n `Failed to get statuspage link for ${name} with status code ${response.status}`,\n );\n }\n\n /**\n * Returns the components for a statuspage instance\n *\n * @param name - the name of statuspage instance (from config)\n * @returns the components\n */\n async getComponents(name: string): Promise<Component[]> {\n const baseUrl = await this.discoveryApi.getBaseUrl('statuspage');\n const data = await this.fetchApi.fetch(\n `${baseUrl}/fetch-components/${encodeURIComponent(name)}`,\n {\n method: 'GET',\n headers: {\n 'Content-Type': 'application/json',\n },\n },\n );\n\n if (data.ok) return data.json();\n throw new Error(`Failed to get statuspage components for ${name}`);\n }\n\n /**\n * Returns the component groups for a statuspage instance\n *\n * @param name - the name of the statuspage instance (from config)\n * @returns the component groups\n */\n async getComponentGroups(name: string): Promise<ComponentGroup[]> {\n const baseUrl = await this.discoveryApi.getBaseUrl('statuspage');\n const data = await this.fetchApi.fetch(\n `${baseUrl}/fetch-component-groups/${encodeURIComponent(name)}`,\n {\n method: 'GET',\n headers: {\n 'Content-Type': 'application/json',\n },\n },\n );\n\n if (data.ok) return data.json();\n throw new Error(`Failed to get statuspage component groups for ${name}`);\n }\n}\n"],"names":[],"mappings":"AAYO,MAAM,
|
|
1
|
+
{"version":3,"file":"StatuspageClient.esm.js","sources":["../../src/api/StatuspageClient.ts"],"sourcesContent":["import { DiscoveryApi, FetchApi } from '@backstage/core-plugin-api';\nimport { StatuspageApi } from './StatuspageApi';\nimport {\n Component,\n ComponentGroup,\n} from '@axis-backstage/plugin-statuspage-common';\n\n/**\n * The client implementation for the frontend api.\n *\n * @public\n */\nexport class StatuspageClient implements StatuspageApi {\n private readonly discoveryApi: DiscoveryApi;\n private readonly fetchApi: FetchApi;\n\n constructor(options: { discoveryApi: DiscoveryApi; fetchApi: FetchApi }) {\n this.discoveryApi = options.discoveryApi;\n this.fetchApi = options.fetchApi;\n }\n\n /**\n * Fetches link for a statuspage\n *\n * @param name - name of the statuspage instance (from config)\n * @returns the url\n */\n async getLink(name: string): Promise<{ url: string }> {\n const baseUrl = await this.discoveryApi.getBaseUrl('statuspage');\n const response = await this.fetchApi.fetch(\n `${baseUrl}/fetch-link/${encodeURIComponent(name)}`,\n {\n method: 'GET',\n headers: {\n 'Content-Type': 'application/json',\n },\n },\n );\n if (response.ok) {\n const data = await response.json();\n return data;\n }\n throw new Error(\n `Failed to get statuspage link for ${name} with status code ${response.status}`,\n );\n }\n\n /**\n * Returns the components for a statuspage instance\n *\n * @param name - the name of statuspage instance (from config)\n * @returns the components\n */\n async getComponents(name: string): Promise<Component[]> {\n const baseUrl = await this.discoveryApi.getBaseUrl('statuspage');\n const data = await this.fetchApi.fetch(\n `${baseUrl}/fetch-components/${encodeURIComponent(name)}`,\n {\n method: 'GET',\n headers: {\n 'Content-Type': 'application/json',\n },\n },\n );\n\n if (data.ok) return data.json();\n throw new Error(`Failed to get statuspage components for ${name}`);\n }\n\n /**\n * Returns the component groups for a statuspage instance\n *\n * @param name - the name of the statuspage instance (from config)\n * @returns the component groups\n */\n async getComponentGroups(name: string): Promise<ComponentGroup[]> {\n const baseUrl = await this.discoveryApi.getBaseUrl('statuspage');\n const data = await this.fetchApi.fetch(\n `${baseUrl}/fetch-component-groups/${encodeURIComponent(name)}`,\n {\n method: 'GET',\n headers: {\n 'Content-Type': 'application/json',\n },\n },\n );\n\n if (data.ok) return data.json();\n throw new Error(`Failed to get statuspage component groups for ${name}`);\n }\n}\n"],"names":[],"mappings":"AAYO,MAAM,gBAAA,CAA0C;AAAA,EACpC,YAAA;AAAA,EACA,QAAA;AAAA,EAEjB,YAAY,OAAA,EAA6D;AACvE,IAAA,IAAA,CAAK,eAAe,OAAA,CAAQ,YAAA;AAC5B,IAAA,IAAA,CAAK,WAAW,OAAA,CAAQ,QAAA;AAAA,EAC1B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,MAAM,QAAQ,IAAA,EAAwC;AACpD,IAAA,MAAM,OAAA,GAAU,MAAM,IAAA,CAAK,YAAA,CAAa,WAAW,YAAY,CAAA;AAC/D,IAAA,MAAM,QAAA,GAAW,MAAM,IAAA,CAAK,QAAA,CAAS,KAAA;AAAA,MACnC,CAAA,EAAG,OAAO,CAAA,YAAA,EAAe,kBAAA,CAAmB,IAAI,CAAC,CAAA,CAAA;AAAA,MACjD;AAAA,QACE,MAAA,EAAQ,KAAA;AAAA,QACR,OAAA,EAAS;AAAA,UACP,cAAA,EAAgB;AAAA;AAClB;AACF,KACF;AACA,IAAA,IAAI,SAAS,EAAA,EAAI;AACf,MAAA,MAAM,IAAA,GAAO,MAAM,QAAA,CAAS,IAAA,EAAK;AACjC,MAAA,OAAO,IAAA;AAAA,IACT;AACA,IAAA,MAAM,IAAI,KAAA;AAAA,MACR,CAAA,kCAAA,EAAqC,IAAI,CAAA,kBAAA,EAAqB,QAAA,CAAS,MAAM,CAAA;AAAA,KAC/E;AAAA,EACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,MAAM,cAAc,IAAA,EAAoC;AACtD,IAAA,MAAM,OAAA,GAAU,MAAM,IAAA,CAAK,YAAA,CAAa,WAAW,YAAY,CAAA;AAC/D,IAAA,MAAM,IAAA,GAAO,MAAM,IAAA,CAAK,QAAA,CAAS,KAAA;AAAA,MAC/B,CAAA,EAAG,OAAO,CAAA,kBAAA,EAAqB,kBAAA,CAAmB,IAAI,CAAC,CAAA,CAAA;AAAA,MACvD;AAAA,QACE,MAAA,EAAQ,KAAA;AAAA,QACR,OAAA,EAAS;AAAA,UACP,cAAA,EAAgB;AAAA;AAClB;AACF,KACF;AAEA,IAAA,IAAI,IAAA,CAAK,EAAA,EAAI,OAAO,IAAA,CAAK,IAAA,EAAK;AAC9B,IAAA,MAAM,IAAI,KAAA,CAAM,CAAA,wCAAA,EAA2C,IAAI,CAAA,CAAE,CAAA;AAAA,EACnE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,MAAM,mBAAmB,IAAA,EAAyC;AAChE,IAAA,MAAM,OAAA,GAAU,MAAM,IAAA,CAAK,YAAA,CAAa,WAAW,YAAY,CAAA;AAC/D,IAAA,MAAM,IAAA,GAAO,MAAM,IAAA,CAAK,QAAA,CAAS,KAAA;AAAA,MAC/B,CAAA,EAAG,OAAO,CAAA,wBAAA,EAA2B,kBAAA,CAAmB,IAAI,CAAC,CAAA,CAAA;AAAA,MAC7D;AAAA,QACE,MAAA,EAAQ,KAAA;AAAA,QACR,OAAA,EAAS;AAAA,UACP,cAAA,EAAgB;AAAA;AAClB;AACF,KACF;AAEA,IAAA,IAAI,IAAA,CAAK,EAAA,EAAI,OAAO,IAAA,CAAK,IAAA,EAAK;AAC9B,IAAA,MAAM,IAAI,KAAA,CAAM,CAAA,8CAAA,EAAiD,IAAI,CAAA,CAAE,CAAA;AAAA,EACzE;AACF;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComponentGroupCard.esm.js","sources":["../../src/components/ComponentGroupCard.tsx"],"sourcesContent":["import Accordion from '@mui/material/Accordion';\nimport AccordionDetails from '@mui/material/AccordionDetails';\nimport AccordionSummary from '@mui/material/AccordionSummary';\nimport Typography from '@mui/material/Typography';\nimport { styled } from '@mui/material/styles';\nimport ExpandMoreIcon from '@mui/icons-material/ExpandMore';\nimport { ComponentsTable } from './ComponentsTable';\nimport { ComponentGroupStatusChips } from './ComponentGroupStatusChips';\nimport type {\n Component,\n ComponentGroup,\n} from '@axis-backstage/plugin-statuspage-common';\n\nexport type ComponentGroupProps = {\n components: Component[];\n componentGroup: ComponentGroup;\n expanded?: boolean;\n};\n\nconst DenseAccordion = styled(Accordion)({\n margin: '2px',\n borderRadius: '2px',\n});\n\nconst DenseAccordionSummary = styled(AccordionSummary)({\n '&.Mui-expanded': {\n minHeight: '48px !important',\n },\n});\n\nexport const ComponentGroupCard = ({\n components,\n componentGroup,\n expanded = false,\n}: ComponentGroupProps) => {\n return (\n <DenseAccordion key={componentGroup.id} defaultExpanded={expanded}>\n <DenseAccordionSummary expandIcon={<ExpandMoreIcon />}>\n <Typography variant=\"subtitle1\">{componentGroup.name}</Typography>\n <ComponentGroupStatusChips components={components} />\n </DenseAccordionSummary>\n <AccordionDetails>\n <ComponentsTable components={components} />\n </AccordionDetails>\n </DenseAccordion>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;AAmBA,MAAM,cAAA,GAAiB,
|
|
1
|
+
{"version":3,"file":"ComponentGroupCard.esm.js","sources":["../../src/components/ComponentGroupCard.tsx"],"sourcesContent":["import Accordion from '@mui/material/Accordion';\nimport AccordionDetails from '@mui/material/AccordionDetails';\nimport AccordionSummary from '@mui/material/AccordionSummary';\nimport Typography from '@mui/material/Typography';\nimport { styled } from '@mui/material/styles';\nimport ExpandMoreIcon from '@mui/icons-material/ExpandMore';\nimport { ComponentsTable } from './ComponentsTable';\nimport { ComponentGroupStatusChips } from './ComponentGroupStatusChips';\nimport type {\n Component,\n ComponentGroup,\n} from '@axis-backstage/plugin-statuspage-common';\n\nexport type ComponentGroupProps = {\n components: Component[];\n componentGroup: ComponentGroup;\n expanded?: boolean;\n};\n\nconst DenseAccordion = styled(Accordion)({\n margin: '2px',\n borderRadius: '2px',\n});\n\nconst DenseAccordionSummary = styled(AccordionSummary)({\n '&.Mui-expanded': {\n minHeight: '48px !important',\n },\n});\n\nexport const ComponentGroupCard = ({\n components,\n componentGroup,\n expanded = false,\n}: ComponentGroupProps) => {\n return (\n <DenseAccordion key={componentGroup.id} defaultExpanded={expanded}>\n <DenseAccordionSummary expandIcon={<ExpandMoreIcon />}>\n <Typography variant=\"subtitle1\">{componentGroup.name}</Typography>\n <ComponentGroupStatusChips components={components} />\n </DenseAccordionSummary>\n <AccordionDetails>\n <ComponentsTable components={components} />\n </AccordionDetails>\n </DenseAccordion>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;AAmBA,MAAM,cAAA,GAAiB,MAAA,CAAO,SAAS,CAAA,CAAE;AAAA,EACvC,MAAA,EAAQ,KAAA;AAAA,EACR,YAAA,EAAc;AAChB,CAAC,CAAA;AAED,MAAM,qBAAA,GAAwB,MAAA,CAAO,gBAAgB,CAAA,CAAE;AAAA,EACrD,gBAAA,EAAkB;AAAA,IAChB,SAAA,EAAW;AAAA;AAEf,CAAC,CAAA;AAEM,MAAM,qBAAqB,CAAC;AAAA,EACjC,UAAA;AAAA,EACA,cAAA;AAAA,EACA,QAAA,GAAW;AACb,CAAA,KAA2B;AACzB,EAAA,uBACE,IAAA,CAAC,cAAA,EAAA,EAAuC,eAAA,EAAiB,QAAA,EACvD,QAAA,EAAA;AAAA,oBAAA,IAAA,CAAC,qBAAA,EAAA,EAAsB,UAAA,kBAAY,GAAA,CAAC,cAAA,EAAA,EAAe,CAAA,EACjD,QAAA,EAAA;AAAA,sBAAA,GAAA,CAAC,UAAA,EAAA,EAAW,OAAA,EAAQ,WAAA,EAAa,QAAA,EAAA,cAAA,CAAe,IAAA,EAAK,CAAA;AAAA,sBACrD,GAAA,CAAC,6BAA0B,UAAA,EAAwB;AAAA,KAAA,EACrD,CAAA;AAAA,oBACA,GAAA,CAAC,gBAAA,EAAA,EACC,QAAA,kBAAA,GAAA,CAAC,eAAA,EAAA,EAAgB,YAAwB,CAAA,EAC3C;AAAA,GAAA,EAAA,EAPmB,eAAe,EAQpC,CAAA;AAEJ;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComponentGroupStatusChips.esm.js","sources":["../../src/components/ComponentGroupStatusChips.tsx"],"sourcesContent":["import Grid from '@mui/material/Unstable_Grid2';\nimport { ComponentsTableProps } from './ComponentsTable';\nimport { StatusChip } from './StatusChip';\n\nexport const ComponentGroupStatusChips = ({\n components,\n}: ComponentsTableProps) => (\n <>\n {components.some(component => component.status !== 'operational') ? (\n components\n .filter(component => component.status !== 'operational')\n .map(component => (\n <Grid padding={0} alignSelf=\"center\" key={component.id}>\n <StatusChip status={component.status} />\n </Grid>\n ))\n ) : (\n <Grid padding={0} alignSelf=\"center\">\n <StatusChip status=\"operational\" />\n </Grid>\n )}\n </>\n);\n"],"names":[],"mappings":";;;;AAIO,MAAM,4BAA4B,CAAC;AAAA,EACxC;AACF,
|
|
1
|
+
{"version":3,"file":"ComponentGroupStatusChips.esm.js","sources":["../../src/components/ComponentGroupStatusChips.tsx"],"sourcesContent":["import Grid from '@mui/material/Unstable_Grid2';\nimport { ComponentsTableProps } from './ComponentsTable';\nimport { StatusChip } from './StatusChip';\n\nexport const ComponentGroupStatusChips = ({\n components,\n}: ComponentsTableProps) => (\n <>\n {components.some(component => component.status !== 'operational') ? (\n components\n .filter(component => component.status !== 'operational')\n .map(component => (\n <Grid padding={0} alignSelf=\"center\" key={component.id}>\n <StatusChip status={component.status} />\n </Grid>\n ))\n ) : (\n <Grid padding={0} alignSelf=\"center\">\n <StatusChip status=\"operational\" />\n </Grid>\n )}\n </>\n);\n"],"names":[],"mappings":";;;;AAIO,MAAM,4BAA4B,CAAC;AAAA,EACxC;AACF,CAAA,qBACE,GAAA,CAAA,QAAA,EAAA,EACG,qBAAW,IAAA,CAAK,CAAA,SAAA,KAAa,UAAU,MAAA,KAAW,aAAa,IAC9D,UAAA,CACG,MAAA,CAAO,eAAa,SAAA,CAAU,MAAA,KAAW,aAAa,CAAA,CACtD,GAAA,CAAI,+BACH,GAAA,CAAC,IAAA,EAAA,EAAK,SAAS,CAAA,EAAG,SAAA,EAAU,UAC1B,QAAA,kBAAA,GAAA,CAAC,UAAA,EAAA,EAAW,QAAQ,SAAA,CAAU,MAAA,EAAQ,KADE,SAAA,CAAU,EAEpD,CACD,CAAA,mBAEH,GAAA,CAAC,QAAK,OAAA,EAAS,CAAA,EAAG,WAAU,QAAA,EAC1B,QAAA,kBAAA,GAAA,CAAC,cAAW,MAAA,EAAO,aAAA,EAAc,GACnC,CAAA,EAEJ;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComponentGroupsList.esm.js","sources":["../../src/components/ComponentGroupsList.tsx"],"sourcesContent":["import Stack from '@mui/material/Stack';\nimport { ComponentGroupCard } from './ComponentGroupCard';\nimport type {\n Component,\n ComponentGroup,\n} from '@axis-backstage/plugin-statuspage-common';\n\nexport type ComponentGroupListProps = {\n components: Component[];\n componentGroups: ComponentGroup[];\n expanded?: boolean;\n};\n\nexport const ComponentGroupsList = ({\n components,\n componentGroups,\n expanded,\n}: ComponentGroupListProps) => {\n return (\n <Stack paddingTop=\"10px\">\n {componentGroups.map(componentGroup => (\n <ComponentGroupCard\n key={componentGroup.id}\n componentGroup={componentGroup}\n components={components.filter(c => c.group_id === componentGroup.id)}\n expanded={expanded}\n />\n ))}\n </Stack>\n );\n};\n"],"names":[],"mappings":";;;;AAaO,MAAM,sBAAsB,CAAC;AAAA,EAClC,UAAA;AAAA,EACA,eAAA;AAAA,EACA;AACF,
|
|
1
|
+
{"version":3,"file":"ComponentGroupsList.esm.js","sources":["../../src/components/ComponentGroupsList.tsx"],"sourcesContent":["import Stack from '@mui/material/Stack';\nimport { ComponentGroupCard } from './ComponentGroupCard';\nimport type {\n Component,\n ComponentGroup,\n} from '@axis-backstage/plugin-statuspage-common';\n\nexport type ComponentGroupListProps = {\n components: Component[];\n componentGroups: ComponentGroup[];\n expanded?: boolean;\n};\n\nexport const ComponentGroupsList = ({\n components,\n componentGroups,\n expanded,\n}: ComponentGroupListProps) => {\n return (\n <Stack paddingTop=\"10px\">\n {componentGroups.map(componentGroup => (\n <ComponentGroupCard\n key={componentGroup.id}\n componentGroup={componentGroup}\n components={components.filter(c => c.group_id === componentGroup.id)}\n expanded={expanded}\n />\n ))}\n </Stack>\n );\n};\n"],"names":[],"mappings":";;;;AAaO,MAAM,sBAAsB,CAAC;AAAA,EAClC,UAAA;AAAA,EACA,eAAA;AAAA,EACA;AACF,CAAA,KAA+B;AAC7B,EAAA,2BACG,KAAA,EAAA,EAAM,UAAA,EAAW,MAAA,EACf,QAAA,EAAA,eAAA,CAAgB,IAAI,CAAA,cAAA,qBACnB,GAAA;AAAA,IAAC,kBAAA;AAAA,IAAA;AAAA,MAEC,cAAA;AAAA,MACA,YAAY,UAAA,CAAW,MAAA,CAAO,OAAK,CAAA,CAAE,QAAA,KAAa,eAAe,EAAE,CAAA;AAAA,MACnE;AAAA,KAAA;AAAA,IAHK,cAAA,CAAe;AAAA,GAKvB,CAAA,EACH,CAAA;AAEJ;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComponentsTable.esm.js","sources":["../../src/components/ComponentsTable.tsx"],"sourcesContent":["import { Table, TableColumn } from '@backstage/core-components';\nimport type { Component } from '@axis-backstage/plugin-statuspage-common';\nimport { StatusChip } from './StatusChip';\n\nexport type ComponentsTableProps = {\n components: Component[];\n};\n\nexport const ComponentsTable = ({ components }: ComponentsTableProps) => {\n // Columns definition\n const columns: TableColumn[] = [\n { title: 'System', field: 'name', id: 'id' },\n {\n title: 'Status',\n field: 'status',\n render: (rowData: any) => <StatusChip status={rowData.status} />,\n align: 'right',\n },\n ];\n\n return (\n <Table\n options={{\n search: false,\n paging: false,\n header: false,\n padding: 'dense',\n toolbar: false,\n }}\n columns={columns}\n data={components.map(({ name, status, id }) => ({ name, status, id }))}\n />\n );\n};\n"],"names":[],"mappings":";;;;AAQO,MAAM,
|
|
1
|
+
{"version":3,"file":"ComponentsTable.esm.js","sources":["../../src/components/ComponentsTable.tsx"],"sourcesContent":["import { Table, TableColumn } from '@backstage/core-components';\nimport type { Component } from '@axis-backstage/plugin-statuspage-common';\nimport { StatusChip } from './StatusChip';\n\nexport type ComponentsTableProps = {\n components: Component[];\n};\n\nexport const ComponentsTable = ({ components }: ComponentsTableProps) => {\n // Columns definition\n const columns: TableColumn[] = [\n { title: 'System', field: 'name', id: 'id' },\n {\n title: 'Status',\n field: 'status',\n render: (rowData: any) => <StatusChip status={rowData.status} />,\n align: 'right',\n },\n ];\n\n return (\n <Table\n options={{\n search: false,\n paging: false,\n header: false,\n padding: 'dense',\n toolbar: false,\n }}\n columns={columns}\n data={components.map(({ name, status, id }) => ({ name, status, id }))}\n />\n );\n};\n"],"names":[],"mappings":";;;;AAQO,MAAM,eAAA,GAAkB,CAAC,EAAE,UAAA,EAAW,KAA4B;AAEvE,EAAA,MAAM,OAAA,GAAyB;AAAA,IAC7B,EAAE,KAAA,EAAO,QAAA,EAAU,KAAA,EAAO,MAAA,EAAQ,IAAI,IAAA,EAAK;AAAA,IAC3C;AAAA,MACE,KAAA,EAAO,QAAA;AAAA,MACP,KAAA,EAAO,QAAA;AAAA,MACP,QAAQ,CAAC,OAAA,yBAAkB,UAAA,EAAA,EAAW,MAAA,EAAQ,QAAQ,MAAA,EAAQ,CAAA;AAAA,MAC9D,KAAA,EAAO;AAAA;AACT,GACF;AAEA,EAAA,uBACE,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,OAAA,EAAS;AAAA,QACP,MAAA,EAAQ,KAAA;AAAA,QACR,MAAA,EAAQ,KAAA;AAAA,QACR,MAAA,EAAQ,KAAA;AAAA,QACR,OAAA,EAAS,OAAA;AAAA,QACT,OAAA,EAAS;AAAA,OACX;AAAA,MACA,OAAA;AAAA,MACA,IAAA,EAAM,UAAA,CAAW,GAAA,CAAI,CAAC,EAAE,IAAA,EAAM,MAAA,EAAQ,EAAA,EAAG,MAAO,EAAE,IAAA,EAAM,MAAA,EAAQ,IAAG,CAAE;AAAA;AAAA,GACvE;AAEJ;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatusChip.esm.js","sources":["../../src/components/StatusChip.tsx"],"sourcesContent":["import Chip from '@mui/material/Chip';\nimport type { ComponentStatus } from '@axis-backstage/plugin-statuspage-common';\n\n/**\n * Maps statuspage component statuses to MUI colors.\n *\n */\nconst statusColorMap: { [key in ComponentStatus]: string } = {\n under_maintenance: 'info',\n operational: 'success',\n degraded_performance: 'warning',\n partial_outage: 'warning',\n major_outage: 'error',\n};\n\ntype StatusChipProps = {\n status: ComponentStatus;\n};\n\nconst formatStatusString = (status: string): string =>\n status\n .split('_')\n .map(word => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase())\n .join(' ');\n\nexport const StatusChip = ({ status }: StatusChipProps) => (\n <Chip\n sx={{ margin: '0 8px' }}\n size=\"small\"\n label={formatStatusString(status)}\n color={statusColorMap[status] || ('default' as any)}\n />\n);\n"],"names":[],"mappings":";;;AAOA,MAAM,
|
|
1
|
+
{"version":3,"file":"StatusChip.esm.js","sources":["../../src/components/StatusChip.tsx"],"sourcesContent":["import Chip from '@mui/material/Chip';\nimport type { ComponentStatus } from '@axis-backstage/plugin-statuspage-common';\n\n/**\n * Maps statuspage component statuses to MUI colors.\n *\n */\nconst statusColorMap: { [key in ComponentStatus]: string } = {\n under_maintenance: 'info',\n operational: 'success',\n degraded_performance: 'warning',\n partial_outage: 'warning',\n major_outage: 'error',\n};\n\ntype StatusChipProps = {\n status: ComponentStatus;\n};\n\nconst formatStatusString = (status: string): string =>\n status\n .split('_')\n .map(word => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase())\n .join(' ');\n\nexport const StatusChip = ({ status }: StatusChipProps) => (\n <Chip\n sx={{ margin: '0 8px' }}\n size=\"small\"\n label={formatStatusString(status)}\n color={statusColorMap[status] || ('default' as any)}\n />\n);\n"],"names":[],"mappings":";;;AAOA,MAAM,cAAA,GAAuD;AAAA,EAC3D,iBAAA,EAAmB,MAAA;AAAA,EACnB,WAAA,EAAa,SAAA;AAAA,EACb,oBAAA,EAAsB,SAAA;AAAA,EACtB,cAAA,EAAgB,SAAA;AAAA,EAChB,YAAA,EAAc;AAChB,CAAA;AAMA,MAAM,kBAAA,GAAqB,CAAC,MAAA,KAC1B,MAAA,CACG,MAAM,GAAG,CAAA,CACT,GAAA,CAAI,CAAA,IAAA,KAAQ,IAAA,CAAK,MAAA,CAAO,CAAC,CAAA,CAAE,WAAA,EAAY,GAAI,IAAA,CAAK,KAAA,CAAM,CAAC,EAAE,WAAA,EAAa,CAAA,CACtE,IAAA,CAAK,GAAG,CAAA;AAEN,MAAM,UAAA,GAAa,CAAC,EAAE,MAAA,EAAO,qBAClC,GAAA;AAAA,EAAC,IAAA;AAAA,EAAA;AAAA,IACC,EAAA,EAAI,EAAE,MAAA,EAAQ,OAAA,EAAQ;AAAA,IACtB,IAAA,EAAK,OAAA;AAAA,IACL,KAAA,EAAO,mBAAmB,MAAM,CAAA;AAAA,IAChC,KAAA,EAAO,cAAA,CAAe,MAAM,CAAA,IAAM;AAAA;AACpC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatuspageComponent.esm.js","sources":["../../src/components/StatuspageComponent.tsx"],"sourcesContent":["import {\n InfoCard,\n Progress,\n ResponseErrorPanel,\n} from '@backstage/core-components';\nimport { ComponentGroupsList } from './ComponentGroupsList';\nimport IconButton from '@mui/material/IconButton';\nimport OpenInNewIcon from '@mui/icons-material/OpenInNew';\nimport { useComponents } from '../hooks/useComponents';\n\n/**\n * StatuspageComponent props.\n *\n * @public\n */\nexport type StatuspageProps = {\n name: string;\n};\n\n/**\n * Visualizes a full statuspage.\n *\n * @param name - instance name from app config.\n * @public\n */\nexport const StatuspageComponent = ({ name }: StatuspageProps) => {\n const { loading, error, value } = useComponents(name);\n\n if (loading) {\n return <Progress />;\n }\n if (error) {\n return <ResponseErrorPanel error={error} />;\n }\n\n const linkAction = value?.url && (\n <IconButton\n aria-label=\"Go to our statuspage\"\n role=\"button\"\n title=\"Go to statuspage(.io)\"\n href={value?.url}\n target=\"_blank\"\n >\n <OpenInNewIcon />\n </IconButton>\n );\n\n return (\n <InfoCard title=\"Status of our services\" action={linkAction}>\n <ComponentGroupsList\n components={value?.components || []}\n componentGroups={value?.componentGroups || []}\n />\n </InfoCard>\n );\n};\n"],"names":[],"mappings":";;;;;;;AAyBO,MAAM,
|
|
1
|
+
{"version":3,"file":"StatuspageComponent.esm.js","sources":["../../src/components/StatuspageComponent.tsx"],"sourcesContent":["import {\n InfoCard,\n Progress,\n ResponseErrorPanel,\n} from '@backstage/core-components';\nimport { ComponentGroupsList } from './ComponentGroupsList';\nimport IconButton from '@mui/material/IconButton';\nimport OpenInNewIcon from '@mui/icons-material/OpenInNew';\nimport { useComponents } from '../hooks/useComponents';\n\n/**\n * StatuspageComponent props.\n *\n * @public\n */\nexport type StatuspageProps = {\n name: string;\n};\n\n/**\n * Visualizes a full statuspage.\n *\n * @param name - instance name from app config.\n * @public\n */\nexport const StatuspageComponent = ({ name }: StatuspageProps) => {\n const { loading, error, value } = useComponents(name);\n\n if (loading) {\n return <Progress />;\n }\n if (error) {\n return <ResponseErrorPanel error={error} />;\n }\n\n const linkAction = value?.url && (\n <IconButton\n aria-label=\"Go to our statuspage\"\n role=\"button\"\n title=\"Go to statuspage(.io)\"\n href={value?.url}\n target=\"_blank\"\n >\n <OpenInNewIcon />\n </IconButton>\n );\n\n return (\n <InfoCard title=\"Status of our services\" action={linkAction}>\n <ComponentGroupsList\n components={value?.components || []}\n componentGroups={value?.componentGroups || []}\n />\n </InfoCard>\n );\n};\n"],"names":[],"mappings":";;;;;;;AAyBO,MAAM,mBAAA,GAAsB,CAAC,EAAE,IAAA,EAAK,KAAuB;AAChE,EAAA,MAAM,EAAE,OAAA,EAAS,KAAA,EAAO,KAAA,EAAM,GAAI,cAAc,IAAI,CAAA;AAEpD,EAAA,IAAI,OAAA,EAAS;AACX,IAAA,2BAAQ,QAAA,EAAA,EAAS,CAAA;AAAA,EACnB;AACA,EAAA,IAAI,KAAA,EAAO;AACT,IAAA,uBAAO,GAAA,CAAC,sBAAmB,KAAA,EAAc,CAAA;AAAA,EAC3C;AAEA,EAAA,MAAM,UAAA,GAAa,OAAO,GAAA,oBACxB,GAAA;AAAA,IAAC,UAAA;AAAA,IAAA;AAAA,MACC,YAAA,EAAW,sBAAA;AAAA,MACX,IAAA,EAAK,QAAA;AAAA,MACL,KAAA,EAAM,uBAAA;AAAA,MACN,MAAM,KAAA,EAAO,GAAA;AAAA,MACb,MAAA,EAAO,QAAA;AAAA,MAEP,8BAAC,aAAA,EAAA,EAAc;AAAA;AAAA,GACjB;AAGF,EAAA,uBACE,GAAA,CAAC,QAAA,EAAA,EAAS,KAAA,EAAM,wBAAA,EAAyB,QAAQ,UAAA,EAC/C,QAAA,kBAAA,GAAA;AAAA,IAAC,mBAAA;AAAA,IAAA;AAAA,MACC,UAAA,EAAY,KAAA,EAAO,UAAA,IAAc,EAAC;AAAA,MAClC,eAAA,EAAiB,KAAA,EAAO,eAAA,IAAmB;AAAC;AAAA,GAC9C,EACF,CAAA;AAEJ;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatuspageEntityCard.esm.js","sources":["../../src/components/StatuspageEntityCard.tsx"],"sourcesContent":["import {\n InfoCard,\n Progress,\n ResponseErrorPanel,\n} from '@backstage/core-components';\nimport OpenInNewIcon from '@mui/icons-material/OpenInNew';\nimport { useEntity } from '@backstage/plugin-catalog-react';\nimport { ComponentsTable } from './ComponentsTable';\nimport { ComponentGroupsList } from './ComponentGroupsList';\nimport IconButton from '@mui/material/IconButton';\nimport Typography from '@mui/material/Typography';\nimport { STATUSPAGE_ANNOTATION } from '@axis-backstage/plugin-statuspage-common';\nimport { useComponents } from '../hooks/useComponents';\n\n/**\n * Statuspage card intended for the EntityPage. Allows embedding of specific\n * statuspage components and component groups.\n *\n * @public\n */\nexport const StatuspageEntityCard = () => {\n const { entity } = useEntity();\n const [name, wantedComponentsStr] =\n entity.metadata.annotations?.[STATUSPAGE_ANNOTATION]?.split(':')!;\n const wantedComponents = wantedComponentsStr?.split(',').map(it => it.trim());\n\n const { loading, error, value } = useComponents(name);\n\n if (loading) {\n return <Progress />;\n }\n if (error) {\n return <ResponseErrorPanel error={error} />;\n }\n\n if (loading) {\n return <Progress />;\n }\n if (error) {\n return <ResponseErrorPanel error={error} />;\n }\n\n const linkAction = value?.url && (\n <IconButton\n aria-label=\"Go to our statuspage\"\n role=\"button\"\n title=\"Go to statuspage(.io)\"\n href={value?.url}\n target=\"_blank\"\n >\n <OpenInNewIcon />\n </IconButton>\n );\n\n const fullStatuspage = !wantedComponents;\n const filteredComponents =\n value?.components.filter(\n c => !fullStatuspage && !c.group && wantedComponents.includes(c.id),\n ) || [];\n const filteredComponentGroups =\n value?.componentGroups.filter(\n c => fullStatuspage || wantedComponents.includes(c.id),\n ) || [];\n const noComponents =\n (!filteredComponents || filteredComponentGroups.length === 0) &&\n filteredComponents &&\n filteredComponents.length === 0;\n\n if (noComponents) {\n return (\n <InfoCard title=\"Service Status\" action={linkAction}>\n <Typography variant=\"body2\" color=\"#FF5555\">\n The specified statuspage.io components could not be found. Check your\n annotation.\n </Typography>\n </InfoCard>\n );\n }\n return (\n <InfoCard title=\"Service Status\" action={linkAction}>\n {filteredComponents && filteredComponents.length > 0 && (\n <ComponentsTable components={filteredComponents} />\n )}\n {filteredComponentGroups && filteredComponentGroups.length > 0 && (\n <ComponentGroupsList\n components={value?.components || []}\n componentGroups={filteredComponentGroups}\n expanded={!fullStatuspage}\n />\n )}\n </InfoCard>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;AAoBO,MAAM,uBAAuB,MAAM;AACxC,
|
|
1
|
+
{"version":3,"file":"StatuspageEntityCard.esm.js","sources":["../../src/components/StatuspageEntityCard.tsx"],"sourcesContent":["import {\n InfoCard,\n Progress,\n ResponseErrorPanel,\n} from '@backstage/core-components';\nimport OpenInNewIcon from '@mui/icons-material/OpenInNew';\nimport { useEntity } from '@backstage/plugin-catalog-react';\nimport { ComponentsTable } from './ComponentsTable';\nimport { ComponentGroupsList } from './ComponentGroupsList';\nimport IconButton from '@mui/material/IconButton';\nimport Typography from '@mui/material/Typography';\nimport { STATUSPAGE_ANNOTATION } from '@axis-backstage/plugin-statuspage-common';\nimport { useComponents } from '../hooks/useComponents';\n\n/**\n * Statuspage card intended for the EntityPage. Allows embedding of specific\n * statuspage components and component groups.\n *\n * @public\n */\nexport const StatuspageEntityCard = () => {\n const { entity } = useEntity();\n const [name, wantedComponentsStr] =\n entity.metadata.annotations?.[STATUSPAGE_ANNOTATION]?.split(':')!;\n const wantedComponents = wantedComponentsStr?.split(',').map(it => it.trim());\n\n const { loading, error, value } = useComponents(name);\n\n if (loading) {\n return <Progress />;\n }\n if (error) {\n return <ResponseErrorPanel error={error} />;\n }\n\n if (loading) {\n return <Progress />;\n }\n if (error) {\n return <ResponseErrorPanel error={error} />;\n }\n\n const linkAction = value?.url && (\n <IconButton\n aria-label=\"Go to our statuspage\"\n role=\"button\"\n title=\"Go to statuspage(.io)\"\n href={value?.url}\n target=\"_blank\"\n >\n <OpenInNewIcon />\n </IconButton>\n );\n\n const fullStatuspage = !wantedComponents;\n const filteredComponents =\n value?.components.filter(\n c => !fullStatuspage && !c.group && wantedComponents.includes(c.id),\n ) || [];\n const filteredComponentGroups =\n value?.componentGroups.filter(\n c => fullStatuspage || wantedComponents.includes(c.id),\n ) || [];\n const noComponents =\n (!filteredComponents || filteredComponentGroups.length === 0) &&\n filteredComponents &&\n filteredComponents.length === 0;\n\n if (noComponents) {\n return (\n <InfoCard title=\"Service Status\" action={linkAction}>\n <Typography variant=\"body2\" color=\"#FF5555\">\n The specified statuspage.io components could not be found. Check your\n annotation.\n </Typography>\n </InfoCard>\n );\n }\n return (\n <InfoCard title=\"Service Status\" action={linkAction}>\n {filteredComponents && filteredComponents.length > 0 && (\n <ComponentsTable components={filteredComponents} />\n )}\n {filteredComponentGroups && filteredComponentGroups.length > 0 && (\n <ComponentGroupsList\n components={value?.components || []}\n componentGroups={filteredComponentGroups}\n expanded={!fullStatuspage}\n />\n )}\n </InfoCard>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;AAoBO,MAAM,uBAAuB,MAAM;AACxC,EAAA,MAAM,EAAE,MAAA,EAAO,GAAI,SAAA,EAAU;AAC7B,EAAA,MAAM,CAAC,IAAA,EAAM,mBAAmB,CAAA,GAC9B,MAAA,CAAO,SAAS,WAAA,GAAc,qBAAqB,CAAA,EAAG,KAAA,CAAM,GAAG,CAAA;AACjE,EAAA,MAAM,gBAAA,GAAmB,qBAAqB,KAAA,CAAM,GAAG,EAAE,GAAA,CAAI,CAAA,EAAA,KAAM,EAAA,CAAG,IAAA,EAAM,CAAA;AAE5E,EAAA,MAAM,EAAE,OAAA,EAAS,KAAA,EAAO,KAAA,EAAM,GAAI,cAAc,IAAI,CAAA;AAEpD,EAAA,IAAI,OAAA,EAAS;AACX,IAAA,2BAAQ,QAAA,EAAA,EAAS,CAAA;AAAA,EACnB;AACA,EAAA,IAAI,KAAA,EAAO;AACT,IAAA,uBAAO,GAAA,CAAC,sBAAmB,KAAA,EAAc,CAAA;AAAA,EAC3C;AAEA,EAAA,IAAI,OAAA,EAAS;AACX,IAAA,2BAAQ,QAAA,EAAA,EAAS,CAAA;AAAA,EACnB;AACA,EAAA,IAAI,KAAA,EAAO;AACT,IAAA,uBAAO,GAAA,CAAC,sBAAmB,KAAA,EAAc,CAAA;AAAA,EAC3C;AAEA,EAAA,MAAM,UAAA,GAAa,OAAO,GAAA,oBACxB,GAAA;AAAA,IAAC,UAAA;AAAA,IAAA;AAAA,MACC,YAAA,EAAW,sBAAA;AAAA,MACX,IAAA,EAAK,QAAA;AAAA,MACL,KAAA,EAAM,uBAAA;AAAA,MACN,MAAM,KAAA,EAAO,GAAA;AAAA,MACb,MAAA,EAAO,QAAA;AAAA,MAEP,8BAAC,aAAA,EAAA,EAAc;AAAA;AAAA,GACjB;AAGF,EAAA,MAAM,iBAAiB,CAAC,gBAAA;AACxB,EAAA,MAAM,kBAAA,GACJ,OAAO,UAAA,CAAW,MAAA;AAAA,IAChB,CAAA,CAAA,KAAK,CAAC,cAAA,IAAkB,CAAC,EAAE,KAAA,IAAS,gBAAA,CAAiB,QAAA,CAAS,CAAA,CAAE,EAAE;AAAA,OAC/D,EAAC;AACR,EAAA,MAAM,uBAAA,GACJ,OAAO,eAAA,CAAgB,MAAA;AAAA,IACrB,CAAA,CAAA,KAAK,cAAA,IAAkB,gBAAA,CAAiB,QAAA,CAAS,EAAE,EAAE;AAAA,OAClD,EAAC;AACR,EAAA,MAAM,YAAA,GAAA,CACH,CAAC,kBAAA,IAAsB,uBAAA,CAAwB,WAAW,CAAA,KAC3D,kBAAA,IACA,mBAAmB,MAAA,KAAW,CAAA;AAEhC,EAAA,IAAI,YAAA,EAAc;AAChB,IAAA,uBACE,GAAA,CAAC,QAAA,EAAA,EAAS,KAAA,EAAM,gBAAA,EAAiB,MAAA,EAAQ,UAAA,EACvC,QAAA,kBAAA,GAAA,CAAC,UAAA,EAAA,EAAW,OAAA,EAAQ,OAAA,EAAQ,KAAA,EAAM,SAAA,EAAU,+FAG5C,CAAA,EACF,CAAA;AAAA,EAEJ;AACA,EAAA,uBACE,IAAA,CAAC,QAAA,EAAA,EAAS,KAAA,EAAM,gBAAA,EAAiB,QAAQ,UAAA,EACtC,QAAA,EAAA;AAAA,IAAA,kBAAA,IAAsB,mBAAmB,MAAA,GAAS,CAAA,oBACjD,GAAA,CAAC,eAAA,EAAA,EAAgB,YAAY,kBAAA,EAAoB,CAAA;AAAA,IAElD,uBAAA,IAA2B,uBAAA,CAAwB,MAAA,GAAS,CAAA,oBAC3D,GAAA;AAAA,MAAC,mBAAA;AAAA,MAAA;AAAA,QACC,UAAA,EAAY,KAAA,EAAO,UAAA,IAAc,EAAC;AAAA,QAClC,eAAA,EAAiB,uBAAA;AAAA,QACjB,UAAU,CAAC;AAAA;AAAA;AACb,GAAA,EAEJ,CAAA;AAEJ;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useComponents.esm.js","sources":["../../src/hooks/useComponents.ts"],"sourcesContent":["import { useApi } from '@backstage/core-plugin-api';\nimport { statuspageApiRef } from '../api/StatuspageApi';\nimport useAsync from 'react-use/lib/useAsync';\nimport {\n Component,\n ComponentGroup,\n} from '@axis-backstage/plugin-statuspage-common';\n\nexport const useComponents = (name: string) => {\n const statuspageApi = useApi(statuspageApiRef);\n\n return useAsync(async (): Promise<{\n components: Component[];\n componentGroups: ComponentGroup[];\n url?: string;\n }> => {\n const components = await statuspageApi.getComponents(name);\n const componentGroups = await statuspageApi.getComponentGroups(name);\n const { url } = await statuspageApi.getLink(name);\n return {\n components,\n componentGroups,\n url,\n };\n }, [name]);\n};\n"],"names":[],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"useComponents.esm.js","sources":["../../src/hooks/useComponents.ts"],"sourcesContent":["import { useApi } from '@backstage/core-plugin-api';\nimport { statuspageApiRef } from '../api/StatuspageApi';\nimport useAsync from 'react-use/lib/useAsync';\nimport {\n Component,\n ComponentGroup,\n} from '@axis-backstage/plugin-statuspage-common';\n\nexport const useComponents = (name: string) => {\n const statuspageApi = useApi(statuspageApiRef);\n\n return useAsync(async (): Promise<{\n components: Component[];\n componentGroups: ComponentGroup[];\n url?: string;\n }> => {\n const components = await statuspageApi.getComponents(name);\n const componentGroups = await statuspageApi.getComponentGroups(name);\n const { url } = await statuspageApi.getLink(name);\n return {\n components,\n componentGroups,\n url,\n };\n }, [name]);\n};\n"],"names":[],"mappings":";;;;AAQO,MAAM,aAAA,GAAgB,CAAC,IAAA,KAAiB;AAC7C,EAAA,MAAM,aAAA,GAAgB,OAAO,gBAAgB,CAAA;AAE7C,EAAA,OAAO,SAAS,YAIV;AACJ,IAAA,MAAM,UAAA,GAAa,MAAM,aAAA,CAAc,aAAA,CAAc,IAAI,CAAA;AACzD,IAAA,MAAM,eAAA,GAAkB,MAAM,aAAA,CAAc,kBAAA,CAAmB,IAAI,CAAA;AACnE,IAAA,MAAM,EAAE,GAAA,EAAI,GAAI,MAAM,aAAA,CAAc,QAAQ,IAAI,CAAA;AAChD,IAAA,OAAO;AAAA,MACL,UAAA;AAAA,MACA,eAAA;AAAA,MACA;AAAA,KACF;AAAA,EACF,CAAA,EAAG,CAAC,IAAI,CAAC,CAAA;AACX;;;;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -5,6 +5,14 @@ import { Entity } from '@backstage/catalog-model';
|
|
|
5
5
|
import * as _backstage_frontend_plugin_api from '@backstage/frontend-plugin-api';
|
|
6
6
|
import { Component, ComponentGroup } from '@axis-backstage/plugin-statuspage-common';
|
|
7
7
|
|
|
8
|
+
/**
|
|
9
|
+
* Statuspage card intended for the EntityPage. Allows embedding of specific
|
|
10
|
+
* statuspage components and component groups.
|
|
11
|
+
*
|
|
12
|
+
* @public
|
|
13
|
+
*/
|
|
14
|
+
declare const StatuspageEntityCard: () => react_jsx_runtime.JSX.Element;
|
|
15
|
+
|
|
8
16
|
/**
|
|
9
17
|
* StatuspageComponent props.
|
|
10
18
|
*
|
|
@@ -35,14 +43,6 @@ declare const statuspagePlugin: _backstage_core_plugin_api.BackstagePlugin<{
|
|
|
35
43
|
*/
|
|
36
44
|
declare const StatuspagePage: ({ name }: StatuspageProps) => react_jsx_runtime.JSX.Element;
|
|
37
45
|
|
|
38
|
-
/**
|
|
39
|
-
* Statuspage card intended for the EntityPage. Allows embedding of specific
|
|
40
|
-
* statuspage components and component groups.
|
|
41
|
-
*
|
|
42
|
-
* @public
|
|
43
|
-
*/
|
|
44
|
-
declare const StatuspageEntityCard: () => react_jsx_runtime.JSX.Element;
|
|
45
|
-
|
|
46
46
|
/**
|
|
47
47
|
* The definition for the statuspage api.
|
|
48
48
|
*
|
package/dist/plugin.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.esm.js","sources":["../src/plugin.ts"],"sourcesContent":["import {\n createApiFactory,\n createPlugin,\n createRoutableExtension,\n discoveryApiRef,\n fetchApiRef,\n} from '@backstage/core-plugin-api';\n\nimport { STATUSPAGE_ANNOTATION } from '@axis-backstage/plugin-statuspage-common';\nimport { Entity } from '@backstage/catalog-model';\n\nimport { rootRouteRef } from './routes';\nimport { statuspageApiRef } from './api/StatuspageApi';\nimport { StatuspageClient } from './api/StatuspageClient';\n\n/**\n * Checks availability of a statuspage component\n *\n * @public\n */\nexport const isStatuspageAvailable = (entity: Entity) =>\n Boolean(entity.metadata.annotations?.[STATUSPAGE_ANNOTATION]);\n\n/**\n * Create the plugin.\n *\n * @public\n */\nexport const statuspagePlugin = createPlugin({\n id: 'statuspage',\n apis: [\n createApiFactory({\n api: statuspageApiRef,\n deps: {\n discoveryApi: discoveryApiRef,\n fetchApi: fetchApiRef,\n },\n factory: ({ discoveryApi, fetchApi }) =>\n new StatuspageClient({ discoveryApi, fetchApi }),\n }),\n ],\n routes: {\n root: rootRouteRef,\n },\n});\n\n/**\n * Routable extension for StatuspageComponent.\n *\n * @public\n */\nexport const StatuspagePage = statuspagePlugin.provide(\n createRoutableExtension({\n name: 'StatuspagePage',\n component: () =>\n import('./components/StatuspageComponent').then(\n m => m.StatuspageComponent,\n ),\n mountPoint: rootRouteRef,\n }),\n);\n"],"names":[],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"plugin.esm.js","sources":["../src/plugin.ts"],"sourcesContent":["import {\n createApiFactory,\n createPlugin,\n createRoutableExtension,\n discoveryApiRef,\n fetchApiRef,\n} from '@backstage/core-plugin-api';\n\nimport { STATUSPAGE_ANNOTATION } from '@axis-backstage/plugin-statuspage-common';\nimport { Entity } from '@backstage/catalog-model';\n\nimport { rootRouteRef } from './routes';\nimport { statuspageApiRef } from './api/StatuspageApi';\nimport { StatuspageClient } from './api/StatuspageClient';\n\n/**\n * Checks availability of a statuspage component\n *\n * @public\n */\nexport const isStatuspageAvailable = (entity: Entity) =>\n Boolean(entity.metadata.annotations?.[STATUSPAGE_ANNOTATION]);\n\n/**\n * Create the plugin.\n *\n * @public\n */\nexport const statuspagePlugin = createPlugin({\n id: 'statuspage',\n apis: [\n createApiFactory({\n api: statuspageApiRef,\n deps: {\n discoveryApi: discoveryApiRef,\n fetchApi: fetchApiRef,\n },\n factory: ({ discoveryApi, fetchApi }) =>\n new StatuspageClient({ discoveryApi, fetchApi }),\n }),\n ],\n routes: {\n root: rootRouteRef,\n },\n});\n\n/**\n * Routable extension for StatuspageComponent.\n *\n * @public\n */\nexport const StatuspagePage = statuspagePlugin.provide(\n createRoutableExtension({\n name: 'StatuspagePage',\n component: () =>\n import('./components/StatuspageComponent').then(\n m => m.StatuspageComponent,\n ),\n mountPoint: rootRouteRef,\n }),\n);\n"],"names":[],"mappings":";;;;;;AAoBO,MAAM,qBAAA,GAAwB,CAAC,MAAA,KACpC,OAAA,CAAQ,OAAO,QAAA,CAAS,WAAA,GAAc,qBAAqB,CAAC;AAOvD,MAAM,mBAAmB,YAAA,CAAa;AAAA,EAC3C,EAAA,EAAI,YAAA;AAAA,EACJ,IAAA,EAAM;AAAA,IACJ,gBAAA,CAAiB;AAAA,MACf,GAAA,EAAK,gBAAA;AAAA,MACL,IAAA,EAAM;AAAA,QACJ,YAAA,EAAc,eAAA;AAAA,QACd,QAAA,EAAU;AAAA,OACZ;AAAA,MACA,OAAA,EAAS,CAAC,EAAE,YAAA,EAAc,QAAA,EAAS,KACjC,IAAI,gBAAA,CAAiB,EAAE,YAAA,EAAc,QAAA,EAAU;AAAA,KAClD;AAAA,GACH;AAAA,EACA,MAAA,EAAQ;AAAA,IACN,IAAA,EAAM;AAAA;AAEV,CAAC;AAOM,MAAM,iBAAiB,gBAAA,CAAiB,OAAA;AAAA,EAC7C,uBAAA,CAAwB;AAAA,IACtB,IAAA,EAAM,gBAAA;AAAA,IACN,SAAA,EAAW,MACT,OAAO,yCAAkC,CAAA,CAAE,IAAA;AAAA,MACzC,OAAK,CAAA,CAAE;AAAA,KACT;AAAA,IACF,UAAA,EAAY;AAAA,GACb;AACH;;;;"}
|
package/dist/routes.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routes.esm.js","sources":["../src/routes.ts"],"sourcesContent":["import { createRouteRef } from '@backstage/core-plugin-api';\n\nexport const rootRouteRef = createRouteRef({\n id: 'statuspage',\n});\n"],"names":[],"mappings":";;AAEO,MAAM,eAAe,
|
|
1
|
+
{"version":3,"file":"routes.esm.js","sources":["../src/routes.ts"],"sourcesContent":["import { createRouteRef } from '@backstage/core-plugin-api';\n\nexport const rootRouteRef = createRouteRef({\n id: 'statuspage',\n});\n"],"names":[],"mappings":";;AAEO,MAAM,eAAe,cAAA,CAAe;AAAA,EACzC,EAAA,EAAI;AACN,CAAC;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@axis-backstage/plugin-statuspage",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.2",
|
|
4
4
|
"main": "dist/index.esm.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -30,11 +30,11 @@
|
|
|
30
30
|
"postpack": "backstage-cli package postpack"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@axis-backstage/plugin-statuspage-common": "^0.9.
|
|
34
|
-
"@backstage/catalog-model": "^1.
|
|
35
|
-
"@backstage/core-components": "^0.18.
|
|
36
|
-
"@backstage/core-plugin-api": "^1.12.
|
|
37
|
-
"@backstage/plugin-catalog-react": "^1.
|
|
33
|
+
"@axis-backstage/plugin-statuspage-common": "^0.9.1",
|
|
34
|
+
"@backstage/catalog-model": "^1.8.0",
|
|
35
|
+
"@backstage/core-components": "^0.18.9",
|
|
36
|
+
"@backstage/core-plugin-api": "^1.12.5",
|
|
37
|
+
"@backstage/plugin-catalog-react": "^2.1.4",
|
|
38
38
|
"@mui/icons-material": "^5.15.7",
|
|
39
39
|
"@mui/material": "^5.15.7",
|
|
40
40
|
"react-use": "^17.2.4"
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
"react-router-dom": "^6.3.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@backstage/cli": "^0.
|
|
50
|
-
"@backstage/dev-utils": "^1.1.
|
|
49
|
+
"@backstage/cli": "^0.36.1",
|
|
50
|
+
"@backstage/dev-utils": "^1.1.22",
|
|
51
51
|
"@testing-library/jest-dom": "^6.0.0"
|
|
52
52
|
},
|
|
53
53
|
"files": [
|