@backstage-community/plugin-apiiro 0.1.0 → 1.0.0

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.
Files changed (88) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/README.md +91 -12
  3. package/config.d.ts +14 -0
  4. package/dist/App.esm.js +96 -4
  5. package/dist/App.esm.js.map +1 -1
  6. package/dist/api/index.esm.js +6 -0
  7. package/dist/api/index.esm.js.map +1 -1
  8. package/dist/assets/SettingIcon.esm.js +1 -0
  9. package/dist/assets/SettingIcon.esm.js.map +1 -1
  10. package/dist/components/ApiiroSidebar.esm.js.map +1 -1
  11. package/dist/components/CalendarDatePicker.esm.js.map +1 -1
  12. package/dist/components/DataGrid/DataGrid.esm.js +1 -0
  13. package/dist/components/DataGrid/DataGrid.esm.js.map +1 -1
  14. package/dist/components/MetricsGroup/TabMetricsGroup.esm.js +28 -4
  15. package/dist/components/MetricsGroup/TabMetricsGroup.esm.js.map +1 -1
  16. package/dist/components/MetricsGroup/WidgetMetricsGroup.esm.js +30 -7
  17. package/dist/components/MetricsGroup/WidgetMetricsGroup.esm.js.map +1 -1
  18. package/dist/components/RiskLevel.esm.js +1 -0
  19. package/dist/components/RiskLevel.esm.js.map +1 -1
  20. package/dist/components/charts/GaugeChart.esm.js +8 -6
  21. package/dist/components/charts/GaugeChart.esm.js.map +1 -1
  22. package/dist/components/common/StatusContainer.esm.js +123 -0
  23. package/dist/components/common/StatusContainer.esm.js.map +1 -0
  24. package/dist/components/filters/DiscoveredOnFilter.esm.js +1 -1
  25. package/dist/components/filters/DiscoveredOnFilter.esm.js.map +1 -1
  26. package/dist/components/tiles/MttrVsSLATile.esm.js +31 -14
  27. package/dist/components/tiles/MttrVsSLATile.esm.js.map +1 -1
  28. package/dist/components/tiles/RiskOverTimeTile.esm.js +15 -12
  29. package/dist/components/tiles/RiskOverTimeTile.esm.js.map +1 -1
  30. package/dist/components/tiles/SLAAdherenceTile.esm.js +15 -12
  31. package/dist/components/tiles/SLAAdherenceTile.esm.js.map +1 -1
  32. package/dist/components/tiles/StatusTile.esm.js +98 -66
  33. package/dist/components/tiles/StatusTile.esm.js.map +1 -1
  34. package/dist/components/tiles/TopLanguagesTile.esm.js +1 -0
  35. package/dist/components/tiles/TopLanguagesTile.esm.js.map +1 -1
  36. package/dist/components/tiles/TopRiskTile.esm.js +19 -16
  37. package/dist/components/tiles/TopRiskTile.esm.js.map +1 -1
  38. package/dist/index.d.ts +31 -6
  39. package/dist/index.esm.js +2 -1
  40. package/dist/index.esm.js.map +1 -1
  41. package/dist/pages/Applications/Applications.esm.js +104 -0
  42. package/dist/pages/Applications/Applications.esm.js.map +1 -0
  43. package/dist/pages/Applications/tableConfig.esm.js +147 -0
  44. package/dist/pages/Applications/tableConfig.esm.js.map +1 -0
  45. package/dist/pages/Repositories/Repositories.esm.js +26 -26
  46. package/dist/pages/Repositories/Repositories.esm.js.map +1 -1
  47. package/dist/pages/Repositories/tableConfig.esm.js +3 -2
  48. package/dist/pages/Repositories/tableConfig.esm.js.map +1 -1
  49. package/dist/pages/Risks/Risks.esm.js +9 -3
  50. package/dist/pages/Risks/Risks.esm.js.map +1 -1
  51. package/dist/pages/Risks/tableConfig.esm.js +25 -11
  52. package/dist/pages/Risks/tableConfig.esm.js.map +1 -1
  53. package/dist/pages/tab/ComponentTab.esm.js +72 -0
  54. package/dist/pages/tab/ComponentTab.esm.js.map +1 -0
  55. package/dist/pages/tab/SystemTab.esm.js +159 -0
  56. package/dist/pages/tab/SystemTab.esm.js.map +1 -0
  57. package/dist/pages/tab/TabProvider.esm.js +9 -3
  58. package/dist/pages/tab/TabProvider.esm.js.map +1 -1
  59. package/dist/pages/widget/ComponentWidget.esm.js +67 -0
  60. package/dist/pages/widget/ComponentWidget.esm.js.map +1 -0
  61. package/dist/pages/widget/SystemWidget.esm.js +81 -0
  62. package/dist/pages/widget/SystemWidget.esm.js.map +1 -0
  63. package/dist/pages/widget/WidgetProvider.esm.js +9 -3
  64. package/dist/pages/widget/WidgetProvider.esm.js.map +1 -1
  65. package/dist/plugin.esm.js.map +1 -1
  66. package/dist/queries/application.queries.esm.js +64 -0
  67. package/dist/queries/application.queries.esm.js.map +1 -0
  68. package/dist/queries/mttr-statistics.queries.esm.js +19 -12
  69. package/dist/queries/mttr-statistics.queries.esm.js.map +1 -1
  70. package/dist/queries/repository.queries.esm.js +19 -8
  71. package/dist/queries/repository.queries.esm.js.map +1 -1
  72. package/dist/queries/risk-score-over-time.queries.esm.js +19 -12
  73. package/dist/queries/risk-score-over-time.queries.esm.js.map +1 -1
  74. package/dist/queries/risks.queries.esm.js +19 -7
  75. package/dist/queries/risks.queries.esm.js.map +1 -1
  76. package/dist/queries/sla-breach.queries.esm.js +22 -11
  77. package/dist/queries/sla-breach.queries.esm.js.map +1 -1
  78. package/dist/queries/top-risks.queries.esm.js +19 -7
  79. package/dist/queries/top-risks.queries.esm.js.map +1 -1
  80. package/dist/theme/themeUtils.esm.js +5 -2
  81. package/dist/theme/themeUtils.esm.js.map +1 -1
  82. package/dist/utils/utils.esm.js +3 -2
  83. package/dist/utils/utils.esm.js.map +1 -1
  84. package/package.json +12 -12
  85. package/dist/pages/tab/Tab.esm.js +0 -147
  86. package/dist/pages/tab/Tab.esm.js.map +0 -1
  87. package/dist/pages/widget/Widget.esm.js +0 -161
  88. package/dist/pages/widget/Widget.esm.js.map +0 -1
