@red-hat-developer-hub/backstage-plugin-scorecard 2.3.3 → 2.3.5
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 +17 -0
- package/README.md +2 -0
- package/dist/alpha.d.ts +4 -0
- package/dist/api/index.esm.js +1 -1
- package/dist/api/index.esm.js.map +1 -1
- package/dist/components/ScorecardHomepageSection/CustomTooltip.esm.js +7 -8
- package/dist/components/ScorecardHomepageSection/CustomTooltip.esm.js.map +1 -1
- package/dist/components/ScorecardHomepageSection/EmptyStatePanel.esm.js +138 -80
- package/dist/components/ScorecardHomepageSection/EmptyStatePanel.esm.js.map +1 -1
- package/dist/components/ScorecardHomepageSection/ErrorStatePanel.esm.js +48 -0
- package/dist/components/ScorecardHomepageSection/ErrorStatePanel.esm.js.map +1 -0
- package/dist/components/ScorecardHomepageSection/ResponsivePieChart.esm.js +1 -2
- package/dist/components/ScorecardHomepageSection/ResponsivePieChart.esm.js.map +1 -1
- package/dist/components/ScorecardHomepageSection/ScorecardHomepageCard.esm.js +28 -17
- package/dist/components/ScorecardHomepageSection/ScorecardHomepageCard.esm.js.map +1 -1
- package/dist/hooks/useAggregatedScorecard.esm.js +1 -1
- package/dist/hooks/useAggregatedScorecard.esm.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/translations/de.esm.js +5 -1
- package/dist/translations/de.esm.js.map +1 -1
- package/dist/translations/es.esm.js +4 -0
- package/dist/translations/es.esm.js.map +1 -1
- package/dist/translations/fr.esm.js +4 -0
- package/dist/translations/fr.esm.js.map +1 -1
- package/dist/translations/it.esm.js +5 -1
- package/dist/translations/it.esm.js.map +1 -1
- package/dist/translations/ja.esm.js +4 -0
- package/dist/translations/ja.esm.js.map +1 -1
- package/dist/translations/ref.esm.js +5 -1
- package/dist/translations/ref.esm.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @red-hat-developer-hub/backstage-plugin-scorecard
|
|
2
2
|
|
|
3
|
+
## 2.3.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- @red-hat-developer-hub/backstage-plugin-scorecard-common@2.3.5
|
|
8
|
+
|
|
9
|
+
## 2.3.4
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 4a3369f: Fix aggregated scorecard widgets view when entities are missing value or metric fetching fails.
|
|
14
|
+
|
|
15
|
+
Refactor the /metrics/:metricId/catalog/aggregations endpoint to return an object of aggregated metrics instead of an array containing a single object.
|
|
16
|
+
|
|
17
|
+
- Updated dependencies [4a3369f]
|
|
18
|
+
- @red-hat-developer-hub/backstage-plugin-scorecard-common@2.3.4
|
|
19
|
+
|
|
3
20
|
## 2.3.3
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -48,6 +48,8 @@ permission:
|
|
|
48
48
|
policyFileReload: true
|
|
49
49
|
```
|
|
50
50
|
|
|
51
|
+
**Note:** The backend also checks `catalog.entity.read` for each entity. Make sure your users/roles can read the catalog entities they want to view scorecards for.
|
|
52
|
+
|
|
51
53
|
### Configuration
|
|
52
54
|
|
|
53
55
|
1. Add the Scorecard page to you Entity overview page by modifying `packages/app/src/components/catalog/EntityPage.tsx`:
|
package/dist/alpha.d.ts
CHANGED
|
@@ -19,8 +19,12 @@ declare const scorecardTranslationRef: _backstage_frontend_plugin_api.Translatio
|
|
|
19
19
|
readonly "errors.metricDataUnavailable": string;
|
|
20
20
|
readonly "errors.invalidThresholds": string;
|
|
21
21
|
readonly "errors.missingPermission": string;
|
|
22
|
+
readonly "errors.noDataFound": string;
|
|
23
|
+
readonly "errors.authenticationError": string;
|
|
22
24
|
readonly "errors.missingPermissionMessage": string;
|
|
23
25
|
readonly "errors.userNotFoundInCatalogMessage": string;
|
|
26
|
+
readonly "errors.noDataFoundMessage": string;
|
|
27
|
+
readonly "errors.authenticationErrorMessage": string;
|
|
24
28
|
readonly "metric.github.open_prs.title": string;
|
|
25
29
|
readonly "metric.github.open_prs.description": string;
|
|
26
30
|
readonly "metric.jira.open_issues.title": string;
|
package/dist/api/index.esm.js
CHANGED
|
@@ -72,7 +72,7 @@ class ScorecardApiClient {
|
|
|
72
72
|
);
|
|
73
73
|
}
|
|
74
74
|
const data = await response.json();
|
|
75
|
-
if (!Array.isArray(data)) {
|
|
75
|
+
if (!data || Array.isArray(data) || typeof data !== "object") {
|
|
76
76
|
throw new TypeError(
|
|
77
77
|
"Invalid response format from aggregated scorecard API"
|
|
78
78
|
);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.esm.js","sources":["../../src/api/index.ts"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\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 */\n\nimport {\n createApiRef,\n FetchApi,\n DiscoveryApi,\n} from '@backstage/core-plugin-api';\nimport type { Entity } from '@backstage/catalog-model';\nimport type {\n MetricResult,\n AggregatedMetricResult,\n} from '@red-hat-developer-hub/backstage-plugin-scorecard-common';\n\nexport interface ScorecardApi {\n /**\n * Retrieves scorecard metrics for a specific entity.\n * @param entity - The Backstage entity to get metrics for\n * @param metricIds - Optional array of specific metric IDs to retrieve\n * @returns Promise resolving to an array of metric results\n */\n getScorecards(entity: Entity, metricIds?: string[]): Promise<MetricResult[]>;\n getAggregatedScorecard(metricId: string): Promise<AggregatedMetricResult
|
|
1
|
+
{"version":3,"file":"index.esm.js","sources":["../../src/api/index.ts"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\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 */\n\nimport {\n createApiRef,\n FetchApi,\n DiscoveryApi,\n} from '@backstage/core-plugin-api';\nimport type { Entity } from '@backstage/catalog-model';\nimport type {\n MetricResult,\n AggregatedMetricResult,\n} from '@red-hat-developer-hub/backstage-plugin-scorecard-common';\n\nexport interface ScorecardApi {\n /**\n * Retrieves scorecard metrics for a specific entity.\n * @param entity - The Backstage entity to get metrics for\n * @param metricIds - Optional array of specific metric IDs to retrieve\n * @returns Promise resolving to an array of metric results\n */\n getScorecards(entity: Entity, metricIds?: string[]): Promise<MetricResult[]>;\n getAggregatedScorecard(metricId: string): Promise<AggregatedMetricResult>;\n}\n\nexport const scorecardApiRef = createApiRef<ScorecardApi>({\n id: 'plugin.scorecard.service',\n});\n\nexport type ScorecardApiClientOptions = {\n fetchApi: FetchApi;\n discoveryApi: DiscoveryApi;\n};\n\n/**\n * Client implementation for the Scorecard API.\n * @public\n */\nexport class ScorecardApiClient implements ScorecardApi {\n private readonly fetchApi: FetchApi;\n private readonly discoveryApi: DiscoveryApi;\n\n constructor(options: ScorecardApiClientOptions) {\n this.fetchApi = options.fetchApi;\n this.discoveryApi = options.discoveryApi;\n }\n\n /**\n * Gets the base URL for the scorecard backend API.\n * @returns Promise resolving to the base URL\n */\n async getBaseUrl(): Promise<string> {\n return await this.discoveryApi.getBaseUrl('scorecard');\n }\n\n /**\n * Retrieves scorecard metrics for a specific entity.\n * @param entity - The Backstage entity to get metrics for\n * @param metricIds - Optional array of specific metric IDs to retrieve\n * @returns Promise resolving to an array of metric results\n * @throws Error if the request fails or returns invalid data\n */\n async getScorecards(\n entity: Entity,\n metricIds?: string[],\n ): Promise<MetricResult[]> {\n if (\n !entity?.kind ||\n !entity?.metadata?.namespace ||\n !entity?.metadata?.name\n ) {\n throw new Error(\n 'Entity missing required properties for scorecard lookup',\n );\n }\n\n const baseUrl = await this.getBaseUrl();\n const url = new URL(\n `${baseUrl}/metrics/catalog/${entity.kind}/${entity.metadata.namespace}/${entity.metadata.name}`,\n );\n\n if (metricIds) {\n url.searchParams.set('metricIds', metricIds.join(','));\n }\n\n try {\n const response = await this.fetchApi.fetch(url.toString());\n\n if (!response.ok) {\n const errorText = await response.text();\n throw new Error(\n `Failed to fetch scorecards: ${response.status} ${response.statusText}. ${errorText}`,\n );\n }\n\n const data = await response.json();\n\n if (!Array.isArray(data)) {\n throw new Error('Invalid response format from scorecard API');\n }\n\n return data;\n } catch (error) {\n if (error instanceof Error) {\n throw error;\n }\n throw new Error(`Unexpected error fetching scorecards: ${String(error)}`);\n }\n }\n\n async getAggregatedScorecard(\n metricId: string,\n ): Promise<AggregatedMetricResult> {\n if (!metricId) {\n throw new Error('Metric ID is required for aggregated scorecards');\n }\n\n const baseUrl = await this.getBaseUrl();\n const url = new URL(`${baseUrl}/metrics/${metricId}/catalog/aggregations`);\n\n try {\n const response = await this.fetchApi.fetch(url.toString());\n\n if (!response.ok) {\n const errorText = await response.text();\n throw new Error(\n `Failed to fetch aggregated scorecards: ${response.status} ${response.statusText}. ${errorText}`,\n );\n }\n\n const data = await response.json();\n\n if (!data || Array.isArray(data) || typeof data !== 'object') {\n throw new TypeError(\n 'Invalid response format from aggregated scorecard API',\n );\n }\n\n return data;\n } catch (error) {\n if (error instanceof Error) {\n throw error;\n }\n throw new Error(\n `Unexpected error fetching aggregated scorecards: ${String(error)}`,\n );\n }\n }\n}\n"],"names":[],"mappings":";;AAsCO,MAAM,kBAAkB,YAA2B,CAAA;AAAA,EACxD,EAAI,EAAA;AACN,CAAC;AAWM,MAAM,kBAA2C,CAAA;AAAA,EACrC,QAAA;AAAA,EACA,YAAA;AAAA,EAEjB,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AAA;AAC5D,QAAA,MAAM,IAAI,SAAA;AAAA,UACR;AAAA,SACF;AAAA;AAGF,MAAO,OAAA,IAAA;AAAA,aACA,KAAO,EAAA;AACd,MAAA,IAAI,iBAAiB,KAAO,EAAA;AAC1B,QAAM,MAAA,KAAA;AAAA;AAER,MAAA,MAAM,IAAI,KAAA;AAAA,QACR,CAAA,iDAAA,EAAoD,MAAO,CAAA,KAAK,CAAC,CAAA;AAAA,OACnE;AAAA;AACF;AAEJ;;;;"}
|
|
@@ -6,8 +6,7 @@ import { useTranslation } from '../../hooks/useTranslation.esm.js';
|
|
|
6
6
|
const CustomTooltip = ({
|
|
7
7
|
payload,
|
|
8
8
|
pieData,
|
|
9
|
-
|
|
10
|
-
isUserNotFoundInCatalog = false
|
|
9
|
+
customContent
|
|
11
10
|
}) => {
|
|
12
11
|
const { t } = useTranslation();
|
|
13
12
|
const getPercentage = () => {
|
|
@@ -23,14 +22,14 @@ const CustomTooltip = ({
|
|
|
23
22
|
const thresholdValue = threshold?.value || 0;
|
|
24
23
|
return total > 0 ? Math.round(thresholdValue / total * 100) : 0;
|
|
25
24
|
};
|
|
26
|
-
let
|
|
27
|
-
if (
|
|
28
|
-
|
|
25
|
+
let contentElement = null;
|
|
26
|
+
if (customContent) {
|
|
27
|
+
contentElement = /* @__PURE__ */ jsx(Typography, { sx: { fontSize: "0.875rem", margin: 0, fontWeight: "500" }, children: customContent });
|
|
29
28
|
} else if (payload?.[0]?.value === 0 || payload?.[0]?.value === void 0) {
|
|
30
29
|
const translatedState = t(`thresholds.${payload?.[0]?.name}`, {});
|
|
31
|
-
|
|
30
|
+
contentElement = /* @__PURE__ */ jsx(Typography, { sx: { fontSize: "0.875rem", margin: 0, fontWeight: "500" }, children: t("thresholds.noEntities", { category: translatedState }) });
|
|
32
31
|
} else {
|
|
33
|
-
|
|
32
|
+
contentElement = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
34
33
|
/* @__PURE__ */ jsx(Typography, { sx: { fontSize: "0.875rem", margin: 0, fontWeight: "500" }, children: t("thresholds.entities", { count: payload?.[0]?.value }) }),
|
|
35
34
|
/* @__PURE__ */ jsxs(
|
|
36
35
|
Typography,
|
|
@@ -60,7 +59,7 @@ const CustomTooltip = ({
|
|
|
60
59
|
boxShadow: "0 1px 2px 0 rgba(0, 0, 0, 0.50)",
|
|
61
60
|
border: (theme) => `1px solid ${theme.palette.grey[300]}`
|
|
62
61
|
},
|
|
63
|
-
children:
|
|
62
|
+
children: contentElement
|
|
64
63
|
}
|
|
65
64
|
);
|
|
66
65
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CustomTooltip.esm.js","sources":["../../../src/components/ScorecardHomepageSection/CustomTooltip.tsx"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\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 */\n\nimport type { TooltipProps } from 'recharts';\n\nimport Paper from '@mui/material/Paper';\nimport Typography from '@mui/material/Typography';\n\nimport type { PieData } from '../../utils/utils';\nimport { useTranslation } from '../../hooks/useTranslation';\n\ntype CustomTooltipPayload = {\n name?: string;\n value?: number;\n payload?: PieData;\n};\n\ntype CustomTooltipProps = TooltipProps<number, string> & {\n payload?: readonly CustomTooltipPayload[];\n pieData: PieData[];\n
|
|
1
|
+
{"version":3,"file":"CustomTooltip.esm.js","sources":["../../../src/components/ScorecardHomepageSection/CustomTooltip.tsx"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\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 */\n\nimport type { TooltipProps } from 'recharts';\n\nimport Paper from '@mui/material/Paper';\nimport Typography from '@mui/material/Typography';\n\nimport type { PieData } from '../../utils/utils';\nimport { useTranslation } from '../../hooks/useTranslation';\n\ntype CustomTooltipPayload = {\n name?: string;\n value?: number;\n payload?: PieData;\n};\n\ntype CustomTooltipProps = TooltipProps<number, string> & {\n payload?: readonly CustomTooltipPayload[];\n pieData: PieData[];\n customContent?: string;\n};\n\nexport const CustomTooltip = ({\n payload,\n pieData,\n customContent,\n}: CustomTooltipProps) => {\n const { t } = useTranslation();\n\n const getPercentage = () => {\n if (!Array.isArray(pieData) || pieData.length === 0) return 0;\n if (!payload || payload.length === 0) return 0;\n\n const total = pieData.reduce(\n (acc: number, curr: PieData) => acc + (curr.value || 0),\n 0,\n );\n const threshold = pieData.find(\n (item: PieData) => item.name === payload?.[0]?.name,\n );\n\n const thresholdValue = threshold?.value || 0;\n\n return total > 0 ? Math.round((thresholdValue / total) * 100) : 0;\n };\n\n let contentElement = null;\n\n if (customContent) {\n contentElement = (\n <Typography sx={{ fontSize: '0.875rem', margin: 0, fontWeight: '500' }}>\n {customContent}\n </Typography>\n );\n } else if (payload?.[0]?.value === 0 || payload?.[0]?.value === undefined) {\n const translatedState = t(`thresholds.${payload?.[0]?.name}` as any, {});\n contentElement = (\n <Typography sx={{ fontSize: '0.875rem', margin: 0, fontWeight: '500' }}>\n {t('thresholds.noEntities', { category: translatedState } as any)}\n </Typography>\n );\n } else {\n contentElement = (\n <>\n <Typography sx={{ fontSize: '0.875rem', margin: 0, fontWeight: '500' }}>\n {t('thresholds.entities', { count: payload?.[0]?.value })}\n </Typography>\n <Typography\n sx={{\n fontSize: '2.5rem',\n margin: 0,\n color: '#37a3a3',\n fontWeight: 500,\n }}\n >\n {getPercentage()}%\n </Typography>\n </>\n );\n }\n\n return (\n <Paper\n elevation={1}\n sx={{\n width:\n payload?.[0]?.value === 0 || payload?.[0]?.value === undefined\n ? '220px'\n : 'auto',\n padding: '16px',\n borderRadius: '12px',\n boxShadow: '0 1px 2px 0 rgba(0, 0, 0, 0.50)',\n border: theme => `1px solid ${theme.palette.grey[300]}`,\n }}\n >\n {contentElement}\n </Paper>\n );\n};\n"],"names":[],"mappings":";;;;;AAoCO,MAAM,gBAAgB,CAAC;AAAA,EAC5B,OAAA;AAAA,EACA,OAAA;AAAA,EACA;AACF,CAA0B,KAAA;AACxB,EAAM,MAAA,EAAE,CAAE,EAAA,GAAI,cAAe,EAAA;AAE7B,EAAA,MAAM,gBAAgB,MAAM;AAC1B,IAAI,IAAA,CAAC,MAAM,OAAQ,CAAA,OAAO,KAAK,OAAQ,CAAA,MAAA,KAAW,GAAU,OAAA,CAAA;AAC5D,IAAA,IAAI,CAAC,OAAA,IAAW,OAAQ,CAAA,MAAA,KAAW,GAAU,OAAA,CAAA;AAE7C,IAAA,MAAM,QAAQ,OAAQ,CAAA,MAAA;AAAA,MACpB,CAAC,GAAA,EAAa,IAAkB,KAAA,GAAA,IAAO,KAAK,KAAS,IAAA,CAAA,CAAA;AAAA,MACrD;AAAA,KACF;AACA,IAAA,MAAM,YAAY,OAAQ,CAAA,IAAA;AAAA,MACxB,CAAC,IAAkB,KAAA,IAAA,CAAK,IAAS,KAAA,OAAA,GAAU,CAAC,CAAG,EAAA;AAAA,KACjD;AAEA,IAAM,MAAA,cAAA,GAAiB,WAAW,KAAS,IAAA,CAAA;AAE3C,IAAA,OAAO,QAAQ,CAAI,GAAA,IAAA,CAAK,MAAO,cAAiB,GAAA,KAAA,GAAS,GAAG,CAAI,GAAA,CAAA;AAAA,GAClE;AAEA,EAAA,IAAI,cAAiB,GAAA,IAAA;AAErB,EAAA,IAAI,aAAe,EAAA;AACjB,IACE,cAAA,mBAAA,GAAA,CAAC,UAAW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BAAA,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,SAAW,EAAA,CAAA;AAAA,MACX,EAAI,EAAA;AAAA,QACF,KAAA,EACE,OAAU,GAAA,CAAC,CAAG,EAAA,KAAA,KAAU,CAAK,IAAA,OAAA,GAAU,CAAC,CAAA,EAAG,KAAU,KAAA,MAAA,GACjD,OACA,GAAA,MAAA;AAAA,QACN,OAAS,EAAA,MAAA;AAAA,QACT,YAAc,EAAA,MAAA;AAAA,QACd,SAAW,EAAA,iCAAA;AAAA,QACX,QAAQ,CAAS,KAAA,KAAA,CAAA,UAAA,EAAa,MAAM,OAAQ,CAAA,IAAA,CAAK,GAAG,CAAC,CAAA;AAAA,OACvD;AAAA,MAEC,QAAA,EAAA;AAAA;AAAA,GACH;AAEJ;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
|
-
import {
|
|
2
|
+
import { useRef, useState, useLayoutEffect } from 'react';
|
|
3
3
|
import Box from '@mui/material/Box';
|
|
4
4
|
import { useTheme } from '@mui/material/styles';
|
|
5
5
|
import { CardWrapper } from '../Common/CardWrapper.esm.js';
|
|
@@ -9,9 +9,77 @@ import CustomLegend from '../Scorecard/CustomLegend.esm.js';
|
|
|
9
9
|
import { CustomTooltip } from './CustomTooltip.esm.js';
|
|
10
10
|
import { ResponsivePieChart } from './ResponsivePieChart.esm.js';
|
|
11
11
|
|
|
12
|
+
const CenterLabel = ({
|
|
13
|
+
cx,
|
|
14
|
+
cy,
|
|
15
|
+
label,
|
|
16
|
+
color
|
|
17
|
+
}) => {
|
|
18
|
+
const fontSize = 14;
|
|
19
|
+
const lineHeight = 1.2;
|
|
20
|
+
const textRef = useRef(null);
|
|
21
|
+
const [layout, setLayout] = useState({ yOffset: -10, height: 40 });
|
|
22
|
+
const getYOffset = (lineCount) => {
|
|
23
|
+
switch (lineCount) {
|
|
24
|
+
case 2:
|
|
25
|
+
return -17;
|
|
26
|
+
case 3:
|
|
27
|
+
return -24;
|
|
28
|
+
default:
|
|
29
|
+
return -8;
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
const getHeight = (lineCount) => {
|
|
33
|
+
switch (lineCount) {
|
|
34
|
+
case 2:
|
|
35
|
+
return 48;
|
|
36
|
+
case 3:
|
|
37
|
+
return 56;
|
|
38
|
+
default:
|
|
39
|
+
return 40;
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
useLayoutEffect(() => {
|
|
43
|
+
const el = textRef.current;
|
|
44
|
+
if (!el) return;
|
|
45
|
+
const lineHeightPx = fontSize * lineHeight;
|
|
46
|
+
const lineCount = Math.round(el.scrollHeight / lineHeightPx);
|
|
47
|
+
const nextOffset = getYOffset(lineCount);
|
|
48
|
+
const nextHeight = getHeight(lineCount);
|
|
49
|
+
setLayout(
|
|
50
|
+
(prev) => prev.yOffset === nextOffset && prev.height === nextHeight ? prev : { yOffset: nextOffset, height: nextHeight }
|
|
51
|
+
);
|
|
52
|
+
}, [label]);
|
|
53
|
+
return /* @__PURE__ */ jsx("g", { transform: `translate(${cx}, ${cy})`, children: /* @__PURE__ */ jsx(
|
|
54
|
+
"foreignObject",
|
|
55
|
+
{
|
|
56
|
+
x: -50,
|
|
57
|
+
y: layout.yOffset,
|
|
58
|
+
width: 100,
|
|
59
|
+
height: layout.height,
|
|
60
|
+
children: /* @__PURE__ */ jsx(
|
|
61
|
+
"div",
|
|
62
|
+
{
|
|
63
|
+
ref: textRef,
|
|
64
|
+
style: {
|
|
65
|
+
maxWidth: 100,
|
|
66
|
+
fontSize,
|
|
67
|
+
fontWeight: 400,
|
|
68
|
+
color,
|
|
69
|
+
textAlign: "center",
|
|
70
|
+
lineHeight,
|
|
71
|
+
wordBreak: "break-word"
|
|
72
|
+
},
|
|
73
|
+
children: label
|
|
74
|
+
}
|
|
75
|
+
)
|
|
76
|
+
}
|
|
77
|
+
) });
|
|
78
|
+
};
|
|
12
79
|
const EmptyStatePanel = ({
|
|
13
|
-
|
|
14
|
-
metricId
|
|
80
|
+
label,
|
|
81
|
+
metricId,
|
|
82
|
+
tooltipContent
|
|
15
83
|
}) => {
|
|
16
84
|
const theme = useTheme();
|
|
17
85
|
const { t } = useTranslation();
|
|
@@ -25,85 +93,75 @@ const EmptyStatePanel = ({
|
|
|
25
93
|
});
|
|
26
94
|
const ringColor = getRingColor(theme, statusConfig.color, true);
|
|
27
95
|
const pieData = [{ name: "full", value: 100, color: ringColor }];
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
{
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
"
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
"div",
|
|
74
|
-
{
|
|
75
|
-
style: {
|
|
76
|
-
maxWidth: 100,
|
|
77
|
-
fontSize: 14,
|
|
78
|
-
fontWeight: 400,
|
|
79
|
-
color,
|
|
80
|
-
textAlign: "center",
|
|
81
|
-
lineHeight: 1.2,
|
|
82
|
-
wordBreak: "break-word"
|
|
83
|
-
},
|
|
84
|
-
children: isMissingPermission ? t("errors.missingPermission") : null
|
|
85
|
-
}
|
|
86
|
-
) }) });
|
|
87
|
-
},
|
|
88
|
-
legendContent: (props) => /* @__PURE__ */ jsx(CustomLegend, { ...props, thresholds: void 0 }),
|
|
89
|
-
tooltipContent: (props) => /* @__PURE__ */ jsx(
|
|
90
|
-
CustomTooltip,
|
|
96
|
+
return /* @__PURE__ */ jsx(
|
|
97
|
+
CardWrapper,
|
|
98
|
+
{
|
|
99
|
+
title: cardTitle,
|
|
100
|
+
description: cardDescription,
|
|
101
|
+
subheader: t("thresholds.entities", { count: 0 }),
|
|
102
|
+
children: /* @__PURE__ */ jsx(
|
|
103
|
+
Box,
|
|
104
|
+
{
|
|
105
|
+
width: "100%",
|
|
106
|
+
minWidth: 311,
|
|
107
|
+
minHeight: 174,
|
|
108
|
+
height: "100%",
|
|
109
|
+
"data-chart-container": true,
|
|
110
|
+
position: "relative",
|
|
111
|
+
sx: {
|
|
112
|
+
display: "flex",
|
|
113
|
+
justifyContent: "center",
|
|
114
|
+
alignItems: "center",
|
|
115
|
+
cursor: "default",
|
|
116
|
+
"& .recharts-wrapper > svg": {
|
|
117
|
+
outline: "none"
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
children: /* @__PURE__ */ jsx(
|
|
121
|
+
ResponsivePieChart,
|
|
122
|
+
{
|
|
123
|
+
pieData,
|
|
124
|
+
LabelContent: ({ cx, cy }) => {
|
|
125
|
+
if (cx === null || cy === null || cx === void 0 || cy === void 0)
|
|
126
|
+
return null;
|
|
127
|
+
const centerX = Number(cx);
|
|
128
|
+
const centerY = Number(cy);
|
|
129
|
+
const palettePath = statusConfig.color.split(".");
|
|
130
|
+
let color;
|
|
131
|
+
const paletteRoot = theme.palette[palettePath[0]];
|
|
132
|
+
if (palettePath.length === 1) {
|
|
133
|
+
color = paletteRoot;
|
|
134
|
+
} else if (palettePath.length === 2) {
|
|
135
|
+
color = paletteRoot?.[palettePath[1]];
|
|
136
|
+
} else if (palettePath.length === 3) {
|
|
137
|
+
color = paletteRoot?.[palettePath[1]]?.[palettePath[2]];
|
|
138
|
+
}
|
|
139
|
+
return /* @__PURE__ */ jsx(
|
|
140
|
+
CenterLabel,
|
|
91
141
|
{
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
isUserNotFoundInCatalog
|
|
142
|
+
cx: centerX,
|
|
143
|
+
cy: centerY,
|
|
144
|
+
label,
|
|
145
|
+
color
|
|
97
146
|
}
|
|
98
|
-
)
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
147
|
+
);
|
|
148
|
+
},
|
|
149
|
+
legendContent: (props) => /* @__PURE__ */ jsx(CustomLegend, { ...props, thresholds: void 0 }),
|
|
150
|
+
tooltipContent: (props) => /* @__PURE__ */ jsx(
|
|
151
|
+
CustomTooltip,
|
|
152
|
+
{
|
|
153
|
+
...props,
|
|
154
|
+
payload: void 0,
|
|
155
|
+
pieData,
|
|
156
|
+
customContent: tooltipContent
|
|
157
|
+
}
|
|
158
|
+
)
|
|
159
|
+
}
|
|
160
|
+
)
|
|
161
|
+
}
|
|
162
|
+
)
|
|
163
|
+
}
|
|
164
|
+
);
|
|
107
165
|
};
|
|
108
166
|
|
|
109
167
|
export { EmptyStatePanel };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmptyStatePanel.esm.js","sources":["../../../src/components/ScorecardHomepageSection/EmptyStatePanel.tsx"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\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 */\n\nimport { ResponseErrorPanel } from '@backstage/core-components';\n\nimport Box from '@mui/material/Box';\nimport { useTheme } from '@mui/material/styles';\n\nimport { CardWrapper } from '../Common/CardWrapper';\nimport { useTranslation } from '../../hooks/useTranslation';\nimport { getStatusConfig, getRingColor } from '../../utils/utils';\nimport CustomLegend from '../Scorecard/CustomLegend';\nimport { CustomTooltip } from './CustomTooltip';\nimport { ResponsivePieChart } from './ResponsivePieChart';\n\nexport const EmptyStatePanel = ({\n error,\n metricId,\n}: {\n error: Error;\n metricId: string;\n}) => {\n const theme = useTheme();\n const { t } = useTranslation();\n\n const titleKey = `metric.${metricId}.title`;\n const descriptionKey = `metric.${metricId}.description`;\n\n const cardTitle = t(titleKey as any, {});\n const cardDescription = t(descriptionKey as any, {});\n\n const statusConfig = getStatusConfig({\n evaluation: 'error',\n thresholdStatus: 'error',\n });\n\n const ringColor = getRingColor(theme, statusConfig.color, true);\n\n const pieData = [{ name: 'full', value: 100, color: ringColor }];\n\n const isMissingPermission = error.message?.includes('NotAllowedError');\n\n const isUserNotFoundInCatalog =\n error.message?.includes('NotFoundError') &&\n error.message?.includes('User entity not found in catalog');\n\n if (isMissingPermission || isUserNotFoundInCatalog) {\n return (\n <CardWrapper\n title={cardTitle}\n description={cardDescription}\n subheader={t('thresholds.entities', { count: 0 })}\n >\n <Box\n width=\"100%\"\n minWidth={311}\n minHeight={174}\n height=\"100%\"\n data-chart-container\n position=\"relative\"\n sx={{\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n cursor: 'default',\n '& .recharts-wrapper > svg': {\n outline: 'none',\n },\n }}\n >\n <ResponsivePieChart\n pieData={pieData}\n isMissingPermission={isMissingPermission}\n LabelContent={({ cx, cy }) => {\n if (cx === null || cy === null) return null;\n\n const palettePath = statusConfig.color.split('.');\n let color: string | undefined;\n const paletteRoot =\n theme.palette[palettePath[0] as keyof typeof theme.palette];\n if (palettePath.length === 1) {\n color = paletteRoot as string | undefined;\n } else if (palettePath.length === 2) {\n color = (paletteRoot as Record<string, string>)?.[\n palettePath[1]\n ] as string | undefined;\n } else if (palettePath.length === 3) {\n color = (paletteRoot as Record<string, any>)?.[\n palettePath[1]\n ]?.[palettePath[2]];\n }\n\n return (\n <g transform={`translate(${cx}, ${cy})`}>\n <foreignObject x={-50} y={-17} width={100} height={40}>\n <div\n style={{\n maxWidth: 100,\n fontSize: 14,\n fontWeight: 400,\n color,\n textAlign: 'center',\n lineHeight: 1.2,\n wordBreak: 'break-word',\n }}\n >\n {isMissingPermission\n ? t('errors.missingPermission')\n : null}\n </div>\n </foreignObject>\n </g>\n );\n }}\n legendContent={props => (\n <CustomLegend {...props} thresholds={undefined} />\n )}\n tooltipContent={props => (\n <CustomTooltip\n {...props}\n payload={undefined}\n pieData={pieData}\n isMissingPermission={isMissingPermission}\n isUserNotFoundInCatalog={isUserNotFoundInCatalog}\n />\n )}\n />\n </Box>\n </CardWrapper>\n );\n }\n\n return <ResponseErrorPanel error={error} />;\n};\n"],"names":[],"mappings":";;;;;;;;;;;AA4BO,MAAM,kBAAkB,CAAC;AAAA,EAC9B,KAAA;AAAA,EACA;AACF,CAGM,KAAA;AACJ,EAAA,MAAM,QAAQ,QAAS,EAAA;AACvB,EAAM,MAAA,EAAE,CAAE,EAAA,GAAI,cAAe,EAAA;AAE7B,EAAM,MAAA,QAAA,GAAW,UAAU,QAAQ,CAAA,MAAA,CAAA;AACnC,EAAM,MAAA,cAAA,GAAiB,UAAU,QAAQ,CAAA,YAAA,CAAA;AAEzC,EAAA,MAAM,SAAY,GAAA,CAAA,CAAE,QAAiB,EAAA,EAAE,CAAA;AACvC,EAAA,MAAM,eAAkB,GAAA,CAAA,CAAE,cAAuB,EAAA,EAAE,CAAA;AAEnD,EAAA,MAAM,eAAe,eAAgB,CAAA;AAAA,IACnC,UAAY,EAAA,OAAA;AAAA,IACZ,eAAiB,EAAA;AAAA,GAClB,CAAA;AAED,EAAA,MAAM,SAAY,GAAA,YAAA,CAAa,KAAO,EAAA,YAAA,CAAa,OAAO,IAAI,CAAA;AAE9D,EAAM,MAAA,OAAA,GAAU,CAAC,EAAE,IAAA,EAAM,QAAQ,KAAO,EAAA,GAAA,EAAK,KAAO,EAAA,SAAA,EAAW,CAAA;AAE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AA,GAAA;AAAA,kBAAC,aAAA;AAAA,kBAAA;AAAA,oBACE,GAAG,KAAA;AAAA,oBACJ,OAAS,EAAA,MAAA;AAAA,oBACT,OAAA;AAAA,oBACA,mBAAA;AAAA,oBACA;AAAA;AAAA;AACF;AAAA;AAEJ;AAAA;AACF;AAAA,KACF;AAAA;AAIJ,EAAO,uBAAA,GAAA,CAAC,sBAAmB,KAAc,EAAA,CAAA;AAC3C;;;;"}
|
|
1
|
+
{"version":3,"file":"EmptyStatePanel.esm.js","sources":["../../../src/components/ScorecardHomepageSection/EmptyStatePanel.tsx"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\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 */\n\nimport { useLayoutEffect, useRef, useState } from 'react';\nimport Box from '@mui/material/Box';\nimport { useTheme } from '@mui/material/styles';\n\nimport { CardWrapper } from '../Common/CardWrapper';\nimport { useTranslation } from '../../hooks/useTranslation';\nimport { getStatusConfig, getRingColor } from '../../utils/utils';\nimport CustomLegend from '../Scorecard/CustomLegend';\nimport { CustomTooltip } from './CustomTooltip';\nimport { ResponsivePieChart } from './ResponsivePieChart';\n\nconst CenterLabel = ({\n cx,\n cy,\n label,\n color,\n}: {\n cx: number;\n cy: number;\n label: string;\n color?: string;\n}) => {\n const fontSize = 14;\n const lineHeight = 1.2;\n\n const textRef = useRef<HTMLDivElement>(null);\n const [layout, setLayout] = useState({ yOffset: -10, height: 40 });\n\n const getYOffset = (lineCount: number) => {\n switch (lineCount) {\n case 2:\n return -17;\n case 3:\n return -24;\n default:\n return -8;\n }\n };\n\n const getHeight = (lineCount: number) => {\n switch (lineCount) {\n case 2:\n return 48;\n case 3:\n return 56;\n default:\n return 40;\n }\n };\n\n useLayoutEffect(() => {\n const el = textRef.current;\n if (!el) return;\n\n const lineHeightPx = fontSize * lineHeight;\n const lineCount = Math.round(el.scrollHeight / lineHeightPx);\n\n const nextOffset = getYOffset(lineCount);\n const nextHeight = getHeight(lineCount);\n\n setLayout(prev =>\n prev.yOffset === nextOffset && prev.height === nextHeight\n ? prev\n : { yOffset: nextOffset, height: nextHeight },\n );\n }, [label]);\n\n return (\n <g transform={`translate(${cx}, ${cy})`}>\n <foreignObject\n x={-50}\n y={layout.yOffset}\n width={100}\n height={layout.height}\n >\n <div\n ref={textRef}\n style={{\n maxWidth: 100,\n fontSize,\n fontWeight: 400,\n color,\n textAlign: 'center',\n lineHeight,\n wordBreak: 'break-word',\n }}\n >\n {label}\n </div>\n </foreignObject>\n </g>\n );\n};\n\nexport const EmptyStatePanel = ({\n label,\n metricId,\n tooltipContent,\n}: {\n label: string;\n metricId: string;\n tooltipContent: string;\n}) => {\n const theme = useTheme();\n const { t } = useTranslation();\n\n const titleKey = `metric.${metricId}.title`;\n const descriptionKey = `metric.${metricId}.description`;\n\n const cardTitle = t(titleKey as any, {});\n const cardDescription = t(descriptionKey as any, {});\n\n const statusConfig = getStatusConfig({\n evaluation: 'error',\n thresholdStatus: 'error',\n });\n\n const ringColor = getRingColor(theme, statusConfig.color, true);\n\n const pieData = [{ name: 'full', value: 100, color: ringColor }];\n\n return (\n <CardWrapper\n title={cardTitle}\n description={cardDescription}\n subheader={t('thresholds.entities', { count: 0 })}\n >\n <Box\n width=\"100%\"\n minWidth={311}\n minHeight={174}\n height=\"100%\"\n data-chart-container\n position=\"relative\"\n sx={{\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n cursor: 'default',\n '& .recharts-wrapper > svg': {\n outline: 'none',\n },\n }}\n >\n <ResponsivePieChart\n pieData={pieData}\n LabelContent={({ cx, cy }) => {\n if (\n cx === null ||\n cy === null ||\n cx === undefined ||\n cy === undefined\n )\n return null;\n\n const centerX = Number(cx);\n const centerY = Number(cy);\n\n const palettePath = statusConfig.color.split('.');\n let color: string | undefined;\n const paletteRoot =\n theme.palette[palettePath[0] as keyof typeof theme.palette];\n if (palettePath.length === 1) {\n color = paletteRoot as string | undefined;\n } else if (palettePath.length === 2) {\n color = (paletteRoot as Record<string, string>)?.[\n palettePath[1]\n ] as string | undefined;\n } else if (palettePath.length === 3) {\n color = (paletteRoot as Record<string, any>)?.[palettePath[1]]?.[\n palettePath[2]\n ];\n }\n\n return (\n <CenterLabel\n cx={centerX}\n cy={centerY}\n label={label}\n color={color}\n />\n );\n }}\n legendContent={props => (\n <CustomLegend {...props} thresholds={undefined} />\n )}\n tooltipContent={props => (\n <CustomTooltip\n {...props}\n payload={undefined}\n pieData={pieData}\n customContent={tooltipContent}\n />\n )}\n />\n </Box>\n </CardWrapper>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;AA2BA,MAAM,cAAc,CAAC;AAAA,EACnB,EAAA;AAAA,EACA,EAAA;AAAA,EACA,KAAA;AAAA,EACA;AACF,CAKM,KAAA;AACJ,EAAA,MAAM,QAAW,GAAA,EAAA;AACjB,EAAA,MAAM,UAAa,GAAA,GAAA;AAEnB,EAAM,MAAA,OAAA,GAAU,OAAuB,IAAI,CAAA;AAC3C,EAAM,MAAA,CAAC,MAAQ,EAAA,SAAS,CAAI,GAAA,QAAA,CAAS,EAAE,OAAS,EAAA,GAAA,EAAK,MAAQ,EAAA,EAAA,EAAI,CAAA;AAEjE,EAAM,MAAA,UAAA,GAAa,CAAC,SAAsB,KAAA;AACxC,IAAA,QAAQ,SAAW;AAAA,MACjB,KAAK,CAAA;AACH,QAAO,OAAA,GAAA;AAAA,MACT,KAAK,CAAA;AACH,QAAO,OAAA,GAAA;AAAA,MACT;AACE,QAAO,OAAA,EAAA;AAAA;AACX,GACF;AAEA,EAAM,MAAA,SAAA,GAAY,CAAC,SAAsB,KAAA;AACvC,IAAA,QAAQ,SAAW;AAAA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AAA,kBAAC,WAAA;AAAA,kBAAA;AAAA,oBACC,EAAI,EAAA,OAAA;AAAA,oBACJ,EAAI,EAAA,OAAA;AAAA,oBACJ,KAAA;AAAA,oBACA;AAAA;AAAA,iBACF;AAAA,eAEJ;AAAA,cACA,eAAe,CACb,KAAA,qBAAA,GAAA,CAAC,gBAAc,GAAG,KAAA,EAAO,YAAY,MAAW,EAAA,CAAA;AAAA,cAElD,gBAAgB,CACd,KAAA,qBAAA,GAAA;AAAA,gBAAC,aAAA;AAAA,gBAAA;AAAA,kBACE,GAAG,KAAA;AAAA,kBACJ,OAAS,EAAA,MAAA;AAAA,kBACT,OAAA;AAAA,kBACA,aAAe,EAAA;AAAA;AAAA;AACjB;AAAA;AAEJ;AAAA;AACF;AAAA,GACF;AAEJ;;;;"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { ResponseErrorPanel } from '@backstage/core-components';
|
|
3
|
+
import { useTranslation } from '../../hooks/useTranslation.esm.js';
|
|
4
|
+
import { EmptyStatePanel } from './EmptyStatePanel.esm.js';
|
|
5
|
+
|
|
6
|
+
const ErrorStatePanel = ({
|
|
7
|
+
error,
|
|
8
|
+
metricId
|
|
9
|
+
}) => {
|
|
10
|
+
const { t } = useTranslation();
|
|
11
|
+
const isMissingPermission = error.message?.includes("NotAllowedError");
|
|
12
|
+
if (isMissingPermission) {
|
|
13
|
+
return /* @__PURE__ */ jsx(
|
|
14
|
+
EmptyStatePanel,
|
|
15
|
+
{
|
|
16
|
+
metricId,
|
|
17
|
+
label: t("errors.missingPermission"),
|
|
18
|
+
tooltipContent: t("errors.missingPermissionMessage")
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
const isUserNotFoundInCatalog = error.message?.includes("NotFoundError") && error.message?.includes("User entity not found in catalog");
|
|
23
|
+
if (isUserNotFoundInCatalog) {
|
|
24
|
+
return /* @__PURE__ */ jsx(
|
|
25
|
+
EmptyStatePanel,
|
|
26
|
+
{
|
|
27
|
+
metricId,
|
|
28
|
+
label: t("errors.metricDataUnavailable"),
|
|
29
|
+
tooltipContent: t("errors.userNotFoundInCatalogMessage")
|
|
30
|
+
}
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
const isAuthenticationError = error.message?.includes("AuthenticationError");
|
|
34
|
+
if (isAuthenticationError) {
|
|
35
|
+
return /* @__PURE__ */ jsx(
|
|
36
|
+
EmptyStatePanel,
|
|
37
|
+
{
|
|
38
|
+
metricId,
|
|
39
|
+
label: t("errors.authenticationError"),
|
|
40
|
+
tooltipContent: t("errors.authenticationErrorMessage")
|
|
41
|
+
}
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
return /* @__PURE__ */ jsx(ResponseErrorPanel, { error });
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
export { ErrorStatePanel };
|
|
48
|
+
//# sourceMappingURL=ErrorStatePanel.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ErrorStatePanel.esm.js","sources":["../../../src/components/ScorecardHomepageSection/ErrorStatePanel.tsx"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\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 */\n\nimport { ResponseErrorPanel } from '@backstage/core-components';\nimport { useTranslation } from '../../hooks/useTranslation';\nimport { EmptyStatePanel } from './EmptyStatePanel';\n\nexport const ErrorStatePanel = ({\n error,\n metricId,\n}: {\n error: Error;\n metricId: string;\n}) => {\n const { t } = useTranslation();\n\n const isMissingPermission = error.message?.includes('NotAllowedError');\n\n if (isMissingPermission) {\n return (\n <EmptyStatePanel\n metricId={metricId}\n label={t('errors.missingPermission')}\n tooltipContent={t('errors.missingPermissionMessage')}\n />\n );\n }\n\n const isUserNotFoundInCatalog =\n error.message?.includes('NotFoundError') &&\n error.message?.includes('User entity not found in catalog');\n\n if (isUserNotFoundInCatalog) {\n return (\n <EmptyStatePanel\n metricId={metricId}\n label={t('errors.metricDataUnavailable')}\n tooltipContent={t('errors.userNotFoundInCatalogMessage')}\n />\n );\n }\n\n const isAuthenticationError = error.message?.includes('AuthenticationError');\n\n if (isAuthenticationError) {\n return (\n <EmptyStatePanel\n metricId={metricId}\n label={t('errors.authenticationError')}\n tooltipContent={t('errors.authenticationErrorMessage')}\n />\n );\n }\n\n return <ResponseErrorPanel error={error} />;\n};\n"],"names":[],"mappings":";;;;;AAoBO,MAAM,kBAAkB,CAAC;AAAA,EAC9B,KAAA;AAAA,EACA;AACF,CAGM,KAAA;AACJ,EAAM,MAAA,EAAE,CAAE,EAAA,GAAI,cAAe,EAAA;AAE7B,EAAA,MAAM,mBAAsB,GAAA,KAAA,CAAM,OAAS,EAAA,QAAA,CAAS,iBAAiB,CAAA;AAErE,EAAA,IAAI,mBAAqB,EAAA;AACvB,IACE,uBAAA,GAAA;AAAA,MAAC,eAAA;AAAA,MAAA;AAAA,QACC,QAAA;AAAA,QACA,KAAA,EAAO,EAAE,0BAA0B,CAAA;AAAA,QACnC,cAAA,EAAgB,EAAE,iCAAiC;AAAA;AAAA,KACrD;AAAA;AAIJ,EAAM,MAAA,uBAAA,GACJ,MAAM,OAAS,EAAA,QAAA,CAAS,eAAe,CACvC,IAAA,KAAA,CAAM,OAAS,EAAA,QAAA,CAAS,kCAAkC,CAAA;AAE5D,EAAA,IAAI,uBAAyB,EAAA;AAC3B,IACE,uBAAA,GAAA;AAAA,MAAC,eAAA;AAAA,MAAA;AAAA,QACC,QAAA;AAAA,QACA,KAAA,EAAO,EAAE,8BAA8B,CAAA;AAAA,QACvC,cAAA,EAAgB,EAAE,qCAAqC;AAAA;AAAA,KACzD;AAAA;AAIJ,EAAA,MAAM,qBAAwB,GAAA,KAAA,CAAM,OAAS,EAAA,QAAA,CAAS,qBAAqB,CAAA;AAE3E,EAAA,IAAI,qBAAuB,EAAA;AACzB,IACE,uBAAA,GAAA;AAAA,MAAC,eAAA;AAAA,MAAA;AAAA,QACC,QAAA;AAAA,QACA,KAAA,EAAO,EAAE,4BAA4B,CAAA;AAAA,QACrC,cAAA,EAAgB,EAAE,mCAAmC;AAAA;AAAA,KACvD;AAAA;AAIJ,EAAO,uBAAA,GAAA,CAAC,sBAAmB,KAAc,EAAA,CAAA;AAC3C;;;;"}
|
|
@@ -3,7 +3,6 @@ import { ResponsiveContainer, PieChart, Pie, Cell, Legend, Tooltip } from 'recha
|
|
|
3
3
|
|
|
4
4
|
const ResponsivePieChart = ({
|
|
5
5
|
pieData,
|
|
6
|
-
isMissingPermission = false,
|
|
7
6
|
LabelContent,
|
|
8
7
|
legendContent,
|
|
9
8
|
tooltipContent
|
|
@@ -25,7 +24,7 @@ const ResponsivePieChart = ({
|
|
|
25
24
|
cursor: "pointer",
|
|
26
25
|
isAnimationActive: false,
|
|
27
26
|
labelLine: false,
|
|
28
|
-
label:
|
|
27
|
+
label: LabelContent,
|
|
29
28
|
style: { outline: "none" },
|
|
30
29
|
children: pieData.map((category) => /* @__PURE__ */ jsx(Cell, { fill: category.color }, category.name))
|
|
31
30
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResponsivePieChart.esm.js","sources":["../../../src/components/ScorecardHomepageSection/ResponsivePieChart.tsx"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\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 */\n\nimport {\n PieChart,\n Pie,\n ResponsiveContainer,\n Cell,\n Legend,\n Tooltip,\n PieLabelRenderProps,\n} from 'recharts';\nimport { PieData } from '../../utils/utils';\n\ninterface PieTooltipPayload {\n name?: string;\n value?: number;\n payload?: {\n name: string;\n value: number;\n color?: string;\n };\n}\n\nexport interface PieLegendItem {\n value?: string;\n color?: string;\n}\n\nexport interface PieLegendContentProps {\n payload?: readonly PieLegendItem[];\n}\n\ninterface PieTooltipContentProps {\n active?: boolean;\n payload?: readonly PieTooltipPayload[];\n label?: string | number;\n}\ninterface ResponsivePieChartProps {\n pieData: PieData[];\n
|
|
1
|
+
{"version":3,"file":"ResponsivePieChart.esm.js","sources":["../../../src/components/ScorecardHomepageSection/ResponsivePieChart.tsx"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\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 */\n\nimport {\n PieChart,\n Pie,\n ResponsiveContainer,\n Cell,\n Legend,\n Tooltip,\n PieLabelRenderProps,\n} from 'recharts';\nimport { PieData } from '../../utils/utils';\n\ninterface PieTooltipPayload {\n name?: string;\n value?: number;\n payload?: {\n name: string;\n value: number;\n color?: string;\n };\n}\n\nexport interface PieLegendItem {\n value?: string;\n color?: string;\n}\n\nexport interface PieLegendContentProps {\n payload?: readonly PieLegendItem[];\n}\n\ninterface PieTooltipContentProps {\n active?: boolean;\n payload?: readonly PieTooltipPayload[];\n label?: string | number;\n}\ninterface ResponsivePieChartProps {\n pieData: PieData[];\n LabelContent?: (props: PieLabelRenderProps) => React.ReactNode;\n legendContent: (props: PieLegendContentProps) => React.ReactNode;\n tooltipContent: (props: PieTooltipContentProps) => React.ReactNode;\n}\n\nexport const ResponsivePieChart = ({\n pieData,\n LabelContent,\n legendContent,\n tooltipContent,\n}: ResponsivePieChartProps) => {\n return (\n <ResponsiveContainer style={{ outline: 'none' }}>\n <PieChart responsive>\n <Pie\n data={pieData}\n dataKey=\"value\"\n nameKey=\"name\"\n cx=\"30%\"\n cy=\"50%\"\n innerRadius=\"78%\"\n outerRadius=\"90%\"\n startAngle={90}\n endAngle={-270}\n stroke=\"none\"\n cursor=\"pointer\"\n isAnimationActive={false}\n labelLine={false}\n label={LabelContent}\n style={{ outline: 'none' }}\n >\n {pieData.map(category => (\n <Cell key={category.name} fill={category.color} />\n ))}\n </Pie>\n\n <Legend\n layout=\"vertical\"\n verticalAlign=\"middle\"\n wrapperStyle={{\n position: 'absolute',\n left: '60%',\n }}\n content={legendContent}\n />\n\n <Tooltip content={tooltipContent} />\n </PieChart>\n </ResponsiveContainer>\n );\n};\n"],"names":[],"mappings":";;;AA0DO,MAAM,qBAAqB,CAAC;AAAA,EACjC,OAAA;AAAA,EACA,YAAA;AAAA,EACA,aAAA;AAAA,EACA;AACF,CAA+B,KAAA;AAC7B,EACE,uBAAA,GAAA,CAAC,mBAAoB,EAAA,EAAA,KAAA,EAAO,EAAE,OAAA,EAAS,QACrC,EAAA,QAAA,kBAAA,IAAA,CAAC,QAAS,EAAA,EAAA,UAAA,EAAU,IAClB,EAAA,QAAA,EAAA;AAAA,oBAAA,GAAA;AAAA,MAAC,GAAA;AAAA,MAAA;AAAA,QACC,IAAM,EAAA,OAAA;AAAA,QACN,OAAQ,EAAA,OAAA;AAAA,QACR,OAAQ,EAAA,MAAA;AAAA,QACR,EAAG,EAAA,KAAA;AAAA,QACH,EAAG,EAAA,KAAA;AAAA,QACH,WAAY,EAAA,KAAA;AAAA,QACZ,WAAY,EAAA,KAAA;AAAA,QACZ,UAAY,EAAA,EAAA;AAAA,QACZ,QAAU,EAAA,IAAA;AAAA,QACV,MAAO,EAAA,MAAA;AAAA,QACP,MAAO,EAAA,SAAA;AAAA,QACP,iBAAmB,EAAA,KAAA;AAAA,QACnB,SAAW,EAAA,KAAA;AAAA,QACX,KAAO,EAAA,YAAA;AAAA,QACP,KAAA,EAAO,EAAE,OAAA,EAAS,MAAO,EAAA;AAAA,QAExB,QAAA,EAAA,OAAA,CAAQ,GAAI,CAAA,CAAA,QAAA,qBACV,GAAA,CAAA,IAAA,EAAA,EAAyB,MAAM,QAAS,CAAA,KAAA,EAAA,EAA9B,QAAS,CAAA,IAA4B,CACjD;AAAA;AAAA,KACH;AAAA,oBAEA,GAAA;AAAA,MAAC,MAAA;AAAA,MAAA;AAAA,QACC,MAAO,EAAA,UAAA;AAAA,QACP,aAAc,EAAA,QAAA;AAAA,QACd,YAAc,EAAA;AAAA,UACZ,QAAU,EAAA,UAAA;AAAA,UACV,IAAM,EAAA;AAAA,SACR;AAAA,QACA,OAAS,EAAA;AAAA;AAAA,KACX;AAAA,oBAEA,GAAA,CAAC,OAAQ,EAAA,EAAA,OAAA,EAAS,cAAgB,EAAA;AAAA,GAAA,EACpC,CACF,EAAA,CAAA;AAEJ;;;;"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { Fragment } from 'react';
|
|
3
2
|
import Box from '@mui/material/Box';
|
|
4
3
|
import CircularProgress from '@mui/material/CircularProgress';
|
|
5
4
|
import { ScorecardHomepageCardComponent } from './ScorecardHomepageCardComponent.esm.js';
|
|
6
|
-
import { EmptyStatePanel } from './EmptyStatePanel.esm.js';
|
|
7
5
|
import { useAggregatedScorecard } from '../../hooks/useAggregatedScorecard.esm.js';
|
|
8
6
|
import { useTranslation } from '../../hooks/useTranslation.esm.js';
|
|
7
|
+
import { ErrorStatePanel } from './ErrorStatePanel.esm.js';
|
|
8
|
+
import { EmptyStatePanel } from './EmptyStatePanel.esm.js';
|
|
9
9
|
|
|
10
10
|
const ScorecardHomepageCard = ({ metricId }) => {
|
|
11
11
|
const { t } = useTranslation();
|
|
@@ -25,25 +25,36 @@ const ScorecardHomepageCard = ({ metricId }) => {
|
|
|
25
25
|
);
|
|
26
26
|
}
|
|
27
27
|
if (error) {
|
|
28
|
-
return /* @__PURE__ */ jsx(
|
|
28
|
+
return /* @__PURE__ */ jsx(ErrorStatePanel, { error, metricId });
|
|
29
|
+
}
|
|
30
|
+
if (!aggregatedScorecard) {
|
|
31
|
+
return null;
|
|
29
32
|
}
|
|
30
|
-
|
|
31
|
-
const titleKey = `metric.${metric.id}.title`;
|
|
32
|
-
const descriptionKey = `metric.${metric.id}.description`;
|
|
33
|
-
const title = t(titleKey, {});
|
|
34
|
-
const description = t(descriptionKey, {});
|
|
35
|
-
const finalTitle = title === titleKey ? metric.metadata.title : title;
|
|
36
|
-
const finalDescription = description === descriptionKey ? metric.metadata.description : description;
|
|
33
|
+
if (aggregatedScorecard.result?.total === 0) {
|
|
37
34
|
return /* @__PURE__ */ jsx(
|
|
38
|
-
|
|
35
|
+
EmptyStatePanel,
|
|
39
36
|
{
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
}
|
|
44
|
-
metric.id
|
|
37
|
+
metricId,
|
|
38
|
+
label: t("errors.noDataFound"),
|
|
39
|
+
tooltipContent: t("errors.noDataFoundMessage")
|
|
40
|
+
}
|
|
45
41
|
);
|
|
46
|
-
}
|
|
42
|
+
}
|
|
43
|
+
const titleKey = `metric.${aggregatedScorecard.id}.title`;
|
|
44
|
+
const descriptionKey = `metric.${aggregatedScorecard.id}.description`;
|
|
45
|
+
const title = t(titleKey, {});
|
|
46
|
+
const description = t(descriptionKey, {});
|
|
47
|
+
const finalTitle = title === titleKey ? aggregatedScorecard.metadata.title : title;
|
|
48
|
+
const finalDescription = description === descriptionKey ? aggregatedScorecard.metadata.description : description;
|
|
49
|
+
return /* @__PURE__ */ jsx(
|
|
50
|
+
ScorecardHomepageCardComponent,
|
|
51
|
+
{
|
|
52
|
+
cardTitle: finalTitle,
|
|
53
|
+
description: finalDescription,
|
|
54
|
+
scorecard: aggregatedScorecard
|
|
55
|
+
},
|
|
56
|
+
aggregatedScorecard.id
|
|
57
|
+
);
|
|
47
58
|
};
|
|
48
59
|
|
|
49
60
|
export { ScorecardHomepageCard };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScorecardHomepageCard.esm.js","sources":["../../../src/components/ScorecardHomepageSection/ScorecardHomepageCard.tsx"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\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 */\n\nimport
|
|
1
|
+
{"version":3,"file":"ScorecardHomepageCard.esm.js","sources":["../../../src/components/ScorecardHomepageSection/ScorecardHomepageCard.tsx"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\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 */\n\nimport Box from '@mui/material/Box';\nimport CircularProgress from '@mui/material/CircularProgress';\n\nimport { ScorecardHomepageCardComponent } from './ScorecardHomepageCardComponent';\nimport { useAggregatedScorecard } from '../../hooks/useAggregatedScorecard';\nimport { useTranslation } from '../../hooks/useTranslation';\nimport { ErrorStatePanel } from './ErrorStatePanel';\nimport { EmptyStatePanel } from './EmptyStatePanel';\n\nexport const ScorecardHomepageCard = ({ metricId }: { metricId: string }) => {\n const { t } = useTranslation();\n\n const { aggregatedScorecard, loadingData, error } = useAggregatedScorecard({\n metricId,\n });\n\n if (loadingData) {\n return (\n <Box\n display=\"flex\"\n justifyContent=\"center\"\n alignItems=\"center\"\n minHeight=\"200px\"\n >\n <CircularProgress />\n </Box>\n );\n }\n\n if (error) {\n return <ErrorStatePanel error={error} metricId={metricId} />;\n }\n\n if (!aggregatedScorecard) {\n return null;\n }\n\n if (aggregatedScorecard.result?.total === 0) {\n return (\n <EmptyStatePanel\n metricId={metricId}\n label={t('errors.noDataFound')}\n tooltipContent={t('errors.noDataFoundMessage')}\n />\n );\n }\n\n const titleKey = `metric.${aggregatedScorecard.id}.title`;\n const descriptionKey = `metric.${aggregatedScorecard.id}.description`;\n\n const title = t(titleKey as any, {});\n const description = t(descriptionKey as any, {});\n\n const finalTitle =\n title === titleKey ? aggregatedScorecard.metadata.title : title;\n const finalDescription =\n description === descriptionKey\n ? aggregatedScorecard.metadata.description\n : description;\n\n return (\n <ScorecardHomepageCardComponent\n key={aggregatedScorecard.id}\n cardTitle={finalTitle}\n description={finalDescription}\n scorecard={aggregatedScorecard}\n />\n );\n};\n"],"names":[],"mappings":";;;;;;;;;AAyBO,MAAM,qBAAwB,GAAA,CAAC,EAAE,QAAA,EAAqC,KAAA;AAC3E,EAAM,MAAA,EAAE,CAAE,EAAA,GAAI,cAAe,EAAA;AAE7B,EAAA,MAAM,EAAE,mBAAA,EAAqB,WAAa,EAAA,KAAA,KAAU,sBAAuB,CAAA;AAAA,IACzE;AAAA,GACD,CAAA;AAED,EAAA,IAAI,WAAa,EAAA;AACf,IACE,uBAAA,GAAA;AAAA,MAAC,GAAA;AAAA,MAAA;AAAA,QACC,OAAQ,EAAA,MAAA;AAAA,QACR,cAAe,EAAA,QAAA;AAAA,QACf,UAAW,EAAA,QAAA;AAAA,QACX,SAAU,EAAA,OAAA;AAAA,QAEV,8BAAC,gBAAiB,EAAA,EA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13
|
const aggregatedScorecard = await scorecardApi.getAggregatedScorecard(
|
|
14
14
|
metricId
|
|
15
15
|
);
|
|
16
|
-
if (!aggregatedScorecard ||
|
|
16
|
+
if (!aggregatedScorecard || Array.isArray(aggregatedScorecard) || typeof aggregatedScorecard !== "object") {
|
|
17
17
|
throw new Error(t("errors.invalidApiResponse"));
|
|
18
18
|
}
|
|
19
19
|
return aggregatedScorecard;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAggregatedScorecard.esm.js","sources":["../../src/hooks/useAggregatedScorecard.tsx"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\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 { useMemo } from 'react';\n\nimport { useApi } from '@backstage/core-plugin-api';\nimport useAsync from 'react-use/lib/useAsync';\n\nimport { scorecardApiRef } from '../api';\nimport { useTranslation } from './useTranslation';\nimport { AggregatedMetricResult } from '@red-hat-developer-hub/backstage-plugin-scorecard-common';\n\ninterface UseAggregatedScorecardOptions {\n metricId: string;\n}\n\nexport const useAggregatedScorecard = (\n options: UseAggregatedScorecardOptions,\n) => {\n const scorecardApi = useApi(scorecardApiRef);\n\n const { metricId } = options;\n const { t } = useTranslation();\n\n const { error, loading, value } = useAsync(async () => {\n try {\n const aggregatedScorecard = await scorecardApi.getAggregatedScorecard(\n metricId,\n );\n\n if (!aggregatedScorecard
|
|
1
|
+
{"version":3,"file":"useAggregatedScorecard.esm.js","sources":["../../src/hooks/useAggregatedScorecard.tsx"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\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 { useMemo } from 'react';\n\nimport { useApi } from '@backstage/core-plugin-api';\nimport useAsync from 'react-use/lib/useAsync';\n\nimport { scorecardApiRef } from '../api';\nimport { useTranslation } from './useTranslation';\nimport { AggregatedMetricResult } from '@red-hat-developer-hub/backstage-plugin-scorecard-common';\n\ninterface UseAggregatedScorecardOptions {\n metricId: string;\n}\n\nexport const useAggregatedScorecard = (\n options: UseAggregatedScorecardOptions,\n) => {\n const scorecardApi = useApi(scorecardApiRef);\n\n const { metricId } = options;\n const { t } = useTranslation();\n\n const { error, loading, value } = useAsync(async () => {\n try {\n const aggregatedScorecard = await scorecardApi.getAggregatedScorecard(\n metricId,\n );\n\n if (\n !aggregatedScorecard ||\n Array.isArray(aggregatedScorecard) ||\n typeof aggregatedScorecard !== 'object'\n ) {\n throw new Error(t('errors.invalidApiResponse'));\n }\n\n return aggregatedScorecard;\n } catch (err) {\n if (err instanceof Error) {\n throw err;\n }\n throw new Error(\n t('errors.fetchError' as any, {\n error: String(err),\n }),\n );\n }\n }, [scorecardApi]);\n\n return useMemo(\n () => ({\n aggregatedScorecard: value as AggregatedMetricResult,\n loadingData: loading,\n error,\n }),\n [value, loading, error],\n );\n};\n"],"names":[],"mappings":";;;;;;AA4Ba,MAAA,sBAAA,GAAyB,CACpC,OACG,KAAA;AACH,EAAM,MAAA,YAAA,GAAe,OAAO,eAAe,CAAA;AAE3C,EAAM,MAAA,EAAE,UAAa,GAAA,OAAA;AACrB,EAAM,MAAA,EAAE,CAAE,EAAA,GAAI,cAAe,EAAA;AAE7B,EAAA,MAAM,EAAE,KAAO,EAAA,OAAA,EAAS,KAAM,EAAA,GAAI,SAAS,YAAY;AACrD,IAAI,IAAA;AACF,MAAM,MAAA,mBAAA,GAAsB,MAAM,YAAa,CAAA,sBAAA;AAAA,QAC7C;AAAA,OACF;AAEA,MACE,IAAA,CAAC,uBACD,KAAM,CAAA,OAAA,CAAQ,mBAAmB,CACjC,IAAA,OAAO,wBAAwB,QAC/B,EAAA;AACA,QAAA,MAAM,IAAI,KAAA,CAAM,CAAE,CAAA,2BAA2B,CAAC,CAAA;AAAA;AAGhD,MAAO,OAAA,mBAAA;AAAA,aACA,GAAK,EAAA;AACZ,MAAA,IAAI,eAAe,KAAO,EAAA;AACxB,QAAM,MAAA,GAAA;AAAA;AAER,MAAA,MAAM,IAAI,KAAA;AAAA,QACR,EAAE,mBAA4B,EAAA;AAAA,UAC5B,KAAA,EAAO,OAAO,GAAG;AAAA,SAClB;AAAA,OACH;AAAA;AACF,GACF,EAAG,CAAC,YAAY,CAAC,CAAA;AAEjB,EAAO,OAAA,OAAA;AAAA,IACL,OAAO;AAAA,MACL,mBAAqB,EAAA,KAAA;AAAA,MACrB,WAAa,EAAA,OAAA;AAAA,MACb;AAAA,KACF,CAAA;AAAA,IACA,CAAC,KAAO,EAAA,OAAA,EAAS,KAAK;AAAA,GACxB;AACF;;;;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -17,6 +17,6 @@ declare const EntityScorecardContent: () => react_jsx_runtime.JSX.Element;
|
|
|
17
17
|
*/
|
|
18
18
|
declare const ScorecardHomepageCard: ({ metricId }: {
|
|
19
19
|
metricId: string;
|
|
20
|
-
}) => react_jsx_runtime.JSX.Element;
|
|
20
|
+
}) => react_jsx_runtime.JSX.Element | null;
|
|
21
21
|
|
|
22
22
|
export { EntityScorecardContent, ScorecardHomepageCard, scorecardPlugin };
|
|
@@ -22,8 +22,12 @@ const scorecardTranslationDe = createTranslationMessages({
|
|
|
22
22
|
"errors.metricDataUnavailable": "Metrikdaten nicht verf\xFCgbar",
|
|
23
23
|
"errors.invalidThresholds": "Ung\xFCltige Schwellenwerte",
|
|
24
24
|
"errors.missingPermission": "Berechtigung fehlt",
|
|
25
|
+
"errors.noDataFound": "Keine Daten gefunden",
|
|
26
|
+
"errors.authenticationError": "Authentifizierungsfehler",
|
|
25
27
|
"errors.missingPermissionMessage": "Um die Scorecard-Metriken anzuzeigen, muss Ihr Administrator die erforderliche Berechtigung erteilen.",
|
|
26
|
-
"errors.userNotFoundInCatalogMessage": "Benutzer-Entit\xE4t in Katalog nicht gefunden",
|
|
28
|
+
"errors.userNotFoundInCatalogMessage": "Benutzer-Entit\xE4t in Katalog nicht gefunden.",
|
|
29
|
+
"errors.noDataFoundMessage": "Um Ihre Daten hier anzuzeigen, \xFCberpr\xFCfen Sie, ob Ihre Entit\xE4ten Werte melden, die sich auf diese Metrik beziehen.",
|
|
30
|
+
"errors.authenticationErrorMessage": "Bitte melden Sie sich an, um Ihre Daten anzuzeigen.",
|
|
27
31
|
// Metric translations
|
|
28
32
|
"metric.github.open_prs.title": "GitHub offene PRs",
|
|
29
33
|
"metric.github.open_prs.description": "Aktuelle Anzahl offener Pull Requests f\xFCr ein bestimmtes GitHub-Repository.",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"de.esm.js","sources":["../../src/translations/de.ts"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\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 */\n\nimport { createTranslationMessages } from '@backstage/core-plugin-api/alpha';\nimport { scorecardTranslationRef } from './ref';\n\nconst scorecardTranslationDe = createTranslationMessages({\n ref: scorecardTranslationRef,\n full: true,\n messages: {\n // Empty state\n 'emptyState.title': 'Noch keine Scorecards hinzugefügt',\n 'emptyState.description':\n 'Scorecards helfen Ihnen, die Komponentengesundheit auf einen Blick zu überwachen. Um zu beginnen, erkunden Sie unsere Dokumentation für Einrichtungsrichtlinien.',\n 'emptyState.button': 'Dokumentation anzeigen',\n 'emptyState.altText': 'Keine Scorecards',\n\n // Permission required state\n 'permissionRequired.title': 'Berechtigung fehlt',\n 'permissionRequired.description':\n 'Um das Scorecard-Plugin anzuzeigen, wenden Sie sich an Ihren Administrator, um die {{permission}} Berechtigung zu erteilen.',\n 'permissionRequired.button': 'Mehr lesen',\n 'permissionRequired.altText': 'Berechtigung erforderlich',\n\n // Error messages\n 'errors.entityMissingProperties':\n 'Entität fehlt erforderliche Eigenschaften für Scorecard-Suche',\n 'errors.invalidApiResponse':\n 'Ungültiges Antwortformat von der Scorecard-API',\n 'errors.fetchError': 'Fehler beim Abrufen der Scorecards: {{error}}',\n 'errors.metricDataUnavailable': 'Metrikdaten nicht verfügbar',\n 'errors.invalidThresholds': 'Ungültige Schwellenwerte',\n 'errors.missingPermission': 'Berechtigung fehlt',\n 'errors.missingPermissionMessage':\n 'Um die Scorecard-Metriken anzuzeigen, muss Ihr Administrator die erforderliche Berechtigung erteilen.',\n 'errors.userNotFoundInCatalogMessage':\n 'Benutzer-Entität in Katalog nicht gefunden',\n // Metric translations\n 'metric.github.open_prs.title': 'GitHub offene PRs',\n 'metric.github.open_prs.description':\n 'Aktuelle Anzahl offener Pull Requests für ein bestimmtes GitHub-Repository.',\n 'metric.jira.open_issues.title': 'Jira offene blockierende Tickets',\n 'metric.jira.open_issues.description':\n 'Hebt die Anzahl kritischer, blockierender Probleme hervor, die derzeit in Jira offen sind.',\n\n // Threshold translations\n 'thresholds.success': 'Erfolg',\n 'thresholds.warning': 'Warnung',\n 'thresholds.error': 'Fehler',\n 'thresholds.noEntities': 'Keine Entitäten in {{category}} Zustand',\n 'thresholds.entities_one': '{{count}} Entität',\n 'thresholds.entities_other': '{{count}} Entitäten',\n },\n});\n\nexport default scorecardTranslationDe;\n"],"names":[],"mappings":";;;AAmBA,MAAM,yBAAyB,yBAA0B,CAAA;AAAA,EACvD,GAAK,EAAA,uBAAA;AAAA,EACL,IAAM,EAAA,IAAA;AAAA,EACN,QAAU,EAAA;AAAA;AAAA,IAER,kBAAoB,EAAA,sCAAA;AAAA,IACpB,wBACE,EAAA,wKAAA;AAAA,IACF,mBAAqB,EAAA,wBAAA;AAAA,IACrB,oBAAsB,EAAA,kBAAA;AAAA;AAAA,IAGtB,0BAA4B,EAAA,oBAAA;AAAA,IAC5B,gCACE,EAAA,6HAAA;AAAA,IACF,2BAA6B,EAAA,YAAA;AAAA,IAC7B,4BAA8B,EAAA,2BAAA;AAAA;AAAA,IAG9B,gCACE,EAAA,qEAAA;AAAA,IACF,2BACE,EAAA,mDAAA;AAAA,IACF,mBAAqB,EAAA,+CAAA;AAAA,IACrB,8BAAgC,EAAA,gCAAA;AAAA,IAChC,0BAA4B,EAAA,6BAAA;AAAA,IAC5B,0BAA4B,EAAA,oBAAA;AAAA,IAC5B,iCACE,EAAA,uGAAA;AAAA,IACF,qCACE,EAAA
|
|
1
|
+
{"version":3,"file":"de.esm.js","sources":["../../src/translations/de.ts"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\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 */\n\nimport { createTranslationMessages } from '@backstage/core-plugin-api/alpha';\nimport { scorecardTranslationRef } from './ref';\n\nconst scorecardTranslationDe = createTranslationMessages({\n ref: scorecardTranslationRef,\n full: true,\n messages: {\n // Empty state\n 'emptyState.title': 'Noch keine Scorecards hinzugefügt',\n 'emptyState.description':\n 'Scorecards helfen Ihnen, die Komponentengesundheit auf einen Blick zu überwachen. Um zu beginnen, erkunden Sie unsere Dokumentation für Einrichtungsrichtlinien.',\n 'emptyState.button': 'Dokumentation anzeigen',\n 'emptyState.altText': 'Keine Scorecards',\n\n // Permission required state\n 'permissionRequired.title': 'Berechtigung fehlt',\n 'permissionRequired.description':\n 'Um das Scorecard-Plugin anzuzeigen, wenden Sie sich an Ihren Administrator, um die {{permission}} Berechtigung zu erteilen.',\n 'permissionRequired.button': 'Mehr lesen',\n 'permissionRequired.altText': 'Berechtigung erforderlich',\n\n // Error messages\n 'errors.entityMissingProperties':\n 'Entität fehlt erforderliche Eigenschaften für Scorecard-Suche',\n 'errors.invalidApiResponse':\n 'Ungültiges Antwortformat von der Scorecard-API',\n 'errors.fetchError': 'Fehler beim Abrufen der Scorecards: {{error}}',\n 'errors.metricDataUnavailable': 'Metrikdaten nicht verfügbar',\n 'errors.invalidThresholds': 'Ungültige Schwellenwerte',\n 'errors.missingPermission': 'Berechtigung fehlt',\n 'errors.noDataFound': 'Keine Daten gefunden',\n 'errors.authenticationError': 'Authentifizierungsfehler',\n 'errors.missingPermissionMessage':\n 'Um die Scorecard-Metriken anzuzeigen, muss Ihr Administrator die erforderliche Berechtigung erteilen.',\n 'errors.userNotFoundInCatalogMessage':\n 'Benutzer-Entität in Katalog nicht gefunden.',\n 'errors.noDataFoundMessage':\n 'Um Ihre Daten hier anzuzeigen, überprüfen Sie, ob Ihre Entitäten Werte melden, die sich auf diese Metrik beziehen.',\n 'errors.authenticationErrorMessage':\n 'Bitte melden Sie sich an, um Ihre Daten anzuzeigen.',\n // Metric translations\n 'metric.github.open_prs.title': 'GitHub offene PRs',\n 'metric.github.open_prs.description':\n 'Aktuelle Anzahl offener Pull Requests für ein bestimmtes GitHub-Repository.',\n 'metric.jira.open_issues.title': 'Jira offene blockierende Tickets',\n 'metric.jira.open_issues.description':\n 'Hebt die Anzahl kritischer, blockierender Probleme hervor, die derzeit in Jira offen sind.',\n\n // Threshold translations\n 'thresholds.success': 'Erfolg',\n 'thresholds.warning': 'Warnung',\n 'thresholds.error': 'Fehler',\n 'thresholds.noEntities': 'Keine Entitäten in {{category}} Zustand',\n 'thresholds.entities_one': '{{count}} Entität',\n 'thresholds.entities_other': '{{count}} Entitäten',\n },\n});\n\nexport default scorecardTranslationDe;\n"],"names":[],"mappings":";;;AAmBA,MAAM,yBAAyB,yBAA0B,CAAA;AAAA,EACvD,GAAK,EAAA,uBAAA;AAAA,EACL,IAAM,EAAA,IAAA;AAAA,EACN,QAAU,EAAA;AAAA;AAAA,IAER,kBAAoB,EAAA,sCAAA;AAAA,IACpB,wBACE,EAAA,wKAAA;AAAA,IACF,mBAAqB,EAAA,wBAAA;AAAA,IACrB,oBAAsB,EAAA,kBAAA;AAAA;AAAA,IAGtB,0BAA4B,EAAA,oBAAA;AAAA,IAC5B,gCACE,EAAA,6HAAA;AAAA,IACF,2BAA6B,EAAA,YAAA;AAAA,IAC7B,4BAA8B,EAAA,2BAAA;AAAA;AAAA,IAG9B,gCACE,EAAA,qEAAA;AAAA,IACF,2BACE,EAAA,mDAAA;AAAA,IACF,mBAAqB,EAAA,+CAAA;AAAA,IACrB,8BAAgC,EAAA,gCAAA;AAAA,IAChC,0BAA4B,EAAA,6BAAA;AAAA,IAC5B,0BAA4B,EAAA,oBAAA;AAAA,IAC5B,oBAAsB,EAAA,sBAAA;AAAA,IACtB,4BAA8B,EAAA,0BAAA;AAAA,IAC9B,iCACE,EAAA,uGAAA;AAAA,IACF,qCACE,EAAA,gDAAA;AAAA,IACF,2BACE,EAAA,6HAAA;AAAA,IACF,mCACE,EAAA,qDAAA;AAAA;AAAA,IAEF,8BAAgC,EAAA,mBAAA;AAAA,IAChC,oCACE,EAAA,gFAAA;AAAA,IACF,+BAAiC,EAAA,kCAAA;AAAA,IACjC,qCACE,EAAA,4FAAA;AAAA;AAAA,IAGF,oBAAsB,EAAA,QAAA;AAAA,IACtB,oBAAsB,EAAA,SAAA;AAAA,IACtB,kBAAoB,EAAA,QAAA;AAAA,IACpB,uBAAyB,EAAA,4CAAA;AAAA,IACzB,yBAA2B,EAAA,sBAAA;AAAA,IAC3B,2BAA6B,EAAA;AAAA;AAEjC,CAAC;;;;"}
|
|
@@ -22,8 +22,12 @@ const scorecardTranslationEs = createTranslationMessages({
|
|
|
22
22
|
"errors.metricDataUnavailable": "Datos de m\xE9trica no disponibles",
|
|
23
23
|
"errors.invalidThresholds": "Umbrales inv\xE1lidos",
|
|
24
24
|
"errors.missingPermission": "Permiso faltante",
|
|
25
|
+
"errors.noDataFound": "No se han encontrado datos.",
|
|
26
|
+
"errors.authenticationError": "Error de autenticaci\xF3n",
|
|
25
27
|
"errors.missingPermissionMessage": "Para ver las m\xE9tricas de scorecard, tu administrador debe otorgarle el permiso requerido.",
|
|
26
28
|
"errors.userNotFoundInCatalogMessage": "Entidad de usuario no encontrada en el cat\xE1logo",
|
|
29
|
+
"errors.noDataFoundMessage": "Para ver tus datos aqu\xED, comprueba que tus entidades est\xE9n reportando valores relacionados con esta m\xE9trica.",
|
|
30
|
+
"errors.authenticationErrorMessage": "Inicie sesi\xF3n para ver sus datos.",
|
|
27
31
|
// Metric translations
|
|
28
32
|
"metric.github.open_prs.title": "GitHub PRs abiertas",
|
|
29
33
|
"metric.github.open_prs.description": "Recuento actual de Pull Requests abiertas para un repositorio de GitHub dado.",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"es.esm.js","sources":["../../src/translations/es.ts"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\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 */\n\nimport { createTranslationMessages } from '@backstage/core-plugin-api/alpha';\nimport { scorecardTranslationRef } from './ref';\n\nconst scorecardTranslationEs = createTranslationMessages({\n ref: scorecardTranslationRef,\n full: true,\n messages: {\n // Empty state\n 'emptyState.title': 'Aún no se han añadido scorecards',\n 'emptyState.description':\n 'Los scorecards te ayudan a monitorear la salud de los componentes de un vistazo. Para comenzar, explora nuestra documentación para obtener pautas de configuración.',\n 'emptyState.button': 'Ver documentación',\n 'emptyState.altText': 'Sin scorecards',\n\n // Permission required state\n 'permissionRequired.title': 'Permiso faltante',\n 'permissionRequired.description':\n 'Para ver el plugin Scorecard, contacta a tu administrador para otorgar el {{permission}} permiso.',\n 'permissionRequired.button': 'Leer más',\n 'permissionRequired.altText': 'Permiso requerido',\n\n // Error messages\n 'errors.entityMissingProperties':\n 'Entidad falta propiedades requeridas para búsqueda de scorecard',\n 'errors.invalidApiResponse':\n 'Formato de respuesta inválido de la API de scorecard',\n 'errors.fetchError': 'Error al obtener scorecards: {{error}}',\n 'errors.metricDataUnavailable': 'Datos de métrica no disponibles',\n 'errors.invalidThresholds': 'Umbrales inválidos',\n 'errors.missingPermission': 'Permiso faltante',\n 'errors.missingPermissionMessage':\n 'Para ver las métricas de scorecard, tu administrador debe otorgarle el permiso requerido.',\n 'errors.userNotFoundInCatalogMessage':\n 'Entidad de usuario no encontrada en el catálogo',\n // Metric translations\n 'metric.github.open_prs.title': 'GitHub PRs abiertas',\n 'metric.github.open_prs.description':\n 'Recuento actual de Pull Requests abiertas para un repositorio de GitHub dado.',\n 'metric.jira.open_issues.title': 'Jira tickets bloqueantes abiertos',\n 'metric.jira.open_issues.description':\n 'Destaca el número de problemas críticos y bloqueantes que están actualmente abiertos en Jira.',\n\n // Threshold translations\n 'thresholds.success': 'Éxito',\n 'thresholds.warning': 'Advertencia',\n 'thresholds.error': 'Error',\n 'thresholds.noEntities': 'No hay entidades en el estado {{category}}',\n 'thresholds.entities_one': '{{count}} entidad',\n 'thresholds.entities_other': '{{count}} entidades',\n },\n});\n\nexport default scorecardTranslationEs;\n"],"names":[],"mappings":";;;AAmBA,MAAM,yBAAyB,yBAA0B,CAAA;AAAA,EACvD,GAAK,EAAA,uBAAA;AAAA,EACL,IAAM,EAAA,IAAA;AAAA,EACN,QAAU,EAAA;AAAA;AAAA,IAER,kBAAoB,EAAA,wCAAA;AAAA,IACpB,wBACE,EAAA,2KAAA;AAAA,IACF,mBAAqB,EAAA,sBAAA;AAAA,IACrB,oBAAsB,EAAA,gBAAA;AAAA;AAAA,IAGtB,0BAA4B,EAAA,kBAAA;AAAA,IAC5B,gCACE,EAAA,mGAAA;AAAA,IACF,2BAA6B,EAAA,aAAA;AAAA,IAC7B,4BAA8B,EAAA,mBAAA;AAAA;AAAA,IAG9B,gCACE,EAAA,oEAAA;AAAA,IACF,2BACE,EAAA,yDAAA;AAAA,IACF,mBAAqB,EAAA,wCAAA;AAAA,IACrB,8BAAgC,EAAA,oCAAA;AAAA,IAChC,0BAA4B,EAAA,uBAAA;AAAA,IAC5B,0BAA4B,EAAA,kBAAA;AAAA,IAC5B,iCACE,EAAA,8FAAA;AAAA,IACF,qCACE,EAAA,oDAAA;AAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"es.esm.js","sources":["../../src/translations/es.ts"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\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 */\n\nimport { createTranslationMessages } from '@backstage/core-plugin-api/alpha';\nimport { scorecardTranslationRef } from './ref';\n\nconst scorecardTranslationEs = createTranslationMessages({\n ref: scorecardTranslationRef,\n full: true,\n messages: {\n // Empty state\n 'emptyState.title': 'Aún no se han añadido scorecards',\n 'emptyState.description':\n 'Los scorecards te ayudan a monitorear la salud de los componentes de un vistazo. Para comenzar, explora nuestra documentación para obtener pautas de configuración.',\n 'emptyState.button': 'Ver documentación',\n 'emptyState.altText': 'Sin scorecards',\n\n // Permission required state\n 'permissionRequired.title': 'Permiso faltante',\n 'permissionRequired.description':\n 'Para ver el plugin Scorecard, contacta a tu administrador para otorgar el {{permission}} permiso.',\n 'permissionRequired.button': 'Leer más',\n 'permissionRequired.altText': 'Permiso requerido',\n\n // Error messages\n 'errors.entityMissingProperties':\n 'Entidad falta propiedades requeridas para búsqueda de scorecard',\n 'errors.invalidApiResponse':\n 'Formato de respuesta inválido de la API de scorecard',\n 'errors.fetchError': 'Error al obtener scorecards: {{error}}',\n 'errors.metricDataUnavailable': 'Datos de métrica no disponibles',\n 'errors.invalidThresholds': 'Umbrales inválidos',\n 'errors.missingPermission': 'Permiso faltante',\n 'errors.noDataFound': 'No se han encontrado datos.',\n 'errors.authenticationError': 'Error de autenticación',\n 'errors.missingPermissionMessage':\n 'Para ver las métricas de scorecard, tu administrador debe otorgarle el permiso requerido.',\n 'errors.userNotFoundInCatalogMessage':\n 'Entidad de usuario no encontrada en el catálogo',\n 'errors.noDataFoundMessage':\n 'Para ver tus datos aquí, comprueba que tus entidades estén reportando valores relacionados con esta métrica.',\n 'errors.authenticationErrorMessage': 'Inicie sesión para ver sus datos.',\n // Metric translations\n 'metric.github.open_prs.title': 'GitHub PRs abiertas',\n 'metric.github.open_prs.description':\n 'Recuento actual de Pull Requests abiertas para un repositorio de GitHub dado.',\n 'metric.jira.open_issues.title': 'Jira tickets bloqueantes abiertos',\n 'metric.jira.open_issues.description':\n 'Destaca el número de problemas críticos y bloqueantes que están actualmente abiertos en Jira.',\n\n // Threshold translations\n 'thresholds.success': 'Éxito',\n 'thresholds.warning': 'Advertencia',\n 'thresholds.error': 'Error',\n 'thresholds.noEntities': 'No hay entidades en el estado {{category}}',\n 'thresholds.entities_one': '{{count}} entidad',\n 'thresholds.entities_other': '{{count}} entidades',\n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ationFr = createTranslationMessages({
|
|
|
18
18
|
"errors.metricDataUnavailable": "Donn\xE9es m\xE9triques indisponibles",
|
|
19
19
|
"errors.invalidThresholds": "Seuils invalides",
|
|
20
20
|
"errors.missingPermission": "Permission manquante",
|
|
21
|
+
"errors.noDataFound": "Aucune donn\xE9e trouv\xE9e",
|
|
22
|
+
"errors.authenticationError": "Erreur d'authentification",
|
|
21
23
|
"errors.missingPermissionMessage": "Pour voir les m\xE9triques de scorecard, votre administrateur doit vous donner la permission requise.",
|
|
22
24
|
"errors.userNotFoundInCatalogMessage": "Entit\xE9 utilisateur non trouv\xE9e dans le catalogue",
|
|
25
|
+
"errors.noDataFoundMessage": "Pour voir vos donn\xE9es ici, v\xE9rifiez que vos entit\xE9s communiquent les valeurs li\xE9es \xE0 cet indicateur.",
|
|
26
|
+
"errors.authenticationErrorMessage": "Veuillez vous connecter pour afficher vos donn\xE9es.",
|
|
23
27
|
// Metric translations
|
|
24
28
|
"metric.github.open_prs.title": "GitHub ouvre des PR",
|
|
25
29
|
"metric.github.open_prs.description": "Nombre actuel de requ\xEAtes d'extraction ouvertes pour un r\xE9f\xE9rentiel GitHub donn\xE9.",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fr.esm.js","sources":["../../src/translations/fr.ts"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\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 */\n\nimport { createTranslationMessages } from '@backstage/core-plugin-api/alpha';\nimport { scorecardTranslationRef } from './ref';\n\n/**\n * fr translation for plugin.scorecard.\n * @public\n */\nconst scorecardTranslationFr = createTranslationMessages({\n ref: scorecardTranslationRef,\n messages: {\n 'emptyState.title': \"Aucune carte de score n'a encore été ajoutée\",\n 'emptyState.description':\n 'Les tableaux de bord vous aident à surveiller l’état des composants en un coup d’œil. Pour commencer, explorez notre documentation pour obtenir des instructions de configuration.',\n 'emptyState.button': 'Voir la documentation',\n 'emptyState.altText': 'Pas de tableau de bord',\n 'permissionRequired.title': 'Autorisations manquantes',\n 'permissionRequired.description':\n \"Pour afficher le plugin Scorecard, contactez votre administrateur pour lui accorder l'autorisation {{permission}}.\",\n 'permissionRequired.button': 'En savoir plus',\n 'permissionRequired.altText': 'Autorisation requise',\n 'errors.entityMissingProperties':\n \"Entité manquant les propriétés requises pour la recherche dans la fiche d'évaluation\",\n 'errors.invalidApiResponse':\n \"Format de réponse non valide de l'API de scorecard\",\n 'errors.fetchError':\n 'Erreur lors de la récupération des tableaux de bord : {{error}}',\n 'errors.metricDataUnavailable': 'Données métriques indisponibles',\n 'errors.invalidThresholds': 'Seuils invalides',\n 'errors.missingPermission': 'Permission manquante',\n 'errors.missingPermissionMessage':\n 'Pour voir les métriques de scorecard, votre administrateur doit vous donner la permission requise.',\n 'errors.userNotFoundInCatalogMessage':\n 'Entité utilisateur non trouvée dans le catalogue',\n // Metric translations\n 'metric.github.open_prs.title': 'GitHub ouvre des PR',\n 'metric.github.open_prs.description':\n \"Nombre actuel de requêtes d'extraction ouvertes pour un référentiel GitHub donné.\",\n 'metric.jira.open_issues.title': 'Jira ouvre des tickets bloquants',\n 'metric.jira.open_issues.description':\n 'Met en évidence le nombre de problèmes critiques et bloquants actuellement ouverts dans Jira.',\n 'thresholds.success': 'Succès',\n 'thresholds.warning': 'Attention',\n 'thresholds.error': 'Erreur',\n 'thresholds.noEntities': \"Aucune entité dans l'état {{category}}\",\n 'thresholds.entities_one': '{{count}} entité',\n 'thresholds.entities_other': '{{count}} entités',\n },\n});\n\nexport default scorecardTranslationFr;\n"],"names":[],"mappings":";;;AAuBA,MAAM,yBAAyB,yBAA0B,CAAA;AAAA,EACvD,GAAK,EAAA,uBAAA;AAAA,EACL,QAAU,EAAA;AAAA,IACR,kBAAoB,EAAA,uDAAA;AAAA,IACpB,wBACE,EAAA,yMAAA;AAAA,IACF,mBAAqB,EAAA,uBAAA;AAAA,IACrB,oBAAsB,EAAA,wBAAA;AAAA,IACtB,0BAA4B,EAAA,0BAAA;AAAA,IAC5B,gCACE,EAAA,oHAAA;AAAA,IACF,2BAA6B,EAAA,gBAAA;AAAA,IAC7B,4BAA8B,EAAA,sBAAA;AAAA,IAC9B,gCACE,EAAA,kGAAA;AAAA,IACF,2BACE,EAAA,uDAAA;AAAA,IACF,mBACE,EAAA,0EAAA;AAAA,IACF,8BAAgC,EAAA,uCAAA;AAAA,IAChC,0BAA4B,EAAA,kBAAA;AAAA,IAC5B,0BAA4B,EAAA,sBAAA;AAAA,IAC5B,iCACE,EAAA,uGAAA;AAAA,IACF,qCACE,EAAA,wDAAA;AAAA;AAAA,IAEF,8BAAgC,EAAA,qBAAA;AAAA,IAChC,oCACE,EAAA,+FAAA;AAAA,IACF,+BAAiC,EAAA,kCAAA;AAAA,IACjC,qCACE,EAAA,qGAAA;AAAA,IACF,oBAAsB,EAAA,WAAA;AAAA,IACtB,oBAAsB,EAAA,WAAA;AAAA,IACtB,kBAAoB,EAAA,QAAA;AAAA,IACpB,uBAAyB,EAAA,8CAAA;AAAA,IACzB,yBAA2B,EAAA,qBAAA;AAAA,IAC3B,2BAA6B,EAAA;AAAA;AAEjC,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"fr.esm.js","sources":["../../src/translations/fr.ts"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\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 */\n\nimport { createTranslationMessages } from '@backstage/core-plugin-api/alpha';\nimport { scorecardTranslationRef } from './ref';\n\n/**\n * fr translation for plugin.scorecard.\n * @public\n */\nconst scorecardTranslationFr = createTranslationMessages({\n ref: scorecardTranslationRef,\n messages: {\n 'emptyState.title': \"Aucune carte de score n'a encore été ajoutée\",\n 'emptyState.description':\n 'Les tableaux de bord vous aident à surveiller l’état des composants en un coup d’œil. Pour commencer, explorez notre documentation pour obtenir des instructions de configuration.',\n 'emptyState.button': 'Voir la documentation',\n 'emptyState.altText': 'Pas de tableau de bord',\n 'permissionRequired.title': 'Autorisations manquantes',\n 'permissionRequired.description':\n \"Pour afficher le plugin Scorecard, contactez votre administrateur pour lui accorder l'autorisation {{permission}}.\",\n 'permissionRequired.button': 'En savoir plus',\n 'permissionRequired.altText': 'Autorisation requise',\n 'errors.entityMissingProperties':\n \"Entité manquant les propriétés requises pour la recherche dans la fiche d'évaluation\",\n 'errors.invalidApiResponse':\n \"Format de réponse non valide de l'API de scorecard\",\n 'errors.fetchError':\n 'Erreur lors de la récupération des tableaux de bord : {{error}}',\n 'errors.metricDataUnavailable': 'Données métriques indisponibles',\n 'errors.invalidThresholds': 'Seuils invalides',\n 'errors.missingPermission': 'Permission manquante',\n 'errors.noDataFound': 'Aucune donnée trouvée',\n 'errors.authenticationError': \"Erreur d'authentification\",\n 'errors.missingPermissionMessage':\n 'Pour voir les métriques de scorecard, votre administrateur doit vous donner la permission requise.',\n 'errors.userNotFoundInCatalogMessage':\n 'Entité utilisateur non trouvée dans le catalogue',\n 'errors.noDataFoundMessage':\n 'Pour voir vos données ici, vérifiez que vos entités communiquent les valeurs liées à cet indicateur.',\n 'errors.authenticationErrorMessage':\n 'Veuillez vous connecter pour afficher vos données.',\n // Metric translations\n 'metric.github.open_prs.title': 'GitHub ouvre des PR',\n 'metric.github.open_prs.description':\n \"Nombre actuel de requêtes d'extraction ouvertes pour un référentiel GitHub donné.\",\n 'metric.jira.open_issues.title': 'Jira ouvre des tickets bloquants',\n 'metric.jira.open_issues.description':\n 'Met en évidence le nombre de problèmes critiques et bloquants actuellement ouverts dans Jira.',\n 'thresholds.success': 'Succès',\n 'thresholds.warning': 'Attention',\n 'thresholds.error': 'Erreur',\n 'thresholds.noEntities': \"Aucune entité dans l'état {{category}}\",\n 'thresholds.entities_one': '{{count}} entité',\n 'thresholds.entities_other': '{{count}} entités',\n },\n});\n\nexport default scorecardTranslationFr;\n"],"names":[],"mappings":";;;AAuBA,MAAM,yBAAyB,yBAA0B,CAAA;AAAA,EACvD,GAAK,EAAA,uBAAA;AAAA,EACL,QAAU,EAAA;AAAA,IACR,kBAAoB,EAAA,uDAAA;AAAA,IACpB,wBACE,EAAA,yMAAA;AAAA,IACF,mBAAqB,EAAA,uBAAA;AAAA,IACrB,oBAAsB,EAAA,wBAAA;AAAA,IACtB,0BAA4B,EAAA,0BAAA;AAAA,IAC5B,gCACE,EAAA,oHAAA;AAAA,IACF,2BAA6B,EAAA,gBAAA;AAAA,IAC7B,4BAA8B,EAAA,sBAAA;AAAA,IAC9B,gCACE,EAAA,kGAAA;AAAA,IACF,2BACE,EAAA,uDAAA;AAAA,IACF,mBACE,EAAA,0EAAA;AAAA,IACF,8BAAgC,EAAA,uCAAA;AAAA,IAChC,0BAA4B,EAAA,kBAAA;AAAA,IAC5B,0BAA4B,EAAA,sBAAA;AAAA,IAC5B,oBAAsB,EAAA,6BAAA;AAAA,IACtB,4BAA8B,EAAA,2BAAA;AAAA,IAC9B,iCACE,EAAA,uGAAA;AAAA,IACF,qCACE,EAAA,wDAAA;AAAA,IACF,2BACE,EAAA,qHAAA;AAAA,IACF,mCACE,EAAA,uDAAA;AAAA;AAAA,IAEF,8BAAgC,EAAA,qBAAA;AAAA,IAChC,oCACE,EAAA,+FAAA;AAAA,IACF,+BAAiC,EAAA,kCAAA;AAAA,IACjC,qCACE,EAAA,qGAAA;AAAA,IACF,oBAAsB,EAAA,WAAA;AAAA,IACtB,oBAAsB,EAAA,WAAA;AAAA,IACtB,kBAAoB,EAAA,QAAA;AAAA,IACpB,uBAAyB,EAAA,8CAAA;AAAA,IACzB,yBAA2B,EAAA,qBAAA;AAAA,IAC3B,2BAA6B,EAAA;AAAA;AAEjC,CAAC;;;;"}
|
|
@@ -18,8 +18,12 @@ const scorecardTranslationIt = createTranslationMessages({
|
|
|
18
18
|
"errors.metricDataUnavailable": "Dati metrici non disponibili",
|
|
19
19
|
"errors.invalidThresholds": "Soglie non valide",
|
|
20
20
|
"errors.missingPermission": "Autorizzazione mancante",
|
|
21
|
+
"errors.noDataFound": "Nessun dato trovato",
|
|
22
|
+
"errors.authenticationError": "Errore di autenticazione",
|
|
21
23
|
"errors.missingPermissionMessage": "Per visualizzare le metriche della scheda punteggio, il tuo amministratore deve concedere l'autorizzazione richiesta.",
|
|
22
|
-
"errors.userNotFoundInCatalogMessage": "Entit\xE0 utente non trovata nel catalogo",
|
|
24
|
+
"errors.userNotFoundInCatalogMessage": "Entit\xE0 utente non trovata nel catalogo.",
|
|
25
|
+
"errors.noDataFoundMessage": "Per visualizzare i tuoi dati qui, verifica che le tue entit\xE0 stiano riportando valori relativi a questa metrica.",
|
|
26
|
+
"errors.authenticationErrorMessage": "Effettua il login per visualizzare i tuoi dati.",
|
|
23
27
|
"metric.github.open_prs.title": "Richieste pull aperte su GitHub",
|
|
24
28
|
"metric.github.open_prs.description": "Conteggio attuale delle richieste pull aperte per uno specifico repository GitHub.",
|
|
25
29
|
"metric.jira.open_issues.title": "Ticket di blocco Jira aperti",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"it.esm.js","sources":["../../src/translations/it.ts"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\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 */\n\nimport { createTranslationMessages } from '@backstage/core-plugin-api/alpha';\nimport { scorecardTranslationRef } from './ref';\n\n/**\n * Italian translation for plugin.scorecard.\n * @public\n */\nconst scorecardTranslationIt = createTranslationMessages({\n ref: scorecardTranslationRef,\n messages: {\n 'emptyState.title': 'Non è stata ancora aggiunta alcuna scheda punteggio',\n 'emptyState.description':\n \"Le schede punteggio aiutano a monitorare a colpo d'occhio l'integrità dei componenti. Per iniziare, consultare la documentazione per le linee guida di configurazione.\",\n 'emptyState.button': 'Visualizza la documentazione',\n 'emptyState.altText': 'Nessuna scheda punteggio',\n 'permissionRequired.title': 'Autorizzazione mancante',\n 'permissionRequired.description':\n \"Per visualizzare il plugin Scorecard, contattare l'amministratore per richiedere l'autorizzazione {{permission}}.\",\n 'permissionRequired.button': 'Per saperne di più',\n 'permissionRequired.altText': 'Autorizzazione richiesta',\n 'errors.entityMissingProperties':\n 'Entità priva delle proprietà richieste per la ricerca nella scheda punteggio',\n 'errors.invalidApiResponse':\n \"Formato di risposta non valido dall'API della scheda punteggio\",\n 'errors.fetchError':\n 'Errore durante il recupero delle schede punteggio: {{error}}',\n 'errors.metricDataUnavailable': 'Dati metrici non disponibili',\n 'errors.invalidThresholds': 'Soglie non valide',\n 'errors.missingPermission': 'Autorizzazione mancante',\n 'errors.missingPermissionMessage':\n \"Per visualizzare le metriche della scheda punteggio, il tuo amministratore deve concedere l'autorizzazione richiesta.\",\n 'errors.userNotFoundInCatalogMessage':\n 'Entità utente non trovata nel catalogo',\n 'metric.github.open_prs.title': 'Richieste pull aperte su GitHub',\n 'metric.github.open_prs.description':\n 'Conteggio attuale delle richieste pull aperte per uno specifico repository GitHub.',\n 'metric.jira.open_issues.title': 'Ticket di blocco Jira aperti',\n 'metric.jira.open_issues.description':\n 'Evidenzia il numero di problemi critici e di blocco attualmente aperti in Jira.',\n 'thresholds.success': 'Attività riuscita',\n 'thresholds.warning': 'Avviso',\n 'thresholds.error': 'Errore',\n 'thresholds.noEntities': 'Nessuna entità con stato {{category}}',\n 'thresholds.entities_one': '{{count}} entità',\n 'thresholds.entities_other': '{{count}} entità',\n },\n});\n\nexport default scorecardTranslationIt;\n"],"names":[],"mappings":";;;AAuBA,MAAM,yBAAyB,yBAA0B,CAAA;AAAA,EACvD,GAAK,EAAA,uBAAA;AAAA,EACL,QAAU,EAAA;AAAA,IACR,kBAAoB,EAAA,wDAAA;AAAA,IACpB,wBACE,EAAA,2KAAA;AAAA,IACF,mBAAqB,EAAA,8BAAA;AAAA,IACrB,oBAAsB,EAAA,0BAAA;AAAA,IACtB,0BAA4B,EAAA,yBAAA;AAAA,IAC5B,gCACE,EAAA,mHAAA;AAAA,IACF,2BAA6B,EAAA,uBAAA;AAAA,IAC7B,4BAA8B,EAAA,0BAAA;AAAA,IAC9B,gCACE,EAAA,oFAAA;AAAA,IACF,2BACE,EAAA,gEAAA;AAAA,IACF,mBACE,EAAA,8DAAA;AAAA,IACF,8BAAgC,EAAA,8BAAA;AAAA,IAChC,0BAA4B,EAAA,mBAAA;AAAA,IAC5B,0BAA4B,EAAA,yBAAA;AAAA,IAC5B,iCACE,EAAA,uHAAA;AAAA,IACF,qCACE,EAAA,
|
|
1
|
+
{"version":3,"file":"it.esm.js","sources":["../../src/translations/it.ts"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\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 */\n\nimport { createTranslationMessages } from '@backstage/core-plugin-api/alpha';\nimport { scorecardTranslationRef } from './ref';\n\n/**\n * Italian translation for plugin.scorecard.\n * @public\n */\nconst scorecardTranslationIt = createTranslationMessages({\n ref: scorecardTranslationRef,\n messages: {\n 'emptyState.title': 'Non è stata ancora aggiunta alcuna scheda punteggio',\n 'emptyState.description':\n \"Le schede punteggio aiutano a monitorare a colpo d'occhio l'integrità dei componenti. Per iniziare, consultare la documentazione per le linee guida di configurazione.\",\n 'emptyState.button': 'Visualizza la documentazione',\n 'emptyState.altText': 'Nessuna scheda punteggio',\n 'permissionRequired.title': 'Autorizzazione mancante',\n 'permissionRequired.description':\n \"Per visualizzare il plugin Scorecard, contattare l'amministratore per richiedere l'autorizzazione {{permission}}.\",\n 'permissionRequired.button': 'Per saperne di più',\n 'permissionRequired.altText': 'Autorizzazione richiesta',\n 'errors.entityMissingProperties':\n 'Entità priva delle proprietà richieste per la ricerca nella scheda punteggio',\n 'errors.invalidApiResponse':\n \"Formato di risposta non valido dall'API della scheda punteggio\",\n 'errors.fetchError':\n 'Errore durante il recupero delle schede punteggio: {{error}}',\n 'errors.metricDataUnavailable': 'Dati metrici non disponibili',\n 'errors.invalidThresholds': 'Soglie non valide',\n 'errors.missingPermission': 'Autorizzazione mancante',\n 'errors.noDataFound': 'Nessun dato trovato',\n 'errors.authenticationError': 'Errore di autenticazione',\n 'errors.missingPermissionMessage':\n \"Per visualizzare le metriche della scheda punteggio, il tuo amministratore deve concedere l'autorizzazione richiesta.\",\n 'errors.userNotFoundInCatalogMessage':\n 'Entità utente non trovata nel catalogo.',\n 'errors.noDataFoundMessage':\n 'Per visualizzare i tuoi dati qui, verifica che le tue entità stiano riportando valori relativi a questa metrica.',\n 'errors.authenticationErrorMessage':\n 'Effettua il login per visualizzare i tuoi dati.',\n 'metric.github.open_prs.title': 'Richieste pull aperte su GitHub',\n 'metric.github.open_prs.description':\n 'Conteggio attuale delle richieste pull aperte per uno specifico repository GitHub.',\n 'metric.jira.open_issues.title': 'Ticket di blocco Jira aperti',\n 'metric.jira.open_issues.description':\n 'Evidenzia il numero di problemi critici e di blocco attualmente aperti in Jira.',\n 'thresholds.success': 'Attività riuscita',\n 'thresholds.warning': 'Avviso',\n 'thresholds.error': 'Errore',\n 'thresholds.noEntities': 'Nessuna entità con stato {{category}}',\n 'thresholds.entities_one': '{{count}} entità',\n 'thresholds.entities_other': '{{count}} entità',\n },\n});\n\nexport default scorecardTranslationIt;\n"],"names":[],"mappings":";;;AAuBA,MAAM,yBAAyB,yBAA0B,CAAA;AAAA,EACvD,GAAK,EAAA,uBAAA;AAAA,EACL,QAAU,EAAA;AAAA,IACR,kBAAoB,EAAA,wDAAA;AAAA,IACpB,wBACE,EAAA,2KAAA;AAAA,IACF,mBAAqB,EAAA,8BAAA;AAAA,IACrB,oBAAsB,EAAA,0BAAA;AAAA,IACtB,0BAA4B,EAAA,yBAAA;AAAA,IAC5B,gCACE,EAAA,mHAAA;AAAA,IACF,2BAA6B,EAAA,uBAAA;AAAA,IAC7B,4BAA8B,EAAA,0BAAA;AAAA,IAC9B,gCACE,EAAA,oFAAA;AAAA,IACF,2BACE,EAAA,gEAAA;AAAA,IACF,mBACE,EAAA,8DAAA;AAAA,IACF,8BAAgC,EAAA,8BAAA;AAAA,IAChC,0BAA4B,EAAA,mBAAA;AAAA,IAC5B,0BAA4B,EAAA,yBAAA;AAAA,IAC5B,oBAAsB,EAAA,qBAAA;AAAA,IACtB,4BAA8B,EAAA,0BAAA;AAAA,IAC9B,iCACE,EAAA,uHAAA;AAAA,IACF,qCACE,EAAA,4CAAA;AAAA,IACF,2BACE,EAAA,qHAAA;AAAA,IACF,mCACE,EAAA,iDAAA;AAAA,IACF,8BAAgC,EAAA,iCAAA;AAAA,IAChC,oCACE,EAAA,oFAAA;AAAA,IACF,+BAAiC,EAAA,8BAAA;AAAA,IACjC,qCACE,EAAA,iFAAA;AAAA,IACF,oBAAsB,EAAA,sBAAA;AAAA,IACtB,oBAAsB,EAAA,QAAA;AAAA,IACtB,kBAAoB,EAAA,QAAA;AAAA,IACpB,uBAAyB,EAAA,0CAAA;AAAA,IACzB,yBAA2B,EAAA,qBAAA;AAAA,IAC3B,2BAA6B,EAAA;AAAA;AAEjC,CAAC;;;;"}
|
|
@@ -18,8 +18,12 @@ const scorecardTranslationJa = createTranslationMessages({
|
|
|
18
18
|
"errors.metricDataUnavailable": "\u30E1\u30C8\u30EA\u30AF\u30B9\u30C7\u30FC\u30BF\u304C\u3042\u308A\u307E\u305B\u3093",
|
|
19
19
|
"errors.invalidThresholds": "\u7121\u52B9\u306A\u3057\u304D\u3044\u5024",
|
|
20
20
|
"errors.missingPermission": "\u6A29\u9650\u304C\u3042\u308A\u307E\u305B\u3093",
|
|
21
|
+
"errors.noDataFound": "\u30C7\u30FC\u30BF\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3067\u3057\u305F",
|
|
22
|
+
"errors.authenticationError": "\u8A8D\u8A3C\u30A8\u30E9\u30FC",
|
|
21
23
|
"errors.missingPermissionMessage": "\u30B9\u30B3\u30A2\u30AB\u30FC\u30C9\u306E\u30E1\u30C8\u30EA\u30AF\u30B9\u3092\u8868\u793A\u3059\u308B\u306B\u306F\u3001\u7BA1\u7406\u8005\u306B\u6A29\u9650\u3092\u4ED8\u4E0E\u3057\u3066\u3082\u3089\u3046\u3088\u3046\u4F9D\u983C\u3057\u3066\u304F\u3060\u3055\u3044\u3002",
|
|
22
24
|
"errors.userNotFoundInCatalogMessage": "\u30E6\u30FC\u30B6\u30FC\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u30FC\u304C\u30AB\u30BF\u30ED\u30B0\u306B\u898B\u3064\u304B\u308A\u307E\u305B\u3093",
|
|
25
|
+
"errors.noDataFoundMessage": "\u3053\u3053\u3067\u30C7\u30FC\u30BF\u3092\u78BA\u8A8D\u3059\u308B\u306B\u306F\u3001\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u304C\u3053\u306E\u6307\u6A19\u306B\u95A2\u9023\u3059\u308B\u5024\u3092\u5831\u544A\u3057\u3066\u3044\u308B\u3053\u3068\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002",
|
|
26
|
+
"errors.authenticationErrorMessage": "\u30C7\u30FC\u30BF\u3092\u78BA\u8A8D\u3059\u308B\u306B\u306F\u30B5\u30A4\u30F3\u30A4\u30F3\u3057\u3066\u304F\u3060\u3055\u3044\u3002",
|
|
23
27
|
"metric.github.open_prs.title": "GitHub \u306E\u30AA\u30FC\u30D7\u30F3\u72B6\u614B\u306E PR",
|
|
24
28
|
"metric.github.open_prs.description": "\u7279\u5B9A\u306E GitHub \u30EA\u30DD\u30B8\u30C8\u30EA\u30FC\u306B\u304A\u3051\u308B\u30AA\u30FC\u30D7\u30F3\u72B6\u614B\u306E\u30D7\u30EB\u30EA\u30AF\u30A8\u30B9\u30C8\u306E\u6570\u3002",
|
|
25
29
|
"metric.jira.open_issues.title": "Jira \u306E\u30AA\u30FC\u30D7\u30F3\u72B6\u614B\u306E\u9032\u884C\u3092\u59A8\u3052\u3066\u3044\u308B\u30C1\u30B1\u30C3\u30C8",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ja.esm.js","sources":["../../src/translations/ja.ts"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\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 */\n\nimport { createTranslationMessages } from '@backstage/core-plugin-api/alpha';\nimport { scorecardTranslationRef } from './ref';\n\n/**\n * Japanese translation for plugin.scorecard.\n * @public\n */\nconst scorecardTranslationJa = createTranslationMessages({\n ref: scorecardTranslationRef,\n messages: {\n 'emptyState.title': 'スコアカードはまだ追加されていません',\n 'emptyState.description':\n 'スコアカードを使用すると、コンポーネントの健全性を一目で監視できます。まず、セットアップ手順に関するドキュメントを参照してください。',\n 'emptyState.button': 'ドキュメントの表示',\n 'emptyState.altText': 'スコアカードなし',\n 'permissionRequired.title': '権限がありません',\n 'permissionRequired.description':\n 'スコアカードプラグインを表示するには、管理者に連絡して {{permission}} 権限を付与してもらうよう依頼してください。',\n 'permissionRequired.button': 'さらに表示する',\n 'permissionRequired.altText': '権限が必要',\n 'errors.entityMissingProperties':\n 'スコアカードの検索に必要なプロパティーがエンティティーにありません',\n 'errors.invalidApiResponse': 'スコアカード API からの応答形式が無効です',\n 'errors.fetchError':\n 'スコアカードの取得中にエラーが発生しました: {{error}}',\n 'errors.metricDataUnavailable': 'メトリクスデータがありません',\n 'errors.invalidThresholds': '無効なしきい値',\n 'errors.missingPermission': '権限がありません',\n 'errors.missingPermissionMessage':\n 'スコアカードのメトリクスを表示するには、管理者に権限を付与してもらうよう依頼してください。',\n 'errors.userNotFoundInCatalogMessage':\n 'ユーザーエンティティーがカタログに見つかりません',\n 'metric.github.open_prs.title': 'GitHub のオープン状態の PR',\n 'metric.github.open_prs.description':\n '特定の GitHub リポジトリーにおけるオープン状態のプルリクエストの数。',\n 'metric.jira.open_issues.title':\n 'Jira のオープン状態の進行を妨げているチケット',\n 'metric.jira.open_issues.description':\n 'Jira で現在オープン状態になっている、重大かつ進行を妨げている課題の数を明示します。',\n 'thresholds.success': '成功',\n 'thresholds.warning': '警告',\n 'thresholds.error': 'エラー',\n 'thresholds.noEntities': '{{category}} 状態のエンティティーがありません',\n 'thresholds.entities_one': '{{count}} エンティティー',\n 'thresholds.entities_other': '{{count}} エンティティー',\n },\n});\n\nexport default scorecardTranslationJa;\n"],"names":[],"mappings":";;;AAuBA,MAAM,yBAAyB,yBAA0B,CAAA;AAAA,EACvD,GAAK,EAAA,uBAAA;AAAA,EACL,QAAU,EAAA;AAAA,IACR,kBAAoB,EAAA,8GAAA;AAAA,IACpB,wBACE,EAAA,8YAAA;AAAA,IACF,mBAAqB,EAAA,wDAAA;AAAA,IACrB,oBAAsB,EAAA,kDAAA;AAAA,IACtB,0BAA4B,EAAA,kDAAA;AAAA,IAC5B,gCACE,EAAA,kTAAA;AAAA,IACF,2BAA6B,EAAA,4CAAA;AAAA,IAC7B,4BAA8B,EAAA,gCAAA;AAAA,IAC9B,gCACE,EAAA,wMAAA;AAAA,IACF,2BAA6B,EAAA,mHAAA;AAAA,IAC7B,mBACE,EAAA,2IAAA;AAAA,IACF,8BAAgC,EAAA,sFAAA;AAAA,IAChC,0BAA4B,EAAA,4CAAA;AAAA,IAC5B,0BAA4B,EAAA,kDAAA;AAAA,IAC5B,iCACE,EAAA,gRAAA;AAAA,IACF,qCACE,EAAA,kJAAA;AAAA,IACF,8BAAgC,EAAA,4DAAA;AAAA,IAChC,oCACE,EAAA,8LAAA;AAAA,IACF,+BACE,EAAA,+HAAA;AAAA,IACF,qCACE,EAAA,iPAAA;AAAA,IACF,oBAAsB,EAAA,cAAA;AAAA,IACtB,oBAAsB,EAAA,cAAA;AAAA,IACtB,kBAAoB,EAAA,oBAAA;AAAA,IACpB,uBAAyB,EAAA,+GAAA;AAAA,IACzB,yBAA2B,EAAA,sDAAA;AAAA,IAC3B,2BAA6B,EAAA;AAAA;AAEjC,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"ja.esm.js","sources":["../../src/translations/ja.ts"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\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 */\n\nimport { createTranslationMessages } from '@backstage/core-plugin-api/alpha';\nimport { scorecardTranslationRef } from './ref';\n\n/**\n * Japanese translation for plugin.scorecard.\n * @public\n */\nconst scorecardTranslationJa = createTranslationMessages({\n ref: scorecardTranslationRef,\n messages: {\n 'emptyState.title': 'スコアカードはまだ追加されていません',\n 'emptyState.description':\n 'スコアカードを使用すると、コンポーネントの健全性を一目で監視できます。まず、セットアップ手順に関するドキュメントを参照してください。',\n 'emptyState.button': 'ドキュメントの表示',\n 'emptyState.altText': 'スコアカードなし',\n 'permissionRequired.title': '権限がありません',\n 'permissionRequired.description':\n 'スコアカードプラグインを表示するには、管理者に連絡して {{permission}} 権限を付与してもらうよう依頼してください。',\n 'permissionRequired.button': 'さらに表示する',\n 'permissionRequired.altText': '権限が必要',\n 'errors.entityMissingProperties':\n 'スコアカードの検索に必要なプロパティーがエンティティーにありません',\n 'errors.invalidApiResponse': 'スコアカード API からの応答形式が無効です',\n 'errors.fetchError':\n 'スコアカードの取得中にエラーが発生しました: {{error}}',\n 'errors.metricDataUnavailable': 'メトリクスデータがありません',\n 'errors.invalidThresholds': '無効なしきい値',\n 'errors.missingPermission': '権限がありません',\n 'errors.noDataFound': 'データが見つかりませんでした',\n 'errors.authenticationError': '認証エラー',\n 'errors.missingPermissionMessage':\n 'スコアカードのメトリクスを表示するには、管理者に権限を付与してもらうよう依頼してください。',\n 'errors.userNotFoundInCatalogMessage':\n 'ユーザーエンティティーがカタログに見つかりません',\n 'errors.noDataFoundMessage':\n 'ここでデータを確認するには、エンティティがこの指標に関連する値を報告していることを確認してください。',\n 'errors.authenticationErrorMessage':\n 'データを確認するにはサインインしてください。',\n 'metric.github.open_prs.title': 'GitHub のオープン状態の PR',\n 'metric.github.open_prs.description':\n '特定の GitHub リポジトリーにおけるオープン状態のプルリクエストの数。',\n 'metric.jira.open_issues.title':\n 'Jira のオープン状態の進行を妨げているチケット',\n 'metric.jira.open_issues.description':\n 'Jira で現在オープン状態になっている、重大かつ進行を妨げている課題の数を明示します。',\n 'thresholds.success': '成功',\n 'thresholds.warning': '警告',\n 'thresholds.error': 'エラー',\n 'thresholds.noEntities': '{{category}} 状態のエンティティーがありません',\n 'thresholds.entities_one': '{{count}} エンティティー',\n 'thresholds.entities_other': '{{count}} エンティティー',\n },\n});\n\nexport default scorecardTranslationJa;\n"],"names":[],"mappings":";;;AAuBA,MAAM,yBAAyB,yBAA0B,CAAA;AAAA,EACvD,GAAK,EAAA,uBAAA;AAAA,EACL,QAAU,EAAA;AAAA,IACR,kBAAoB,EAAA,8GAAA;AAAA,IACpB,wBACE,EAAA,8YAAA;AAAA,IACF,mBAAqB,EAAA,wDAAA;AAAA,IACrB,oBAAsB,EAAA,kDAAA;AAAA,IACtB,0BAA4B,EAAA,kDAAA;AAAA,IAC5B,gCACE,EAAA,kTAAA;AAAA,IACF,2BAA6B,EAAA,4CAAA;AAAA,IAC7B,4BAA8B,EAAA,gCAAA;AAAA,IAC9B,gCACE,EAAA,wMAAA;AAAA,IACF,2BAA6B,EAAA,mHAAA;AAAA,IAC7B,mBACE,EAAA,2IAAA;AAAA,IACF,8BAAgC,EAAA,sFAAA;AAAA,IAChC,0BAA4B,EAAA,4CAAA;AAAA,IAC5B,0BAA4B,EAAA,kDAAA;AAAA,IAC5B,oBAAsB,EAAA,sFAAA;AAAA,IACtB,4BAA8B,EAAA,gCAAA;AAAA,IAC9B,iCACE,EAAA,gRAAA;AAAA,IACF,qCACE,EAAA,kJAAA;AAAA,IACF,2BACE,EAAA,8SAAA;AAAA,IACF,mCACE,EAAA,sIAAA;AAAA,IACF,8BAAgC,EAAA,4DAAA;AAAA,IAChC,oCACE,EAAA,8LAAA;AAAA,IACF,+BACE,EAAA,+HAAA;AAAA,IACF,qCACE,EAAA,iPAAA;AAAA,IACF,oBAAsB,EAAA,cAAA;AAAA,IACtB,oBAAsB,EAAA,cAAA;AAAA,IACtB,kBAAoB,EAAA,oBAAA;AAAA,IACpB,uBAAyB,EAAA,+GAAA;AAAA,IACzB,yBAA2B,EAAA,sDAAA;AAAA,IAC3B,2BAA6B,EAAA;AAAA;AAEjC,CAAC;;;;"}
|
|
@@ -23,8 +23,12 @@ const scorecardMessages = {
|
|
|
23
23
|
metricDataUnavailable: "Metric data unavailable",
|
|
24
24
|
invalidThresholds: "Invalid thresholds",
|
|
25
25
|
missingPermission: "Missing permission",
|
|
26
|
+
noDataFound: "No data found",
|
|
27
|
+
authenticationError: "Authentication error",
|
|
26
28
|
missingPermissionMessage: "To view the scorecard metrics, your administrator must grant you the required permission.",
|
|
27
|
-
userNotFoundInCatalogMessage: "User entity not found in catalog"
|
|
29
|
+
userNotFoundInCatalogMessage: "User entity not found in catalog.",
|
|
30
|
+
noDataFoundMessage: "To see your data here, check that your entities are reporting values related to this metric.",
|
|
31
|
+
authenticationErrorMessage: "Please sign in to view your data."
|
|
28
32
|
},
|
|
29
33
|
// Metric translations
|
|
30
34
|
metric: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ref.esm.js","sources":["../../src/translations/ref.ts"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\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 */\n\nimport { createTranslationRef } from '@backstage/core-plugin-api/alpha';\n\n/**\n * Messages object containing all English translations.\n * This is our single source of truth for translations.\n * @public\n */\nexport const scorecardMessages = {\n // Empty state\n emptyState: {\n title: 'No scorecards added yet',\n description:\n 'Scorecards help you monitor component health at a glance. To begin, explore our documentation for setup guidelines.',\n button: 'View documentation',\n altText: 'No scorecards',\n },\n\n // Permission required state\n permissionRequired: {\n title: 'Missing permission',\n description:\n 'To view Scorecard plugin, contact your administrator to give the {{permission}} permission.',\n button: 'Read more',\n altText: 'Permission required',\n },\n\n // Error messages\n errors: {\n entityMissingProperties:\n 'Entity missing required properties for scorecard lookup',\n invalidApiResponse: 'Invalid response format from scorecard API',\n fetchError: 'Error fetching scorecards: {{error}}',\n metricDataUnavailable: 'Metric data unavailable',\n invalidThresholds: 'Invalid thresholds',\n missingPermission: 'Missing permission',\n missingPermissionMessage:\n 'To view the scorecard metrics, your administrator must grant you the required permission.',\n userNotFoundInCatalogMessage: 'User entity not found in catalog',\n },\n\n // Metric translations\n metric: {\n 'github.open_prs': {\n title: 'GitHub open PRs',\n description:\n 'Current count of open Pull Requests for a given GitHub repository.',\n },\n 'jira.open_issues': {\n title: 'Jira open blocking tickets',\n description:\n 'Highlights the number of critical, blocking issues that are currently open in Jira.',\n },\n },\n\n // Threshold translations\n thresholds: {\n success: 'Success',\n warning: 'Warning',\n error: 'Error',\n noEntities: 'No entities in {{category}} state',\n entities_one: '{{count}} entity',\n entities_other: '{{count}} entities',\n },\n};\n\n/**\n * Translation reference for scorecard plugin\n * @public\n */\nexport const scorecardTranslationRef = createTranslationRef({\n id: 'plugin.scorecard',\n messages: scorecardMessages,\n});\n"],"names":[],"mappings":";;AAuBO,MAAM,iBAAoB,GAAA;AAAA;AAAA,EAE/B,UAAY,EAAA;AAAA,IACV,KAAO,EAAA,yBAAA;AAAA,IACP,WACE,EAAA,qHAAA;AAAA,IACF,MAAQ,EAAA,oBAAA;AAAA,IACR,OAAS,EAAA;AAAA,GACX;AAAA;AAAA,EAGA,kBAAoB,EAAA;AAAA,IAClB,KAAO,EAAA,oBAAA;AAAA,IACP,WACE,EAAA,6FAAA;AAAA,IACF,MAAQ,EAAA,WAAA;AAAA,IACR,OAAS,EAAA;AAAA,GACX;AAAA;AAAA,EAGA,MAAQ,EAAA;AAAA,IACN,uBACE,EAAA,yDAAA;AAAA,IACF,kBAAoB,EAAA,4CAAA;AAAA,IACpB,UAAY,EAAA,sCAAA;AAAA,IACZ,qBAAuB,EAAA,yBAAA;AAAA,IACvB,iBAAmB,EAAA,oBAAA;AAAA,IACnB,iBAAmB,EAAA,oBAAA;AAAA,IACnB,wBACE,EAAA,2FAAA;AAAA,IACF,4BAA8B,EAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"ref.esm.js","sources":["../../src/translations/ref.ts"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\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 */\n\nimport { createTranslationRef } from '@backstage/core-plugin-api/alpha';\n\n/**\n * Messages object containing all English translations.\n * This is our single source of truth for translations.\n * @public\n */\nexport const scorecardMessages = {\n // Empty state\n emptyState: {\n title: 'No scorecards added yet',\n description:\n 'Scorecards help you monitor component health at a glance. To begin, explore our documentation for setup guidelines.',\n button: 'View documentation',\n altText: 'No scorecards',\n },\n\n // Permission required state\n permissionRequired: {\n title: 'Missing permission',\n description:\n 'To view Scorecard plugin, contact your administrator to give the {{permission}} permission.',\n button: 'Read more',\n altText: 'Permission required',\n },\n\n // Error messages\n errors: {\n entityMissingProperties:\n 'Entity missing required properties for scorecard lookup',\n invalidApiResponse: 'Invalid response format from scorecard API',\n fetchError: 'Error fetching scorecards: {{error}}',\n metricDataUnavailable: 'Metric data unavailable',\n invalidThresholds: 'Invalid thresholds',\n missingPermission: 'Missing permission',\n noDataFound: 'No data found',\n authenticationError: 'Authentication error',\n missingPermissionMessage:\n 'To view the scorecard metrics, your administrator must grant you the required permission.',\n userNotFoundInCatalogMessage: 'User entity not found in catalog.',\n noDataFoundMessage:\n 'To see your data here, check that your entities are reporting values related to this metric.',\n authenticationErrorMessage: 'Please sign in to view your data.',\n },\n\n // Metric translations\n metric: {\n 'github.open_prs': {\n title: 'GitHub open PRs',\n description:\n 'Current count of open Pull Requests for a given GitHub repository.',\n },\n 'jira.open_issues': {\n title: 'Jira open blocking tickets',\n description:\n 'Highlights the number of critical, blocking issues that are currently open in Jira.',\n },\n },\n\n // Threshold translations\n thresholds: {\n success: 'Success',\n warning: 'Warning',\n error: 'Error',\n noEntities: 'No entities in {{category}} state',\n entities_one: '{{count}} entity',\n entities_other: '{{count}} entities',\n },\n};\n\n/**\n * Translation reference for scorecard plugin\n * @public\n */\nexport const scorecardTranslationRef = createTranslationRef({\n id: 'plugin.scorecard',\n messages: scorecardMessages,\n});\n"],"names":[],"mappings":";;AAuBO,MAAM,iBAAoB,GAAA;AAAA;AAAA,EAE/B,UAAY,EAAA;AAAA,IACV,KAAO,EAAA,yBAAA;AAAA,IACP,WACE,EAAA,qHAAA;AAAA,IACF,MAAQ,EAAA,oBAAA;AAAA,IACR,OAAS,EAAA;AAAA,GACX;AAAA;AAAA,EAGA,kBAAoB,EAAA;AAAA,IAClB,KAAO,EAAA,oBAAA;AAAA,IACP,WACE,EAAA,6FAAA;AAAA,IACF,MAAQ,EAAA,WAAA;AAAA,IACR,OAAS,EAAA;AAAA,GACX;AAAA;AAAA,EAGA,MAAQ,EAAA;AAAA,IACN,uBACE,EAAA,yDAAA;AAAA,IACF,kBAAoB,EAAA,4CAAA;AAAA,IACpB,UAAY,EAAA,sCAAA;AAAA,IACZ,qBAAuB,EAAA,yBAAA;AAAA,IACvB,iBAAmB,EAAA,oBAAA;AAAA,IACnB,iBAAmB,EAAA,oBAAA;AAAA,IACnB,WAAa,EAAA,eAAA;AAAA,IACb,mBAAqB,EAAA,sBAAA;AAAA,IACrB,wBACE,EAAA,2FAAA;AAAA,IACF,4BAA8B,EAAA,mCAAA;AAAA,IAC9B,kBACE,EAAA,8FAAA;AAAA,IACF,0BAA4B,EAAA;AAAA,GAC9B;AAAA;AAAA,EAGA,MAAQ,EAAA;AAAA,IACN,iBAAmB,EAAA;AAAA,MACjB,KAAO,EAAA,iBAAA;AAAA,MACP,WACE,EAAA;AAAA,KACJ;AAAA,IACA,kBAAoB,EAAA;AAAA,MAClB,KAAO,EAAA,4BAAA;AAAA,MACP,WACE,EAAA;AAAA;AACJ,GACF;AAAA;AAAA,EAGA,UAAY,EAAA;AAAA,IACV,OAAS,EAAA,SAAA;AAAA,IACT,OAAS,EAAA,SAAA;AAAA,IACT,KAAO,EAAA,OAAA;AAAA,IACP,UAAY,EAAA,mCAAA;AAAA,IACZ,YAAc,EAAA,kBAAA;AAAA,IACd,cAAgB,EAAA;AAAA;AAEpB;AAMO,MAAM,0BAA0B,oBAAqB,CAAA;AAAA,EAC1D,EAAI,EAAA,kBAAA;AAAA,EACJ,QAAU,EAAA;AACZ,CAAC;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@red-hat-developer-hub/backstage-plugin-scorecard",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.5",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"main": "./dist/index.esm.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"@backstage/theme": "^0.7.0",
|
|
64
64
|
"@mui/icons-material": "5.18.0",
|
|
65
65
|
"@mui/material": "5.18.0",
|
|
66
|
-
"@red-hat-developer-hub/backstage-plugin-scorecard-common": "^2.3.
|
|
66
|
+
"@red-hat-developer-hub/backstage-plugin-scorecard-common": "^2.3.5",
|
|
67
67
|
"react-use": "^17.2.4",
|
|
68
68
|
"recharts": "^3.3.0"
|
|
69
69
|
},
|