@@ -6,10 +6,15 @@ const getTopRisksData = async ({
6
6
  signal,
7
7
  connectApi,
8
8
  repoId,
9
- entityRef
9
+ entityRef,
10
+ applicationId
10
11
  }) => {
11
12
  const url = await connectApi.discoveryApi.getBaseUrl("apiiro");
12
- const body = { repositoryKey: repoId, ...entityRef && { entityRef } };
13
+ const body = {
14
+ ...repoId && { repositoryId: repoId },
15
+ ...entityRef && { entityRef },
16
+ ...applicationId && { applicationId }
17
+ };
13
18
  return await post(fetchApi, `${url}/top-risks`, {
14
19
  signal,
15
20
  body
@@ -19,22 +24,29 @@ function useTopRisksData({
19
24
  fetchApi,
20
25
  connectApi,
21
26
  repoId,
22
- entityRef
27
+ entityRef,
28
+ applicationId
23
29
  }) {
24
30
  const {
25
31
  data: topRisksData,
26
32
  error: topRisksDataError,
27
33
  isLoading: topRisksDataLoading
28
34
  } = useQuery({
29
- queryKey: ["GET_TOP_RISKS" /* GET_TOP_RISKS */, repoId, entityRef],
30
- queryFn: ({ signal }) => repoId ? getTopRisksData({
35
+ queryKey: [
36
+ "GET_TOP_RISKS" /* GET_TOP_RISKS */,
37
+ repoId,
38
+ entityRef,
39
+ applicationId
40
+ ],
41
+ queryFn: ({ signal }) => repoId || applicationId ? getTopRisksData({
31
42
  fetchApi,
32
43
  signal,
33
44
  connectApi,
34
45
  repoId,
35
- entityRef
46
+ entityRef,
47
+ applicationId
36
48
  }) : Promise.resolve([]),
37
- enabled: !!repoId
49
+ enabled: !!repoId || !!applicationId
38
50
  });
39
51
  return {
40
52
  topRisksData,
@@ -1 +1 @@
1
- {"version":3,"file":"top-risks.queries.esm.js","sources":["../../src/queries/top-risks.queries.ts"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { useQuery } from '@tanstack/react-query';\nimport { post } from '../api';\nimport { Query, TopRiskSuccessResponseData } from './queries.type';\n\nexport enum TOP_RISKS_QUERY_KEY {\n GET_TOP_RISKS = 'GET_TOP_RISKS',\n}\n\nconst getTopRisksData = async ({\n fetchApi,\n signal,\n connectApi,\n repoId,\n entityRef,\n}: Query & { repoId: string; entityRef?: string }) => {\n const url = await connectApi.discoveryApi.getBaseUrl('apiiro');\n const body = { repositoryKey: repoId, ...(entityRef && { entityRef }) };\n return await post<TopRiskSuccessResponseData>(fetchApi, `${url}/top-risks`, {\n signal,\n body,\n });\n};\n\nexport function useTopRisksData({\n fetchApi,\n connectApi,\n repoId,\n entityRef,\n}: Omit<Query, 'signal'> & { repoId?: string; entityRef?: string }) {\n const {\n data: topRisksData,\n error: topRisksDataError,\n isLoading: topRisksDataLoading,\n } = useQuery({\n queryKey: [TOP_RISKS_QUERY_KEY.GET_TOP_RISKS, repoId, entityRef],\n queryFn: ({ signal }) =>\n repoId\n ? getTopRisksData({\n fetchApi,\n signal,\n connectApi,\n repoId,\n entityRef,\n })\n : Promise.resolve([]),\n enabled: !!repoId,\n });\n\n return {\n topRisksData,\n topRisksDataError,\n topRisksDataLoading,\n };\n}\n"],"names":[],"mappings":";;;AAuBA,MAAM,kBAAkB,OAAO;AAAA,EAC7B,QAAA;AAAA,EACA,MAAA;AAAA,EACA,UAAA;AAAA,EACA,MAAA;AAAA,EACA;AACF,CAAA,KAAsD;AACpD,EAAA,MAAM,GAAA,GAAM,MAAM,UAAA,CAAW,YAAA,CAAa,WAAW,QAAQ,CAAA;AAC7D,EAAA,MAAM,IAAA,GAAO,EAAE,aAAA,EAAe,MAAA,EAAQ,GAAI,SAAA,IAAa,EAAE,WAAU,EAAG;AACtE,EAAA,OAAO,MAAM,IAAA,CAAiC,QAAA,EAAU,CAAA,EAAG,GAAG,CAAA,UAAA,CAAA,EAAc;AAAA,IAC1E,MAAA;AAAA,IACA;AAAA,GACD,CAAA;AACH,CAAA;AAEO,SAAS,eAAA,CAAgB;AAAA,EAC9B,QAAA;AAAA,EACA,UAAA;AAAA,EACA,MAAA;AAAA,EACA;AACF,CAAA,EAAoE;AAClE,EAAA,MAAM;AAAA,IACJ,IAAA,EAAM,YAAA;AAAA,IACN,KAAA,EAAO,iBAAA;AAAA,IACP,SAAA,EAAW;AAAA,MACT,QAAA,CAAS;AAAA,IACX,QAAA,EAAU,CAAC,eAAA,sBAAmC,MAAA,EAAQ,SAAS,CAAA;AAAA,IAC/D,SAAS,CAAC,EAAE,MAAA,EAAO,KACjB,SACI,eAAA,CAAgB;AAAA,MACd,QAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,MACA,MAAA;AAAA,MACA;AAAA,KACD,CAAA,GACD,OAAA,CAAQ,OAAA,CAAQ,EAAE,CAAA;AAAA,IACxB,OAAA,EAAS,CAAC,CAAC;AAAA,GACZ,CAAA;AAED,EAAA,OAAO;AAAA,IACL,YAAA;AAAA,IACA,iBAAA;AAAA,IACA;AAAA,GACF;AACF;;;;"}
1
+ {"version":3,"file":"top-risks.queries.esm.js","sources":["../../src/queries/top-risks.queries.ts"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { useQuery } from '@tanstack/react-query';\nimport { post } from '../api';\nimport { Query, TopRiskSuccessResponseData } from './queries.type';\n\nexport enum TOP_RISKS_QUERY_KEY {\n GET_TOP_RISKS = 'GET_TOP_RISKS',\n}\n\nconst getTopRisksData = async ({\n fetchApi,\n signal,\n connectApi,\n repoId,\n entityRef,\n applicationId,\n}: Query & {\n repoId?: string;\n entityRef?: string;\n applicationId?: string;\n}) => {\n const url = await connectApi.discoveryApi.getBaseUrl('apiiro');\n const body = {\n ...(repoId && { repositoryId: repoId }),\n ...(entityRef && { entityRef }),\n ...(applicationId && { applicationId }),\n };\n return await post<TopRiskSuccessResponseData>(fetchApi, `${url}/top-risks`, {\n signal,\n body,\n });\n};\n\nexport function useTopRisksData({\n fetchApi,\n connectApi,\n repoId,\n entityRef,\n applicationId,\n}: Omit<Query, 'signal'> & {\n repoId?: string;\n entityRef?: string;\n applicationId?: string;\n}) {\n const {\n data: topRisksData,\n error: topRisksDataError,\n isLoading: topRisksDataLoading,\n } = useQuery({\n queryKey: [\n TOP_RISKS_QUERY_KEY.GET_TOP_RISKS,\n repoId,\n entityRef,\n applicationId,\n ],\n queryFn: ({ signal }) =>\n repoId || applicationId\n ? getTopRisksData({\n fetchApi,\n signal,\n connectApi,\n repoId,\n entityRef,\n applicationId,\n })\n : Promise.resolve([]),\n enabled: !!repoId || !!applicationId,\n });\n\n return {\n topRisksData,\n topRisksDataError,\n topRisksDataLoading,\n };\n}\n"],"names":[],"mappings":";;;AAuBA,MAAM,kBAAkB,OAAO;AAAA,EAC7B,QAAA;AAAA,EACA,MAAA;AAAA,EACA,UAAA;AAAA,EACA,MAAA;AAAA,EACA,SAAA;AAAA,EACA;AACF,CAAA,KAIM;AACJ,EAAA,MAAM,GAAA,GAAM,MAAM,UAAA,CAAW,YAAA,CAAa,WAAW,QAAQ,CAAA;AAC7D,EAAA,MAAM,IAAA,GAAO;AAAA,IACX,GAAI,MAAA,IAAU,EAAE,YAAA,EAAc,MAAA,EAAO;AAAA,IACrC,GAAI,SAAA,IAAa,EAAE,SAAA,EAAU;AAAA,IAC7B,GAAI,aAAA,IAAiB,EAAE,aAAA;AAAc,GACvC;AACA,EAAA,OAAO,MAAM,IAAA,CAAiC,QAAA,EAAU,CAAA,EAAG,GAAG,CAAA,UAAA,CAAA,EAAc;AAAA,IAC1E,MAAA;AAAA,IACA;AAAA,GACD,CAAA;AACH,CAAA;AAEO,SAAS,eAAA,CAAgB;AAAA,EAC9B,QAAA;AAAA,EACA,UAAA;AAAA,EACA,MAAA;AAAA,EACA,SAAA;AAAA,EACA;AACF,CAAA,EAIG;AACD,EAAA,MAAM;AAAA,IACJ,IAAA,EAAM,YAAA;AAAA,IACN,KAAA,EAAO,iBAAA;AAAA,IACP,SAAA,EAAW;AAAA,MACT,QAAA,CAAS;AAAA,IACX,QAAA,EAAU;AAAA,MACR,eAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,MACA;AAAA,KACF;AAAA,IACA,SAAS,CAAC,EAAE,QAAO,KACjB,MAAA,IAAU,gBACN,eAAA,CAAgB;AAAA,MACd,QAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,MACA;AAAA,KACD,CAAA,GACD,OAAA,CAAQ,OAAA,CAAQ,EAAE,CAAA;AAAA,IACxB,OAAA,EAAS,CAAC,CAAC,MAAA,IAAU,CAAC,CAAC;AAAA,GACxB,CAAA;AAED,EAAA,OAAO;AAAA,IACL,YAAA;AAAA,IACA,iBAAA;AAAA,IACA;AAAA,GACF;AACF;;;;"}
@@ -3,7 +3,8 @@ const lightPalette = {
3
3
  critical: "#bc0e4d",
4
4
  high: "#f2405e",
5
5
  medium: "#ffa70f",
6
- low: "#ffe366"
6
+ low: "#ffe366",
7
+ informational: "#769cd6"
7
8
  },
8
9
  riskStatus: {
9
10
  open: "#f2405e",
@@ -86,7 +87,8 @@ const darkPalette = {
86
87
  critical: "#d40f57ff",
87
88
  high: "#f14763ff",
88
89
  medium: "#ffb84d",
89
- low: "#ffe680"
90
+ low: "#ffe680",
91
+ informational: "#769cd6"
90
92
  },
91
93
  riskStatus: {
92
94
  open: "#f2405e",
@@ -189,6 +191,7 @@ const getRiskColors = (theme) => {
189
191
  high: palette.risk.high,
190
192
  medium: palette.risk.medium,
191
193
  low: palette.risk.low,
194
+ informational: palette.risk.informational,
192
195
  autoIgnored: theme.palette.grey[palette.grey.riskAutoIgnored]
193
196
  };
194
197
  };
@@ -1 +1 @@
1
- {"version":3,"file":"themeUtils.esm.js","sources":["../../src/theme/themeUtils.ts"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Theme } from '@mui/material/styles';\n\n/**\n * Valid MUI grey palette keys.\n */\ntype GreyKey =\n | 50\n | 100\n | 200\n | 300\n | 400\n | 500\n | 600\n | 700\n | 800\n | 900\n | 'A100'\n | 'A200'\n | 'A400'\n | 'A700';\n\n/**\n * Light mode color palette for the Apiiro plugin.\n */\nconst lightPalette = {\n risk: {\n critical: '#bc0e4d',\n high: '#f2405e',\n medium: '#ffa70f',\n low: '#ffe366',\n },\n riskStatus: {\n open: '#f2405e',\n accepted: '#00d0b3',\n },\n trend: {\n positive: { line: '#f44336', background: '#fde7eb', text: '#9d0b23' },\n negative: { line: '#2eefd9', background: '#d9fcf8', text: '#09776a' },\n neutral: { line: '#769cd6', background: '#ebf1fa', text: '#012b70' },\n },\n activity: {\n active: '#11e4cb',\n },\n businessImpact: {\n high: '#d32f2f',\n medium: '#f57c00',\n low: '#388e3c',\n },\n gauge: {\n success: '#2eefd9',\n warning: '#f2405e',\n },\n sla: {\n breach: '#f2405e',\n adherence: '#a8c5ff',\n },\n blueVariants: [\n '#012b70',\n '#2e5a9e',\n '#769cd6',\n '#9db9e2',\n '#b3c9e9',\n '#c5d7ef',\n '#d5e2f4',\n '#e1eaf8',\n '#ebf1fa',\n '#f2f6fd',\n '#f7fafe',\n '#f9fbff',\n ],\n avatar: [\n '#1976d2',\n '#388e3c',\n '#f57c00',\n '#7b1fa2',\n '#c62828',\n '#00796b',\n '#5d4037',\n '#455a64',\n ],\n logo: {\n background: '#E6E6E6',\n fill: '#21263F',\n },\n countBadge: {\n background: '#dfe4ff',\n text: '#2b3ba8',\n },\n spinner: '#2eefd9',\n other: '#e2e2e9',\n header: '#21263F',\n // Grey palette indices for light mode\n grey: {\n riskAutoIgnored: 600 as GreyKey,\n riskStatusIgnored: 500 as GreyKey,\n activityInactive: 400 as GreyKey,\n businessImpactDefault: 600 as GreyKey,\n gaugeBackground: 100 as GreyKey,\n slaNotSet: 300 as GreyKey,\n other: 700 as GreyKey,\n searchBackground: 50 as GreyKey,\n searchBorder: 300 as GreyKey,\n searchHoverBorder: 400 as GreyKey,\n codeBackground: 100 as GreyKey,\n codeBorder: 400 as GreyKey,\n },\n};\n\n/**\n * Dark mode color palette for the Apiiro plugin.\n */\nconst darkPalette = {\n risk: {\n critical: '#d40f57ff',\n high: '#f14763ff',\n medium: '#ffb84d',\n low: '#ffe680',\n },\n riskStatus: {\n open: '#f2405e',\n accepted: '#00d0b3',\n },\n trend: {\n positive: {\n line: '#ff7b8f',\n background: 'rgba(244, 67, 54, 0.2)',\n text: '#ffb3bf',\n },\n negative: {\n line: '#4dffd9',\n background: 'rgba(46, 239, 217, 0.2)',\n text: '#80ffe6',\n },\n neutral: {\n line: '#a3c4f3',\n background: 'rgba(118, 156, 214, 0.2)',\n text: '#c4d9f7',\n },\n },\n activity: {\n active: '#4dffd9',\n },\n businessImpact: {\n high: '#ff6b6b',\n medium: '#ffb84d',\n low: '#69db7c',\n },\n gauge: {\n success: '#4dffd9',\n warning: '#ff7b8f',\n },\n sla: {\n breach: '#ff7b8f',\n adherence: '#a3c4f3',\n },\n blueVariants: [\n '#4a7fc7',\n '#5d8fd4',\n '#709fe0',\n '#83afec',\n '#96bff8',\n '#a9cfff',\n '#bcdfff',\n '#cfefff',\n '#e2f5ff',\n '#f0faff',\n '#f7fcff',\n '#fafeff',\n ],\n avatar: [\n '#5c9ce6',\n '#5cb85c',\n '#f5a623',\n '#9b59b6',\n '#e74c3c',\n '#1abc9c',\n '#8b6914',\n '#7f8c8d',\n ],\n countBadge: {\n background: 'rgba(25, 118, 210, 0.2)', // primary.main with 0.2 alpha\n text: '#64b5f6', // primary.light\n },\n logo: {\n background: 'rgba(255, 255, 255, 0.1)', // white with 0.1 alpha\n fill: '#ffffff',\n },\n spinner: '#2eefd9',\n other: '#616161', // grey[700]\n header: '#21263F', // background.paper in dark mode\n // Grey palette indices for dark mode\n grey: {\n riskAutoIgnored: 400 as GreyKey,\n riskStatusIgnored: 400 as GreyKey,\n activityInactive: 500 as GreyKey,\n businessImpactDefault: 400 as GreyKey,\n gaugeBackground: 300 as GreyKey,\n slaNotSet: 600 as GreyKey,\n other: 700 as GreyKey,\n searchBackground: 900 as GreyKey,\n searchBorder: 700 as GreyKey,\n searchHoverBorder: 600 as GreyKey,\n codeBackground: 900 as GreyKey,\n codeBorder: 700 as GreyKey,\n },\n};\n\n/**\n * Gets the appropriate color palette based on theme mode.\n */\nconst getPalette = (theme: Theme) =>\n theme.palette.mode === 'dark' ? darkPalette : lightPalette;\n\n/**\n * Theme-aware semantic colors for risk levels.\n * These colors are designed to work in both light and dark modes.\n */\nexport const getRiskColors = (theme: Theme) => {\n const palette = getPalette(theme);\n return {\n critical: palette.risk.critical,\n high: palette.risk.high,\n medium: palette.risk.medium,\n low: palette.risk.low,\n autoIgnored: theme.palette.grey[palette.grey.riskAutoIgnored],\n };\n};\n\n/**\n * Theme-aware semantic colors for risk status.\n */\nexport const getRiskStatusColors = (theme: Theme) => {\n const palette = getPalette(theme);\n return {\n open: palette.riskStatus.open,\n accepted: palette.riskStatus.accepted,\n ignored: theme.palette.grey[palette.grey.riskStatusIgnored],\n };\n};\n\n/**\n * Theme-aware colors for trend indicators (positive/negative/neutral).\n */\nexport const getTrendColors = (theme: Theme) => {\n const palette = getPalette(theme);\n return {\n positive: palette.trend.positive,\n negative: palette.trend.negative,\n neutral: palette.trend.neutral,\n };\n};\n\n/**\n * Theme-aware colors for activity status indicator.\n */\nexport const getActivityStatusColors = (theme: Theme) => {\n const palette = getPalette(theme);\n return {\n active: palette.activity.active,\n inactive: theme.palette.grey[palette.grey.activityInactive],\n };\n};\n\n/**\n * Theme-aware colors for business impact levels.\n */\nexport const getBusinessImpactColors = (theme: Theme) => {\n const palette = getPalette(theme);\n return {\n high: palette.businessImpact.high,\n medium: palette.businessImpact.medium,\n low: palette.businessImpact.low,\n default: theme.palette.grey[palette.grey.businessImpactDefault],\n };\n};\n\n/**\n * Theme-aware colors for gauge chart.\n */\nexport const getGaugeColors = (theme: Theme) => {\n const palette = getPalette(theme);\n return {\n success: palette.gauge.success,\n warning: palette.gauge.warning,\n background: theme.palette.grey[palette.grey.gaugeBackground],\n pointer: theme.palette.text.primary,\n };\n};\n\n/**\n * Theme-aware colors for SLA adherence chart.\n */\nexport const getSlaColors = (theme: Theme) => {\n const palette = getPalette(theme);\n return {\n breach: palette.sla.breach,\n adherence: palette.sla.adherence,\n notSet: theme.palette.grey[palette.grey.slaNotSet],\n };\n};\n\n/**\n * Theme-aware blue color variants for charts (e.g., TopLanguagesTile).\n */\nexport const getBlueColorVariants = (theme: Theme) => {\n const palette = getPalette(theme);\n return palette.blueVariants;\n};\n\n/**\n * Theme-aware \"other\" color for charts.\n */\nexport const getOtherColor = (theme: Theme) => {\n const palette = getPalette(theme);\n return palette.other || theme.palette.grey[palette.grey.other];\n};\n\n/**\n * Theme-aware colors for logo container.\n */\nexport const getLogoContainerColors = (theme: Theme) => {\n const palette = getPalette(theme);\n return {\n background: palette.logo.background,\n logoFill: palette.logo.fill,\n };\n};\n\n/**\n * Theme-aware colors for avatar backgrounds.\n */\nexport const getAvatarColors = (theme: Theme) => {\n const palette = getPalette(theme);\n return palette.avatar;\n};\n\n/**\n * Theme-aware colors for count badge.\n */\nexport const getCountBadgeColors = (theme: Theme) => {\n const palette = getPalette(theme);\n return {\n background: palette.countBadge.background,\n text: palette.countBadge.text,\n };\n};\n\n/**\n * Theme-aware colors for search toolbar.\n */\nexport const getSearchToolbarColors = (theme: Theme) => {\n const palette = getPalette(theme);\n return {\n iconColor: theme.palette.text.secondary,\n backgroundColor: theme.palette.grey[palette.grey.searchBackground],\n borderColor: theme.palette.grey[palette.grey.searchBorder],\n hoverBorderColor: theme.palette.grey[palette.grey.searchHoverBorder],\n focusBorderColor: theme.palette.primary.main,\n };\n};\n\n/**\n * Theme-aware colors for text (used in typography).\n */\nexport const getTypographyColors = (theme: Theme) => {\n return {\n primary: theme.palette.text.primary,\n secondary: theme.palette.text.secondary,\n disabled: theme.palette.text.disabled,\n };\n};\n\n/**\n * Theme-aware colors for code blocks.\n */\nexport const getCodeBlockColors = (theme: Theme) => {\n const palette = getPalette(theme);\n return {\n background: theme.palette.grey[palette.grey.codeBackground],\n border: theme.palette.grey[palette.grey.codeBorder],\n };\n};\n\n/**\n * Theme-aware spinner color.\n */\nexport const getSpinnerColor = (theme: Theme) => {\n const palette = getPalette(theme);\n return palette.spinner;\n};\n\n/**\n * Theme-aware header background color.\n */\nexport const getHeaderBackground = (theme: Theme) => {\n const palette = getPalette(theme);\n return palette.header || theme.palette.background.paper;\n};\n"],"names":[],"mappings":"AAuCA,MAAM,YAAA,GAAe;AAAA,EACnB,IAAA,EAAM;AAAA,IACJ,QAAA,EAAU,SAAA;AAAA,IACV,IAAA,EAAM,SAAA;AAAA,IACN,MAAA,EAAQ,SAAA;AAAA,IACR,GAAA,EAAK;AAAA,GACP;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM,SAAA;AAAA,IACN,QAAA,EAAU;AAAA,GACZ;AAAA,EACA,KAAA,EAAO;AAAA,IACL,UAAU,EAAE,IAAA,EAAM,WAAW,UAAA,EAAY,SAAA,EAAW,MAAM,SAAA,EAAU;AAAA,IACpE,UAAU,EAAE,IAAA,EAAM,WAAW,UAAA,EAAY,SAAA,EAAW,MAAM,SAAA,EAAU;AAAA,IACpE,SAAS,EAAE,IAAA,EAAM,WAAW,UAAA,EAAY,SAAA,EAAW,MAAM,SAAA;AAAU,GACrE;AAAA,EACA,QAAA,EAAU;AAAA,IACR,MAAA,EAAQ;AAAA,GACV;AAAA,EACA,cAAA,EAAgB;AAAA,IACd,IAAA,EAAM,SAAA;AAAA,IACN,MAAA,EAAQ,SAAA;AAAA,IACR,GAAA,EAAK;AAAA,GACP;AAAA,EACA,KAAA,EAAO;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,OAAO,OAAA,CAAQ,MAAmC;AACpD;;;;"}
1
+ {"version":3,"file":"themeUtils.esm.js","sources":["../../src/theme/themeUtils.ts"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Theme } from '@mui/material/styles';\n\n/**\n * Valid MUI grey palette keys.\n */\ntype GreyKey =\n | 50\n | 100\n | 200\n | 300\n | 400\n | 500\n | 600\n | 700\n | 800\n | 900\n | 'A100'\n | 'A200'\n | 'A400'\n | 'A700';\n\n/**\n * Light mode color palette for the Apiiro plugin.\n */\nconst lightPalette = {\n risk: {\n critical: '#bc0e4d',\n high: '#f2405e',\n medium: '#ffa70f',\n low: '#ffe366',\n informational: '#769cd6',\n },\n riskStatus: {\n open: '#f2405e',\n accepted: '#00d0b3',\n },\n trend: {\n positive: { line: '#f44336', background: '#fde7eb', text: '#9d0b23' },\n negative: { line: '#2eefd9', background: '#d9fcf8', text: '#09776a' },\n neutral: { line: '#769cd6', background: '#ebf1fa', text: '#012b70' },\n },\n activity: {\n active: '#11e4cb',\n },\n businessImpact: {\n high: '#d32f2f',\n medium: '#f57c00',\n low: '#388e3c',\n },\n gauge: {\n success: '#2eefd9',\n warning: '#f2405e',\n },\n sla: {\n breach: '#f2405e',\n adherence: '#a8c5ff',\n },\n blueVariants: [\n '#012b70',\n '#2e5a9e',\n '#769cd6',\n '#9db9e2',\n '#b3c9e9',\n '#c5d7ef',\n '#d5e2f4',\n '#e1eaf8',\n '#ebf1fa',\n '#f2f6fd',\n '#f7fafe',\n '#f9fbff',\n ],\n avatar: [\n '#1976d2',\n '#388e3c',\n '#f57c00',\n '#7b1fa2',\n '#c62828',\n '#00796b',\n '#5d4037',\n '#455a64',\n ],\n logo: {\n background: '#E6E6E6',\n fill: '#21263F',\n },\n countBadge: {\n background: '#dfe4ff',\n text: '#2b3ba8',\n },\n spinner: '#2eefd9',\n other: '#e2e2e9',\n header: '#21263F',\n // Grey palette indices for light mode\n grey: {\n riskAutoIgnored: 600 as GreyKey,\n riskStatusIgnored: 500 as GreyKey,\n activityInactive: 400 as GreyKey,\n businessImpactDefault: 600 as GreyKey,\n gaugeBackground: 100 as GreyKey,\n slaNotSet: 300 as GreyKey,\n other: 700 as GreyKey,\n searchBackground: 50 as GreyKey,\n searchBorder: 300 as GreyKey,\n searchHoverBorder: 400 as GreyKey,\n codeBackground: 100 as GreyKey,\n codeBorder: 400 as GreyKey,\n },\n};\n\n/**\n * Dark mode color palette for the Apiiro plugin.\n */\nconst darkPalette = {\n risk: {\n critical: '#d40f57ff',\n high: '#f14763ff',\n medium: '#ffb84d',\n low: '#ffe680',\n informational: '#769cd6',\n },\n riskStatus: {\n open: '#f2405e',\n accepted: '#00d0b3',\n },\n trend: {\n positive: {\n line: '#ff7b8f',\n background: 'rgba(244, 67, 54, 0.2)',\n text: '#ffb3bf',\n },\n negative: {\n line: '#4dffd9',\n background: 'rgba(46, 239, 217, 0.2)',\n text: '#80ffe6',\n },\n neutral: {\n line: '#a3c4f3',\n background: 'rgba(118, 156, 214, 0.2)',\n text: '#c4d9f7',\n },\n },\n activity: {\n active: '#4dffd9',\n },\n businessImpact: {\n high: '#ff6b6b',\n medium: '#ffb84d',\n low: '#69db7c',\n },\n gauge: {\n success: '#4dffd9',\n warning: '#ff7b8f',\n },\n sla: {\n breach: '#ff7b8f',\n adherence: '#a3c4f3',\n },\n blueVariants: [\n '#4a7fc7',\n '#5d8fd4',\n '#709fe0',\n '#83afec',\n '#96bff8',\n '#a9cfff',\n '#bcdfff',\n '#cfefff',\n '#e2f5ff',\n '#f0faff',\n '#f7fcff',\n '#fafeff',\n ],\n avatar: [\n '#5c9ce6',\n '#5cb85c',\n '#f5a623',\n '#9b59b6',\n '#e74c3c',\n '#1abc9c',\n '#8b6914',\n '#7f8c8d',\n ],\n countBadge: {\n background: 'rgba(25, 118, 210, 0.2)', // primary.main with 0.2 alpha\n text: '#64b5f6', // primary.light\n },\n logo: {\n background: 'rgba(255, 255, 255, 0.1)', // white with 0.1 alpha\n fill: '#ffffff',\n },\n spinner: '#2eefd9',\n other: '#616161', // grey[700]\n header: '#21263F', // background.paper in dark mode\n // Grey palette indices for dark mode\n grey: {\n riskAutoIgnored: 400 as GreyKey,\n riskStatusIgnored: 400 as GreyKey,\n activityInactive: 500 as GreyKey,\n businessImpactDefault: 400 as GreyKey,\n gaugeBackground: 300 as GreyKey,\n slaNotSet: 600 as GreyKey,\n other: 700 as GreyKey,\n searchBackground: 900 as GreyKey,\n searchBorder: 700 as GreyKey,\n searchHoverBorder: 600 as GreyKey,\n codeBackground: 900 as GreyKey,\n codeBorder: 700 as GreyKey,\n },\n};\n\n/**\n * Gets the appropriate color palette based on theme mode.\n */\nconst getPalette = (theme: Theme) =>\n theme.palette.mode === 'dark' ? darkPalette : lightPalette;\n\n/**\n * Theme-aware semantic colors for risk levels.\n * These colors are designed to work in both light and dark modes.\n */\nexport const getRiskColors = (theme: Theme) => {\n const palette = getPalette(theme);\n return {\n critical: palette.risk.critical,\n high: palette.risk.high,\n medium: palette.risk.medium,\n low: palette.risk.low,\n informational: palette.risk.informational,\n autoIgnored: theme.palette.grey[palette.grey.riskAutoIgnored],\n };\n};\n\n/**\n * Theme-aware semantic colors for risk status.\n */\nexport const getRiskStatusColors = (theme: Theme) => {\n const palette = getPalette(theme);\n return {\n open: palette.riskStatus.open,\n accepted: palette.riskStatus.accepted,\n ignored: theme.palette.grey[palette.grey.riskStatusIgnored],\n };\n};\n\n/**\n * Theme-aware colors for trend indicators (positive/negative/neutral).\n */\nexport const getTrendColors = (theme: Theme) => {\n const palette = getPalette(theme);\n return {\n positive: palette.trend.positive,\n negative: palette.trend.negative,\n neutral: palette.trend.neutral,\n };\n};\n\n/**\n * Theme-aware colors for activity status indicator.\n */\nexport const getActivityStatusColors = (theme: Theme) => {\n const palette = getPalette(theme);\n return {\n active: palette.activity.active,\n inactive: theme.palette.grey[palette.grey.activityInactive],\n };\n};\n\n/**\n * Theme-aware colors for business impact levels.\n */\nexport const getBusinessImpactColors = (theme: Theme) => {\n const palette = getPalette(theme);\n return {\n high: palette.businessImpact.high,\n medium: palette.businessImpact.medium,\n low: palette.businessImpact.low,\n default: theme.palette.grey[palette.grey.businessImpactDefault],\n };\n};\n\n/**\n * Theme-aware colors for gauge chart.\n */\nexport const getGaugeColors = (theme: Theme) => {\n const palette = getPalette(theme);\n return {\n success: palette.gauge.success,\n warning: palette.gauge.warning,\n background: theme.palette.grey[palette.grey.gaugeBackground],\n pointer: theme.palette.text.primary,\n };\n};\n\n/**\n * Theme-aware colors for SLA adherence chart.\n */\nexport const getSlaColors = (theme: Theme) => {\n const palette = getPalette(theme);\n return {\n breach: palette.sla.breach,\n adherence: palette.sla.adherence,\n notSet: theme.palette.grey[palette.grey.slaNotSet],\n };\n};\n\n/**\n * Theme-aware blue color variants for charts (e.g., TopLanguagesTile).\n */\nexport const getBlueColorVariants = (theme: Theme) => {\n const palette = getPalette(theme);\n return palette.blueVariants;\n};\n\n/**\n * Theme-aware \"other\" color for charts.\n */\nexport const getOtherColor = (theme: Theme) => {\n const palette = getPalette(theme);\n return palette.other || theme.palette.grey[palette.grey.other];\n};\n\n/**\n * Theme-aware colors for logo container.\n */\nexport const getLogoContainerColors = (theme: Theme) => {\n const palette = getPalette(theme);\n return {\n background: palette.logo.background,\n logoFill: palette.logo.fill,\n };\n};\n\n/**\n * Theme-aware colors for avatar backgrounds.\n */\nexport const getAvatarColors = (theme: Theme) => {\n const palette = getPalette(theme);\n return palette.avatar;\n};\n\n/**\n * Theme-aware colors for count badge.\n */\nexport const getCountBadgeColors = (theme: Theme) => {\n const palette = getPalette(theme);\n return {\n background: palette.countBadge.background,\n text: palette.countBadge.text,\n };\n};\n\n/**\n * Theme-aware colors for search toolbar.\n */\nexport const getSearchToolbarColors = (theme: Theme) => {\n const palette = getPalette(theme);\n return {\n iconColor: theme.palette.text.secondary,\n backgroundColor: theme.palette.grey[palette.grey.searchBackground],\n borderColor: theme.palette.grey[palette.grey.searchBorder],\n hoverBorderColor: theme.palette.grey[palette.grey.searchHoverBorder],\n focusBorderColor: theme.palette.primary.main,\n };\n};\n\n/**\n * Theme-aware colors for text (used in typography).\n */\nexport const getTypographyColors = (theme: Theme) => {\n return {\n primary: theme.palette.text.primary,\n secondary: theme.palette.text.secondary,\n disabled: theme.palette.text.disabled,\n };\n};\n\n/**\n * Theme-aware colors for code blocks.\n */\nexport const getCodeBlockColors = (theme: Theme) => {\n const palette = getPalette(theme);\n return {\n background: theme.palette.grey[palette.grey.codeBackground],\n border: theme.palette.grey[palette.grey.codeBorder],\n };\n};\n\n/**\n * Theme-aware spinner color.\n */\nexport const getSpinnerColor = (theme: Theme) => {\n const palette = getPalette(theme);\n return palette.spinner;\n};\n\n/**\n * Theme-aware header background color.\n */\nexport const getHeaderBackground = (theme: Theme) => {\n const palette = getPalette(theme);\n return palette.header || theme.palette.background.paper;\n};\n"],"names":[],"mappings":"AAuCA,MAAM,YAAA,GAAe;AAAA,EACnB,IAAA,EAAM;AAAA,IACJ,QAAA,EAAU,SAAA;AAAA,IACV,IAAA,EAAM,SAAA;AAAA,IACN,MAAA,EAAQ,SAAA;AAAA,IACR,GAAA,EAAK,SAAA;AAAA,IACL,aAAA,EAAe;AAAA,GACjB;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM,SAAA;AAAA,IACN,QAAA,EAAU;AAAA,GACZ;AAAA,EACA,KAAA,EAAO;AAAA,IACL,UAAU,EAAE,IAAA,EAAM,WAAW,UAAA,EAAY,SAAA,EAAW,MAAM,SAAA,EAAU;AAAA,IACpE,UAAU,EAAE,IAAA,EAAM,WAAW,UAAA,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BAAkB,KAAA,CAAM,OAAA,CAAQ,IAAA,CAAK,OAAA,CAAQ,KAAK,iBAAiB,CAAA;AAAA,IACnE,gBAAA,EAAkB,KAAA,CAAM,OAAA,CAAQ,OAAA,CAAQ;AAAA,GAC1C;AACF;AA2BO,MAAM,eAAA,GAAkB,CAAC,KAAA,KAAiB;AAC/C,EAAA,MAAM,OAAA,GAAU,WAAW,KAAK,CAAA;AAChC,EAAA,OAAO,OAAA,CAAQ,OAAA;AACjB;AAKO,MAAM,mBAAA,GAAsB,CAAC,KAAA,KAAiB;AACnD,EAAA,MAAM,OAAA,GAAU,WAAW,KAAK,CAAA;AAChC,EAAA,OAAO,OAAA,CAAQ,MAAmC;AACpD;;;;"}
@@ -2,7 +2,7 @@ import { GitHub } from '@mui/icons-material';
2
2
  import { Azure } from '../assets/providerIcons/Azure.esm.js';
3
3
  import { Bitbucket } from '../assets/providerIcons/Bitbucket.esm.js';
4
4
  import { Gitlab } from '../assets/providerIcons/Gitlab.esm.js';
5
- import { APIIRO_PROJECT_ANNOTATION, APIIRO_METRICS_VIEW_ANNOTATION } from '@backstage-community/plugin-apiiro-common';
5
+ import { APIIRO_PROJECT_ANNOTATION, APIIRO_APPLICATION_ANNOTATION, APIIRO_METRICS_VIEW_ANNOTATION } from '@backstage-community/plugin-apiiro-common';
6
6
 
7
7
  const scmProviderIcons = {
8
8
  AzureDevops: Azure,
@@ -15,6 +15,7 @@ const scmProviderIcons = {
15
15
  GitlabServer: Gitlab
16
16
  };
17
17
  const isApiiroRepoAvailable = (entity) => Boolean(entity.metadata.annotations?.[APIIRO_PROJECT_ANNOTATION]);
18
+ const isApiiroApplicationAvailable = (entity) => Boolean(entity.metadata.annotations?.[APIIRO_APPLICATION_ANNOTATION]);
18
19
  const isApiiroMetricViewAvailable = (entity) => {
19
20
  const metricViewAnnotation = entity.metadata.annotations?.[APIIRO_METRICS_VIEW_ANNOTATION];
20
21
  if (metricViewAnnotation === void 0) {
@@ -23,5 +24,5 @@ const isApiiroMetricViewAvailable = (entity) => {
23
24
  return metricViewAnnotation.toLocaleLowerCase() === "true";
24
25
  };
25
26
 
26
- export { isApiiroMetricViewAvailable, isApiiroRepoAvailable, scmProviderIcons };
27
+ export { isApiiroApplicationAvailable, isApiiroMetricViewAvailable, isApiiroRepoAvailable, scmProviderIcons };
27
28
  //# sourceMappingURL=utils.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.esm.js","sources":["../../src/utils/utils.ts"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { GitHub } from '@mui/icons-material';\nimport { Azure } from '../assets/providerIcons/Azure';\nimport { Bitbucket } from '../assets/providerIcons/Bitbucket';\nimport { Gitlab } from '../assets/providerIcons/Gitlab';\nimport type { Entity } from '@backstage/catalog-model';\nimport {\n APIIRO_PROJECT_ANNOTATION,\n APIIRO_METRICS_VIEW_ANNOTATION,\n} from '@backstage-community/plugin-apiiro-common';\n\nexport const scmProviderIcons: Record<string, any> = {\n AzureDevops: Azure,\n AzureDevopsServer: Azure,\n BitbucketCloud: Bitbucket,\n BitbucketServer: Bitbucket,\n Github: GitHub,\n GithubEnterprise: GitHub,\n Gitlab: Gitlab,\n GitlabServer: Gitlab,\n};\n\n/**\n * @public\n * Checks if the entity has the APIIRO project annotation.\n */\nexport const isApiiroRepoAvailable = (entity: Entity) =>\n Boolean(entity.metadata.annotations?.[APIIRO_PROJECT_ANNOTATION]);\n\n/**\n * Checks if the entity has the APIIRO project annotation.\n */\nexport const isApiiroMetricViewAvailable = (entity: Entity) => {\n const metricViewAnnotation =\n entity.metadata.annotations?.[APIIRO_METRICS_VIEW_ANNOTATION];\n\n if (metricViewAnnotation === undefined) {\n return undefined;\n }\n\n return metricViewAnnotation.toLocaleLowerCase() === 'true';\n};\n"],"names":[],"mappings":";;;;;;AAyBO,MAAM,gBAAA,GAAwC;AAAA,EACnD,WAAA,EAAa,KAAA;AAAA,EACb,iBAAA,EAAmB,KAAA;AAAA,EACnB,cAAA,EAAgB,SAAA;AAAA,EAChB,eAAA,EAAiB,SAAA;AAAA,EACjB,MAAA,EAAQ,MAAA;AAAA,EACR,gBAAA,EAAkB,MAAA;AAAA,EAClB,MAAA;AAAA,EACA,YAAA,EAAc;AAChB;AAMO,MAAM,qBAAA,GAAwB,CAAC,MAAA,KACpC,OAAA,CAAQ,OAAO,QAAA,CAAS,WAAA,GAAc,yBAAyB,CAAC;AAK3D,MAAM,2BAAA,GAA8B,CAAC,MAAA,KAAmB;AAC7D,EAAA,MAAM,oBAAA,GACJ,MAAA,CAAO,QAAA,CAAS,WAAA,GAAc,8BAA8B,CAAA;AAE9D,EAAA,IAAI,yBAAyB,MAAA,EAAW;AACtC,IAAA,OAAO,MAAA;AAAA,EACT;AAEA,EAAA,OAAO,oBAAA,CAAqB,mBAAkB,KAAM,MAAA;AACtD;;;;"}
1
+ {"version":3,"file":"utils.esm.js","sources":["../../src/utils/utils.ts"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { GitHub } from '@mui/icons-material';\nimport { Azure } from '../assets/providerIcons/Azure';\nimport { Bitbucket } from '../assets/providerIcons/Bitbucket';\nimport { Gitlab } from '../assets/providerIcons/Gitlab';\nimport type { Entity } from '@backstage/catalog-model';\nimport {\n APIIRO_PROJECT_ANNOTATION,\n APIIRO_METRICS_VIEW_ANNOTATION,\n APIIRO_APPLICATION_ANNOTATION,\n} from '@backstage-community/plugin-apiiro-common';\n\nexport const scmProviderIcons: Record<string, any> = {\n AzureDevops: Azure,\n AzureDevopsServer: Azure,\n BitbucketCloud: Bitbucket,\n BitbucketServer: Bitbucket,\n Github: GitHub,\n GithubEnterprise: GitHub,\n Gitlab: Gitlab,\n GitlabServer: Gitlab,\n};\n\n/**\n * @public\n * Checks if the entity has the APIIRO project annotation.\n */\nexport const isApiiroRepoAvailable = (entity: Entity) =>\n Boolean(entity.metadata.annotations?.[APIIRO_PROJECT_ANNOTATION]);\n\n/**\n * @public\n * Checks if the entity has the APIIRO application annotation.\n */\nexport const isApiiroApplicationAvailable = (entity: Entity) =>\n Boolean(entity.metadata.annotations?.[APIIRO_APPLICATION_ANNOTATION]);\n\n/**\n * @public\n * Checks if the entity has the APIIRO metrics view annotation.\n */\nexport const isApiiroMetricViewAvailable = (entity: Entity) => {\n const metricViewAnnotation =\n entity.metadata.annotations?.[APIIRO_METRICS_VIEW_ANNOTATION];\n\n if (metricViewAnnotation === undefined) {\n return undefined;\n }\n\n return metricViewAnnotation.toLocaleLowerCase() === 'true';\n};\n"],"names":[],"mappings":";;;;;;AA0BO,MAAM,gBAAA,GAAwC;AAAA,EACnD,WAAA,EAAa,KAAA;AAAA,EACb,iBAAA,EAAmB,KAAA;AAAA,EACnB,cAAA,EAAgB,SAAA;AAAA,EAChB,eAAA,EAAiB,SAAA;AAAA,EACjB,MAAA,EAAQ,MAAA;AAAA,EACR,gBAAA,EAAkB,MAAA;AAAA,EAClB,MAAA;AAAA,EACA,YAAA,EAAc;AAChB;AAMO,MAAM,qBAAA,GAAwB,CAAC,MAAA,KACpC,OAAA,CAAQ,OAAO,QAAA,CAAS,WAAA,GAAc,yBAAyB,CAAC;AAM3D,MAAM,4BAAA,GAA+B,CAAC,MAAA,KAC3C,OAAA,CAAQ,OAAO,QAAA,CAAS,WAAA,GAAc,6BAA6B,CAAC;AAM/D,MAAM,2BAAA,GAA8B,CAAC,MAAA,KAAmB;AAC7D,EAAA,MAAM,oBAAA,GACJ,MAAA,CAAO,QAAA,CAAS,WAAA,GAAc,8BAA8B,CAAA;AAE9D,EAAA,IAAI,yBAAyB,MAAA,EAAW;AACtC,IAAA,OAAO,MAAA;AAAA,EACT;AAEA,EAAA,OAAO,oBAAA,CAAqB,mBAAkB,KAAM,MAAA;AACtD;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage-community/plugin-apiiro",
3
- "version": "0.1.0",
3
+ "version": "1.0.0",
4
4
  "license": "Apache-2.0",
5
5
  "main": "dist/index.esm.js",
6
6
  "types": "dist/index.d.ts",
@@ -34,12 +34,12 @@
34
34
  "postpack": "backstage-cli package postpack"
35
35
  },
36
36
  "dependencies": {
37
- "@backstage-community/plugin-apiiro-common": "^0.1.0",
38
- "@backstage/catalog-model": "^1.7.5",
39
- "@backstage/core-components": "^0.18.2",
40
- "@backstage/core-plugin-api": "^1.11.1",
41
- "@backstage/plugin-catalog-react": "^1.21.2",
42
- "@backstage/theme": "^0.7.0",
37
+ "@backstage-community/plugin-apiiro-common": "^1.0.0",
38
+ "@backstage/catalog-model": "^1.7.6",
39
+ "@backstage/core-components": "^0.18.7",
40
+ "@backstage/core-plugin-api": "^1.12.3",
41
+ "@backstage/plugin-catalog-react": "^2.0.0",
42
+ "@backstage/theme": "^0.7.2",
43
43
  "@mui/icons-material": "^6.5.0",
44
44
  "@mui/material": "^5.18.0",
45
45
  "@mui/x-charts": "^7.29.1",
@@ -56,11 +56,11 @@
56
56
  "react-router-dom": "^6.30.1"
57
57
  },
58
58
  "devDependencies": {
59
- "@backstage/cli": "^0.34.4",
60
- "@backstage/core-app-api": "^1.19.1",
61
- "@backstage/dev-utils": "^1.1.15",
62
- "@backstage/plugin-catalog": "^1.31.4",
63
- "@backstage/test-utils": "^1.7.12",
59
+ "@backstage/cli": "^0.35.4",
60
+ "@backstage/core-app-api": "^1.19.5",
61
+ "@backstage/dev-utils": "^1.1.20",
62
+ "@backstage/plugin-catalog": "^1.33.0",
63
+ "@backstage/test-utils": "^1.7.15",
64
64
  "@tanstack/eslint-plugin-query": "^5.91.0",
65
65
  "@testing-library/jest-dom": "^6.0.0",
66
66
  "@testing-library/react": "^14.0.0",
@@ -1,147 +0,0 @@
1
- import { jsx, jsxs } from 'react/jsx-runtime';
2
- import { Content } from '@backstage/core-components';
3
- import { TabMetricsGroup } from '../../components/MetricsGroup/TabMetricsGroup.esm.js';
4
- import { useApi, fetchApiRef } from '@backstage/core-plugin-api';
5
- import { apiiroApiRef } from '../../api/index.esm.js';
6
- import { useRepositoriesData } from '../../queries/repository.queries.esm.js';
7
- import '@tanstack/react-query';
8
- import { useEntity } from '@backstage/plugin-catalog-react';
9
- import '../../components/common/ChartBox.esm.js';
10
- import 'react';
11
- import 'react-dom';
12
- import { styled, useTheme } from '@mui/material/styles';
13
- import { NotFound } from '../../components/common/NotFound.esm.js';
14
- import { SomethingWentWrong } from '../../components/common/SomethingWentWrong.esm.js';
15
- import Box from '@mui/material/Box';
16
- import { LogoSpinner } from '../../components/common/logoSpinner.esm.js';
17
- import { ApiiroLogo } from '../../assets/apiiroLogo/apiiroLogo.esm.js';
18
- import '@mui/material/SvgIcon';
19
- import { Risks } from '../Risks/Risks.esm.js';
20
- import { APIIRO_PROJECT_ANNOTATION } from '@backstage-community/plugin-apiiro-common';
21
- import { getLogoContainerColors } from '../../theme/themeUtils.esm.js';
22
- import { stringifyEntityRef } from '@backstage/catalog-model';
23
-
24
- const LogoContainer = styled(Box)(({ theme }) => {
25
- const logoColors = getLogoContainerColors(theme);
26
- return {
27
- display: "flex",
28
- flexDirection: "row",
29
- justifyContent: "center",
30
- alignItems: "center",
31
- padding: "12px 15px",
32
- gap: "10px",
33
- width: "109px",
34
- height: "40px",
35
- background: logoColors.background,
36
- borderRadius: "10px",
37
- "& svg": {
38
- width: "79px",
39
- height: "22px",
40
- "& path": {
41
- fill: logoColors.logoFill
42
- }
43
- }
44
- };
45
- });
46
- const Tab = () => {
47
- const theme = useTheme();
48
- const connectBackendApi = useApi(apiiroApiRef);
49
- const { fetch } = useApi(fetchApiRef);
50
- const { entity } = useEntity();
51
- const repoId = entity?.metadata?.annotations?.[APIIRO_PROJECT_ANNOTATION] || void 0;
52
- const entityRef = stringifyEntityRef(entity);
53
- const { repositoriesData, repositoriesDataLoading, repositoriesDataError } = useRepositoriesData({
54
- connectApi: connectBackendApi,
55
- fetchApi: fetch,
56
- enabled: true,
57
- repositoryKey: repoId,
58
- entityRef
59
- });
60
- if (repositoriesDataLoading) {
61
- return /* @__PURE__ */ jsx(Content, { children: /* @__PURE__ */ jsx(
62
- Box,
63
- {
64
- display: "flex",
65
- justifyContent: "center",
66
- alignItems: "center",
67
- minHeight: "300px",
68
- children: /* @__PURE__ */ jsx(LogoSpinner, {})
69
- }
70
- ) });
71
- }
72
- if (repositoriesDataError) {
73
- return /* @__PURE__ */ jsx(Content, { children: /* @__PURE__ */ jsxs(
74
- Box,
75
- {
76
- display: "flex",
77
- justifyContent: "center",
78
- alignItems: "center",
79
- flexDirection: "column",
80
- minHeight: "300px",
81
- sx: {
82
- border: `1px solid ${theme.palette.divider}`,
83
- borderRadius: "12px",
84
- backgroundColor: theme.palette.background.paper,
85
- boxShadow: theme.shadows[1]
86
- },
87
- children: [
88
- /* @__PURE__ */ jsx(LogoContainer, { sx: { alignSelf: "flex-end" }, children: /* @__PURE__ */ jsx(ApiiroLogo, {}) }),
89
- /* @__PURE__ */ jsx(
90
- SomethingWentWrong,
91
- {
92
- statusCode: repositoriesDataError?.details?.status
93
- }
94
- )
95
- ]
96
- }
97
- ) });
98
- }
99
- const repositories = repositoriesData?.repositories;
100
- if (!repositories || repositories.length === 0) {
101
- return /* @__PURE__ */ jsx(Content, { children: /* @__PURE__ */ jsxs(
102
- Box,
103
- {
104
- display: "flex",
105
- justifyContent: "flex-start",
106
- alignItems: "center",
107
- flexDirection: "column",
108
- minHeight: "300px",
109
- sx: {
110
- border: `1px solid ${theme.palette.divider}`,
111
- borderRadius: "12px",
112
- backgroundColor: theme.palette.background.paper,
113
- boxShadow: theme.shadows[1]
114
- },
115
- children: [
116
- /* @__PURE__ */ jsx(LogoContainer, { sx: { alignSelf: "flex-end" }, children: /* @__PURE__ */ jsx(ApiiroLogo, {}) }),
117
- /* @__PURE__ */ jsx(
118
- Box,
119
- {
120
- display: "flex",
121
- justifyContent: "center",
122
- alignItems: "center",
123
- minHeight: "250px",
124
- children: /* @__PURE__ */ jsx(NotFound, { message: "Results for this repository are either unavailable on Apiiro or cannot be accessed." })
125
- }
126
- )
127
- ]
128
- }
129
- ) });
130
- }
131
- const repositoryData = repositories[0];
132
- return /* @__PURE__ */ jsxs(Content, { children: [
133
- /* @__PURE__ */ jsx(
134
- TabMetricsGroup,
135
- {
136
- repositoryData,
137
- entity,
138
- repoId,
139
- entityRef
140
- }
141
- ),
142
- /* @__PURE__ */ jsx(Risks, { repoId, entityRef })
143
- ] });
144
- };
145
-
146
- export { Tab };
147
- //# sourceMappingURL=Tab.esm.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Tab.esm.js","sources":["../../../src/pages/tab/Tab.tsx"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Content } from '@backstage/core-components';\nimport { TabMetricsGroup } from '../../components/MetricsGroup';\nimport { useApi } from '@backstage/core-plugin-api';\nimport { apiiroApiRef } from '../../api';\nimport { fetchApiRef } from '@backstage/core-plugin-api';\nimport { useRepositoriesData } from '../../queries';\nimport { useEntity } from '@backstage/plugin-catalog-react';\nimport { NotFound, SomethingWentWrong } from '../../components/common';\nimport Box from '@mui/material/Box';\nimport { LogoSpinner } from '../../components/common/logoSpinner';\nimport { styled, useTheme } from '@mui/material/styles';\nimport { ApiiroLogo } from '../../assets/apiiroLogo';\nimport { Risks } from '../Risks';\nimport { APIIRO_PROJECT_ANNOTATION } from '@backstage-community/plugin-apiiro-common';\nimport { getLogoContainerColors } from '../../theme/themeUtils';\nimport { stringifyEntityRef } from '@backstage/catalog-model';\n\nconst LogoContainer = styled(Box)(({ theme }) => {\n const logoColors = getLogoContainerColors(theme);\n return {\n display: 'flex',\n flexDirection: 'row',\n justifyContent: 'center',\n alignItems: 'center',\n padding: '12px 15px',\n gap: '10px',\n width: '109px',\n height: '40px',\n background: logoColors.background,\n borderRadius: '10px',\n '& svg': {\n width: '79px',\n height: '22px',\n '& path': {\n fill: logoColors.logoFill,\n },\n },\n };\n});\n\nexport const Tab = () => {\n const theme = useTheme();\n const connectBackendApi = useApi(apiiroApiRef);\n const { fetch } = useApi(fetchApiRef);\n const { entity } = useEntity();\n const repoId =\n entity?.metadata?.annotations?.[APIIRO_PROJECT_ANNOTATION] || undefined;\n const entityRef = stringifyEntityRef(entity);\n\n const { repositoriesData, repositoriesDataLoading, repositoriesDataError } =\n useRepositoriesData({\n connectApi: connectBackendApi,\n fetchApi: fetch,\n enabled: true,\n repositoryKey: repoId,\n entityRef: entityRef,\n });\n\n if (repositoriesDataLoading) {\n return (\n <Content>\n <Box\n display=\"flex\"\n justifyContent=\"center\"\n alignItems=\"center\"\n minHeight=\"300px\"\n >\n <LogoSpinner />\n </Box>\n </Content>\n );\n }\n\n if (repositoriesDataError) {\n return (\n <Content>\n <Box\n display=\"flex\"\n justifyContent=\"center\"\n alignItems=\"center\"\n flexDirection=\"column\"\n minHeight=\"300px\"\n sx={{\n border: `1px solid ${theme.palette.divider}`,\n borderRadius: '12px',\n backgroundColor: theme.palette.background.paper,\n boxShadow: theme.shadows[1],\n }}\n >\n <LogoContainer sx={{ alignSelf: 'flex-end' }}>\n <ApiiroLogo />\n </LogoContainer>\n <SomethingWentWrong\n statusCode={repositoriesDataError?.details?.status}\n />\n </Box>\n </Content>\n );\n }\n\n const repositories = repositoriesData?.repositories;\n\n if (!repositories || repositories.length === 0) {\n return (\n <Content>\n <Box\n display=\"flex\"\n justifyContent=\"flex-start\"\n alignItems=\"center\"\n flexDirection=\"column\"\n minHeight=\"300px\"\n sx={{\n border: `1px solid ${theme.palette.divider}`,\n borderRadius: '12px',\n backgroundColor: theme.palette.background.paper,\n boxShadow: theme.shadows[1],\n }}\n >\n <LogoContainer sx={{ alignSelf: 'flex-end' }}>\n <ApiiroLogo />\n </LogoContainer>\n <Box\n display=\"flex\"\n justifyContent=\"center\"\n alignItems=\"center\"\n minHeight=\"250px\"\n >\n <NotFound message=\"Results for this repository are either unavailable on Apiiro or cannot be accessed.\" />\n </Box>\n </Box>\n </Content>\n );\n }\n\n const repositoryData = repositories[0];\n return (\n <Content>\n <TabMetricsGroup\n repositoryData={repositoryData}\n entity={entity}\n repoId={repoId!}\n entityRef={entityRef}\n />\n <Risks repoId={repoId!} entityRef={entityRef} />\n </Content>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAgCA,MAAM,gBAAgB,MAAA,CAAO,GAAG,EAAE,CAAC,EAAE,OAAM,KAAM;AAC/C,EAAA,MAAM,UAAA,GAAa,uBAAuB,KAAK,CAAA;AAC/C,EAAA,OAAO;AAAA,IACL,OAAA,EAAS,MAAA;AAAA,IACT,aAAA,EAAe,KAAA;AAAA,IACf,cAAA,EAAgB,QAAA;AAAA,IAChB,UAAA,EAAY,QAAA;AAAA,IACZ,OAAA,EAAS,WAAA;AAAA,IACT,GAAA,EAAK,MAAA;AAAA,IACL,KAAA,EAAO,OAAA;AAAA,IACP,MAAA,EAAQ,MAAA;AAAA,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C,YAAA,EAAc,MAAA;AAAA,UACd,eAAA,EAAiB,KAAA,CAAM,OAAA,CAAQ,UAAA,CAAW,KAAA;AAAA,UAC1C,SAAA,EAAW,KAAA,CAAM,OAAA,CAAQ,CAAC;AAAA,SAC5B;AAAA,QAEA,QAAA,EAAA;AAAA,0BAAA,GAAA,CAAC,aAAA,EAAA,EAAc,IAAI,EAAE,SAAA,EAAW,YAAW,EACzC,QAAA,kBAAA,GAAA,CAAC,cAAW,CAAA,EACd,CAAA;AAAA,0BACA,GAAA;AAAA,YAAC,GAAA;AAAA,YAAA;AAAA,cACC,OAAA,EAAQ,MAAA;AAAA,cACR,cAAA,EAAe,QAAA;AAAA,cACf,UAAA,EAAW,QAAA;AAAA,cACX,SAAA,EAAU,OAAA;AAAA,cAEV,QAAA,kBAAA,GAAA,CAAC,QAAA,EAAA,EAAS,OAAA,EAAQ,qFAAA,EAAsF;AAAA;AAAA;AAC1G;AAAA;AAAA,KACF,EACF,CAAA;AAAA,EAEJ;AAEA,EAAA,MAAM,cAAA,GAAiB,aAAa,CAAC,CAAA;AACrC,EAAA,4BACG,OAAA,EAAA,EACC,QAAA,EAAA;AAAA,oBAAA,GAAA;AAAA,MAAC,eAAA;AAAA,MAAA;AAAA,QACC,cAAA;AAAA,QACA,MAAA;AAAA,QACA,MAAA;AAAA,QACA;AAAA;AAAA,KACF;AAAA,oBACA,GAAA,CAAC,KAAA,EAAA,EAAM,MAAA,EAAiB,SAAA,EAAsB;AAAA,GAAA,EAChD,CAAA;AAEJ;;;;"}
@@ -1,161 +0,0 @@
1
- import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
2
- import { useApi, fetchApiRef } from '@backstage/core-plugin-api';
3
- import { apiiroApiRef } from '../../api/index.esm.js';
4
- import { useRepositoriesData } from '../../queries/repository.queries.esm.js';
5
- import '@tanstack/react-query';
6
- import { useEntity } from '@backstage/plugin-catalog-react';
7
- import { WidgetMetricsGroup } from '../../components/MetricsGroup/WidgetMetricsGroup.esm.js';
8
- import '../../components/common/ChartBox.esm.js';
9
- import 'react';
10
- import 'react-dom';
11
- import { styled, useTheme } from '@mui/material/styles';
12
- import { NotFound } from '../../components/common/NotFound.esm.js';
13
- import { SomethingWentWrong } from '../../components/common/SomethingWentWrong.esm.js';
14
- import { LogoSpinner } from '../../components/common/logoSpinner.esm.js';
15
- import Box from '@mui/material/Box';
16
- import { ApiiroLogo } from '../../assets/apiiroLogo/apiiroLogo.esm.js';
17
- import '@mui/material/SvgIcon';
18
- import { APIIRO_PROJECT_ANNOTATION } from '@backstage-community/plugin-apiiro-common';
19
- import { getLogoContainerColors } from '../../theme/themeUtils.esm.js';
20
- import { stringifyEntityRef } from '@backstage/catalog-model';
21
-
22
- const LogoContainer = styled(Box)(({ theme }) => {
23
- const logoColors = getLogoContainerColors(theme);
24
- return {
25
- display: "flex",
26
- flexDirection: "row",
27
- justifyContent: "center",
28
- alignItems: "center",
29
- padding: "12px 15px",
30
- gap: "10px",
31
- width: "109px",
32
- height: "40px",
33
- background: logoColors.background,
34
- borderRadius: "10px",
35
- "& svg": {
36
- width: "79px",
37
- height: "22px",
38
- "& path": {
39
- fill: logoColors.logoFill
40
- }
41
- }
42
- };
43
- });
44
- const Widget = () => {
45
- const theme = useTheme();
46
- const connectBackendApi = useApi(apiiroApiRef);
47
- const { fetch } = useApi(fetchApiRef);
48
- const { entity } = useEntity();
49
- const repoId = entity?.metadata?.annotations?.[APIIRO_PROJECT_ANNOTATION] || void 0;
50
- const entityRef = stringifyEntityRef(entity);
51
- const { repositoriesData, repositoriesDataLoading, repositoriesDataError } = useRepositoriesData({
52
- fetchApi: fetch,
53
- connectApi: connectBackendApi,
54
- enabled: true,
55
- repositoryKey: repoId,
56
- entityRef
57
- });
58
- if (repositoriesDataLoading) {
59
- return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs(
60
- Box,
61
- {
62
- display: "flex",
63
- justifyContent: "flex-start",
64
- alignItems: "center",
65
- flexDirection: "column",
66
- minHeight: "300px",
67
- sx: {
68
- border: `1px solid ${theme.palette.divider}`,
69
- borderRadius: "12px",
70
- backgroundColor: theme.palette.background.paper,
71
- boxShadow: theme.shadows[1]
72
- },
73
- children: [
74
- /* @__PURE__ */ jsx(LogoContainer, { sx: { alignSelf: "flex-end" }, children: /* @__PURE__ */ jsx(ApiiroLogo, {}) }),
75
- /* @__PURE__ */ jsx(
76
- Box,
77
- {
78
- display: "flex",
79
- justifyContent: "center",
80
- alignItems: "center",
81
- minHeight: "250px",
82
- children: /* @__PURE__ */ jsx(LogoSpinner, {})
83
- }
84
- )
85
- ]
86
- }
87
- ) });
88
- }
89
- if (repositoriesDataError) {
90
- return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs(
91
- Box,
92
- {
93
- display: "flex",
94
- justifyContent: "center",
95
- alignItems: "center",
96
- flexDirection: "column",
97
- minHeight: "300px",
98
- sx: {
99
- border: `1px solid ${theme.palette.divider}`,
100
- borderRadius: "12px",
101
- backgroundColor: theme.palette.background.paper,
102
- boxShadow: theme.shadows[1]
103
- },
104
- children: [
105
- /* @__PURE__ */ jsx(LogoContainer, { sx: { alignSelf: "flex-end" }, children: /* @__PURE__ */ jsx(ApiiroLogo, {}) }),
106
- /* @__PURE__ */ jsx(
107
- SomethingWentWrong,
108
- {
109
- statusCode: repositoriesDataError?.details?.status
110
- }
111
- )
112
- ]
113
- }
114
- ) });
115
- }
116
- const repositories = repositoriesData?.repositories;
117
- if (!repositories || repositories.length === 0) {
118
- return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs(
119
- Box,
120
- {
121
- display: "flex",
122
- justifyContent: "flex-start",
123
- alignItems: "center",
124
- flexDirection: "column",
125
- minHeight: "300px",
126
- sx: {
127
- border: `1px solid ${theme.palette.divider}`,
128
- borderRadius: "12px",
129
- backgroundColor: theme.palette.background.paper,
130
- boxShadow: theme.shadows[1]
131
- },
132
- children: [
133
- /* @__PURE__ */ jsx(LogoContainer, { sx: { alignSelf: "flex-end" }, children: /* @__PURE__ */ jsx(ApiiroLogo, {}) }),
134
- /* @__PURE__ */ jsx(
135
- Box,
136
- {
137
- display: "flex",
138
- justifyContent: "center",
139
- alignItems: "center",
140
- minHeight: "250px",
141
- children: /* @__PURE__ */ jsx(NotFound, { message: "Results for this repository are either unavailable on Apiiro or cannot be accessed." })
142
- }
143
- )
144
- ]
145
- }
146
- ) });
147
- }
148
- const repositoryData = repositories[0];
149
- return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(
150
- WidgetMetricsGroup,
151
- {
152
- repositoryData,
153
- repoId,
154
- entityRef,
155
- entity
156
- }
157
- ) });
158
- };
159
-
160
- export { Widget };
161
- //# sourceMappingURL=Widget.esm.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Widget.esm.js","sources":["../../../src/pages/widget/Widget.tsx"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { useApi } from '@backstage/core-plugin-api';\nimport { apiiroApiRef } from '../../api';\nimport { fetchApiRef } from '@backstage/core-plugin-api';\nimport { useRepositoriesData } from '../../queries';\nimport { useEntity } from '@backstage/plugin-catalog-react';\nimport { WidgetMetricsGroup } from '../../components/MetricsGroup/WidgetMetricsGroup';\nimport { NotFound, SomethingWentWrong } from '../../components/common';\nimport { LogoSpinner } from '../../components/common/logoSpinner';\nimport Box from '@mui/material/Box';\nimport { styled, useTheme } from '@mui/material/styles';\nimport { ApiiroLogo } from '../../assets/apiiroLogo';\nimport { APIIRO_PROJECT_ANNOTATION } from '@backstage-community/plugin-apiiro-common';\nimport { getLogoContainerColors } from '../../theme/themeUtils';\nimport { stringifyEntityRef } from '@backstage/catalog-model';\n\nconst LogoContainer = styled(Box)(({ theme }) => {\n const logoColors = getLogoContainerColors(theme);\n return {\n display: 'flex',\n flexDirection: 'row',\n justifyContent: 'center',\n alignItems: 'center',\n padding: '12px 15px',\n gap: '10px',\n width: '109px',\n height: '40px',\n background: logoColors.background,\n borderRadius: '10px',\n '& svg': {\n width: '79px',\n height: '22px',\n '& path': {\n fill: logoColors.logoFill,\n },\n },\n };\n});\n\nexport const Widget = () => {\n const theme = useTheme();\n const connectBackendApi = useApi(apiiroApiRef);\n const { fetch } = useApi(fetchApiRef);\n const { entity } = useEntity();\n const repoId =\n entity?.metadata?.annotations?.[APIIRO_PROJECT_ANNOTATION] || undefined;\n const entityRef = stringifyEntityRef(entity);\n\n const { repositoriesData, repositoriesDataLoading, repositoriesDataError } =\n useRepositoriesData({\n fetchApi: fetch,\n connectApi: connectBackendApi,\n enabled: true,\n repositoryKey: repoId,\n entityRef,\n });\n\n if (repositoriesDataLoading) {\n return (\n <>\n <Box\n display=\"flex\"\n justifyContent=\"flex-start\"\n alignItems=\"center\"\n flexDirection=\"column\"\n minHeight=\"300px\"\n sx={{\n border: `1px solid ${theme.palette.divider}`,\n borderRadius: '12px',\n backgroundColor: theme.palette.background.paper,\n boxShadow: theme.shadows[1],\n }}\n >\n <LogoContainer sx={{ alignSelf: 'flex-end' }}>\n <ApiiroLogo />\n </LogoContainer>\n <Box\n display=\"flex\"\n justifyContent=\"center\"\n alignItems=\"center\"\n minHeight=\"250px\"\n >\n <LogoSpinner />\n </Box>\n </Box>\n </>\n );\n }\n\n if (repositoriesDataError) {\n return (\n <>\n <Box\n display=\"flex\"\n justifyContent=\"center\"\n alignItems=\"center\"\n flexDirection=\"column\"\n minHeight=\"300px\"\n sx={{\n border: `1px solid ${theme.palette.divider}`,\n borderRadius: '12px',\n backgroundColor: theme.palette.background.paper,\n boxShadow: theme.shadows[1],\n }}\n >\n <LogoContainer sx={{ alignSelf: 'flex-end' }}>\n <ApiiroLogo />\n </LogoContainer>\n <SomethingWentWrong\n statusCode={repositoriesDataError?.details?.status}\n />\n </Box>\n </>\n );\n }\n\n const repositories = repositoriesData?.repositories;\n\n if (!repositories || repositories.length === 0) {\n return (\n <>\n <Box\n display=\"flex\"\n justifyContent=\"flex-start\"\n alignItems=\"center\"\n flexDirection=\"column\"\n minHeight=\"300px\"\n sx={{\n border: `1px solid ${theme.palette.divider}`,\n borderRadius: '12px',\n backgroundColor: theme.palette.background.paper,\n boxShadow: theme.shadows[1],\n }}\n >\n <LogoContainer sx={{ alignSelf: 'flex-end' }}>\n <ApiiroLogo />\n </LogoContainer>\n <Box\n display=\"flex\"\n justifyContent=\"center\"\n alignItems=\"center\"\n minHeight=\"250px\"\n >\n <NotFound message=\"Results for this repository are either unavailable on Apiiro or cannot be accessed.\" />\n </Box>\n </Box>\n </>\n );\n }\n const repositoryData = repositories[0];\n\n return (\n <>\n <WidgetMetricsGroup\n repositoryData={repositoryData}\n repoId={repoId!}\n entityRef={entityRef}\n entity={entity}\n />\n </>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AA8BA,MAAM,gBAAgB,MAAA,CAAO,GAAG,EAAE,CAAC,EAAE,OAAM,KAAM;AAC/C,EAAA,MAAM,UAAA,GAAa,uBAAuB,KAAK,CAAA;AAC/C,EAAA,OAAO;AAAA,IACL,OAAA,EAAS,MAAA;AAAA,IACT,aAAA,EAAe,KAAA;AAAA,IACf,cAAA,EAAgB,QAAA;AAAA,IAChB,UAAA,EAAY,QAAA;AAAA,IACZ,OAAA,EAAS,WAAA;AAAA,IACT,GAAA,EAAK,MAAA;AAAA,IACL,KAAA,EAAO,OAAA;AAAA,IACP,MAAA,EAAQ,MAAA;AAAA,IACR,YAAY,UAAA,CAAW,UAAA;AAAA,IACvB,YAAA,EAAc,MAAA;AAAA,IACd,OAAA,EAAS;AAAA,MACP,KAAA,EAAO,MAAA;AAAA,MACP,MAAA,EA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