@red-hat-developer-hub/backstage-plugin-scorecard 2.5.1 → 2.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/dist/alpha/extensions/homePageCards.esm.js +35 -1
- package/dist/alpha/extensions/homePageCards.esm.js.map +1 -1
- package/dist/alpha.d.ts +1 -1
- package/dist/alpha.esm.js +4 -2
- package/dist/alpha.esm.js.map +1 -1
- package/dist/components/Scorecard/CustomLegend.esm.js +1 -2
- package/dist/components/Scorecard/CustomLegend.esm.js.map +1 -1
- package/dist/components/Scorecard/EntityScorecardContent.esm.js +16 -8
- package/dist/components/Scorecard/EntityScorecardContent.esm.js.map +1 -1
- package/dist/components/Scorecard/Scorecard.esm.js +23 -10
- package/dist/components/Scorecard/Scorecard.esm.js.map +1 -1
- package/dist/components/ScorecardIcon/ScorecardIcon.esm.js +9 -1
- package/dist/components/ScorecardIcon/ScorecardIcon.esm.js.map +1 -1
- package/dist/hooks/useMetricDisplayLabels.esm.js +10 -9
- package/dist/hooks/useMetricDisplayLabels.esm.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/translations/de.esm.js +4 -0
- 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 +4 -0
- 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 +6 -0
- package/dist/translations/ref.esm.js.map +1 -1
- package/dist/types/{index.d-N3BD4rEg.d.ts → index.d-WA6f0Uad.d.ts} +4 -0
- package/dist/utils/translationUtils.esm.js +17 -0
- package/dist/utils/translationUtils.esm.js.map +1 -0
- 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.6.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 4ecaacd: Add support for batch metric providers, allowing a single provider to handle multiple metrics efficiently. Introduce a new backend module for configurable file existence checks (filecheck.\*) that verify whether required files (like README, LICENSE, or CODEOWNERS) are present in a repository.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- @red-hat-developer-hub/backstage-plugin-scorecard-common@2.6.0
|
|
12
|
+
|
|
13
|
+
## 2.5.2
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- 501e099: Removed Backstage registration requirement for default Scorecard icons
|
|
18
|
+
- @red-hat-developer-hub/backstage-plugin-scorecard-common@2.5.2
|
|
19
|
+
|
|
3
20
|
## 2.5.1
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
|
@@ -26,6 +26,12 @@ function AggregatedCardWithJiraOpenIssuesContent() {
|
|
|
26
26
|
function AggregatedCardWithGithubOpenPrsContent() {
|
|
27
27
|
return /* @__PURE__ */ jsx(ScorecardHomepageCardWithProvider, { aggregationId: "openPrsKpi" });
|
|
28
28
|
}
|
|
29
|
+
function AggregatedCardWithGithubFilecheckLicenseContent() {
|
|
30
|
+
return /* @__PURE__ */ jsx(ScorecardHomepageCardWithProvider, { aggregationId: "licenseFileExistsKpi" });
|
|
31
|
+
}
|
|
32
|
+
function AggregatedCardWithGithubFilecheckCodeownersContent() {
|
|
33
|
+
return /* @__PURE__ */ jsx(ScorecardHomepageCardWithProvider, { aggregationId: "filecheck.codeowners" });
|
|
34
|
+
}
|
|
29
35
|
function BorderlessHomeWidgetRenderer({ Content }) {
|
|
30
36
|
return /* @__PURE__ */ jsx(Content, {});
|
|
31
37
|
}
|
|
@@ -85,6 +91,34 @@ const aggregatedCardWithGithubOpenPrsWidget = HomePageWidgetBlueprint.make({
|
|
|
85
91
|
})
|
|
86
92
|
}
|
|
87
93
|
});
|
|
94
|
+
const aggregatedCardWithGithubFilecheckLicenseWidget = HomePageWidgetBlueprint.make({
|
|
95
|
+
name: "scorecard-github-filecheck-license",
|
|
96
|
+
params: {
|
|
97
|
+
name: "AggregatedCardWithGithubFilecheckLicense",
|
|
98
|
+
title: "Scorecard: LICENSE file exists",
|
|
99
|
+
layout: defaultCardLayout,
|
|
100
|
+
componentProps: {
|
|
101
|
+
Renderer: BorderlessHomeWidgetRenderer
|
|
102
|
+
},
|
|
103
|
+
components: () => Promise.resolve({
|
|
104
|
+
Content: AggregatedCardWithGithubFilecheckLicenseContent
|
|
105
|
+
})
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
const aggregatedCardWithGithubFilecheckCodeownersWidget = HomePageWidgetBlueprint.make({
|
|
109
|
+
name: "scorecard-github-filecheck-codeowners",
|
|
110
|
+
params: {
|
|
111
|
+
name: "AggregatedCardWithGithubFilecheckCodeowners",
|
|
112
|
+
title: "Scorecard: CODEOWNERS file exists",
|
|
113
|
+
layout: defaultCardLayout,
|
|
114
|
+
componentProps: {
|
|
115
|
+
Renderer: BorderlessHomeWidgetRenderer
|
|
116
|
+
},
|
|
117
|
+
components: () => Promise.resolve({
|
|
118
|
+
Content: AggregatedCardWithGithubFilecheckCodeownersContent
|
|
119
|
+
})
|
|
120
|
+
}
|
|
121
|
+
});
|
|
88
122
|
|
|
89
|
-
export { aggregatedCardWithDefaultAggregationWidget, aggregatedCardWithDeprecatedMetricIdWidget, aggregatedCardWithGithubOpenPrsWidget, aggregatedCardWithJiraOpenIssuesWidget };
|
|
123
|
+
export { aggregatedCardWithDefaultAggregationWidget, aggregatedCardWithDeprecatedMetricIdWidget, aggregatedCardWithGithubFilecheckCodeownersWidget, aggregatedCardWithGithubFilecheckLicenseWidget, aggregatedCardWithGithubOpenPrsWidget, aggregatedCardWithJiraOpenIssuesWidget };
|
|
90
124
|
//# sourceMappingURL=homePageCards.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"homePageCards.esm.js","sources":["../../../src/alpha/extensions/homePageCards.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 { HomePageWidgetBlueprint } from '@backstage/plugin-home-react/alpha';\nimport type { RendererProps } from '@backstage/plugin-home-react';\nimport { ScorecardHomepageCardWithProvider } from '../../components/ScorecardHomepageSection';\n\nconst defaultCardLayout = {\n width: {\n minColumns: 3,\n maxColumns: 12,\n defaultColumns: 4,\n },\n height: {\n minRows: 5,\n maxRows: 12,\n defaultRows: 6,\n },\n} as const;\n\nfunction AggregatedCardWithDeprecatedMetricIdContent() {\n return <ScorecardHomepageCardWithProvider metricId=\"jira.open_issues\" />;\n}\n\nfunction AggregatedCardWithDefaultAggregationContent() {\n return <ScorecardHomepageCardWithProvider aggregationId=\"github.open_prs\" />;\n}\n\nfunction AggregatedCardWithJiraOpenIssuesContent() {\n return <ScorecardHomepageCardWithProvider aggregationId=\"openIssuesKpi\" />;\n}\n\nfunction AggregatedCardWithGithubOpenPrsContent() {\n return <ScorecardHomepageCardWithProvider aggregationId=\"openPrsKpi\" />;\n}\n\nfunction BorderlessHomeWidgetRenderer({ Content }: RendererProps) {\n return <Content />;\n}\n\n/**\n * NFS widget: AggregatedCardWithDeprecatedMetricId.\n * @alpha\n */\nexport const aggregatedCardWithDeprecatedMetricIdWidget =\n HomePageWidgetBlueprint.make({\n name: 'scorecard-deprecated-metric-id',\n params: {\n name: 'AggregatedCardWithDeprecatedMetricId',\n title: 'Scorecard: With deprecated metricId property (Jira)',\n layout: defaultCardLayout,\n componentProps: {\n Renderer: BorderlessHomeWidgetRenderer,\n },\n components: () =>\n Promise.resolve({\n Content: AggregatedCardWithDeprecatedMetricIdContent,\n }),\n },\n });\n\n/**\n * NFS widget: AggregatedCardWithDefaultAggregation.\n * @alpha\n */\nexport const aggregatedCardWithDefaultAggregationWidget =\n HomePageWidgetBlueprint.make({\n name: 'scorecard-default-aggregation',\n params: {\n name: 'AggregatedCardWithDefaultAggregation',\n title: 'Scorecard: With default aggregation config (GitHub)',\n layout: defaultCardLayout,\n componentProps: {\n Renderer: BorderlessHomeWidgetRenderer,\n },\n components: () =>\n Promise.resolve({\n Content: AggregatedCardWithDefaultAggregationContent,\n }),\n },\n });\n\n/**\n * NFS widget: AggregatedCardWithJiraOpenIssues.\n * @alpha\n */\nexport const aggregatedCardWithJiraOpenIssuesWidget =\n HomePageWidgetBlueprint.make({\n name: 'scorecard-jira-open-issues',\n params: {\n name: 'AggregatedCardWithJiraOpenIssues',\n title: 'Scorecard: Jira open blocking tickets',\n layout: defaultCardLayout,\n componentProps: {\n Renderer: BorderlessHomeWidgetRenderer,\n },\n components: () =>\n Promise.resolve({\n Content: AggregatedCardWithJiraOpenIssuesContent,\n }),\n },\n });\n\n/**\n * NFS widget: AggregatedCardWithGithubOpenPrs.\n * @alpha\n */\nexport const aggregatedCardWithGithubOpenPrsWidget =\n HomePageWidgetBlueprint.make({\n name: 'scorecard-github-open-prs',\n params: {\n name: 'AggregatedCardWithGithubOpenPrs',\n title: 'Scorecard: GitHub open PRs',\n layout: defaultCardLayout,\n componentProps: {\n Renderer: BorderlessHomeWidgetRenderer,\n },\n components: () =>\n Promise.resolve({\n Content: AggregatedCardWithGithubOpenPrsContent,\n }),\n },\n });\n"],"names":[],"mappings":";;;;AAoBA,MAAM,iBAAoB,GAAA;AAAA,EACxB,KAAO,EAAA;AAAA,IACL,UAAY,EAAA,CAAA;AAAA,IACZ,UAAY,EAAA,EAAA;AAAA,IACZ,cAAgB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AAA,IACP,MAAQ,EAAA,iBAAA;AAAA,IACR,cAAgB,EAAA;AAAA,MACd,QAAU,EAAA;AAAA,KACZ;AAAA,IACA,UAAA,EAAY,MACV,OAAA,CAAQ,OAAQ,CAAA;AAAA,MACd,OAAS,EAAA;AAAA,KACV;AAAA;AAEP,CAAC;AAMU,MAAA,sCAAA,GACX,wBAAwB,IAAK,CAAA;AAAA,EAC3B,IAAM,EAAA,4BAAA;AAAA,EACN,MAAQ,EAAA;AAAA,IACN,IAAM,EAAA,kCAAA;AAAA,IACN,KAAO,EAAA,uCAAA;AAAA,IACP,MAAQ,EAAA,iBAAA;AAAA,IACR,cAAgB,EAAA;AAAA,MACd,QAAU,EAAA;AAAA,KACZ;AAAA,IACA,UAAA,EAAY,MACV,OAAA,CAAQ,OAAQ,CAAA;AAAA,MACd,OAAS,EAAA;AAAA,KACV;AAAA;AAEP,CAAC;AAMU,MAAA,qCAAA,GACX,wBAAwB,IAAK,CAAA;AAAA,EAC3B,IAAM,EAAA,2BAAA;AAAA,EACN,MAAQ,EAAA;AAAA,IACN,IAAM,EAAA,iCAAA;AAAA,IACN,KAAO,EAAA,4BAAA;AAAA,IACP,MAAQ,EAAA,iBAAA;AAAA,IACR,cAAgB,EAAA;AAAA,MACd,QAAU,EAAA;AAAA,KACZ;AAAA,IACA,UAAA,EAAY,MACV,OAAA,CAAQ,OAAQ,CAAA;AAAA,MACd,OAAS,EAAA;AAAA,KACV;AAAA;AAEP,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"homePageCards.esm.js","sources":["../../../src/alpha/extensions/homePageCards.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 { HomePageWidgetBlueprint } from '@backstage/plugin-home-react/alpha';\nimport type { RendererProps } from '@backstage/plugin-home-react';\nimport { ScorecardHomepageCardWithProvider } from '../../components/ScorecardHomepageSection';\n\nconst defaultCardLayout = {\n width: {\n minColumns: 3,\n maxColumns: 12,\n defaultColumns: 4,\n },\n height: {\n minRows: 5,\n maxRows: 12,\n defaultRows: 6,\n },\n} as const;\n\nfunction AggregatedCardWithDeprecatedMetricIdContent() {\n return <ScorecardHomepageCardWithProvider metricId=\"jira.open_issues\" />;\n}\n\nfunction AggregatedCardWithDefaultAggregationContent() {\n return <ScorecardHomepageCardWithProvider aggregationId=\"github.open_prs\" />;\n}\n\nfunction AggregatedCardWithJiraOpenIssuesContent() {\n return <ScorecardHomepageCardWithProvider aggregationId=\"openIssuesKpi\" />;\n}\n\nfunction AggregatedCardWithGithubOpenPrsContent() {\n return <ScorecardHomepageCardWithProvider aggregationId=\"openPrsKpi\" />;\n}\n\nfunction AggregatedCardWithGithubFilecheckLicenseContent() {\n return (\n <ScorecardHomepageCardWithProvider aggregationId=\"licenseFileExistsKpi\" />\n );\n}\n\nfunction AggregatedCardWithGithubFilecheckCodeownersContent() {\n return (\n <ScorecardHomepageCardWithProvider aggregationId=\"filecheck.codeowners\" />\n );\n}\n\nfunction BorderlessHomeWidgetRenderer({ Content }: RendererProps) {\n return <Content />;\n}\n\n/**\n * NFS widget: AggregatedCardWithDeprecatedMetricId.\n * @alpha\n */\nexport const aggregatedCardWithDeprecatedMetricIdWidget =\n HomePageWidgetBlueprint.make({\n name: 'scorecard-deprecated-metric-id',\n params: {\n name: 'AggregatedCardWithDeprecatedMetricId',\n title: 'Scorecard: With deprecated metricId property (Jira)',\n layout: defaultCardLayout,\n componentProps: {\n Renderer: BorderlessHomeWidgetRenderer,\n },\n components: () =>\n Promise.resolve({\n Content: AggregatedCardWithDeprecatedMetricIdContent,\n }),\n },\n });\n\n/**\n * NFS widget: AggregatedCardWithDefaultAggregation.\n * @alpha\n */\nexport const aggregatedCardWithDefaultAggregationWidget =\n HomePageWidgetBlueprint.make({\n name: 'scorecard-default-aggregation',\n params: {\n name: 'AggregatedCardWithDefaultAggregation',\n title: 'Scorecard: With default aggregation config (GitHub)',\n layout: defaultCardLayout,\n componentProps: {\n Renderer: BorderlessHomeWidgetRenderer,\n },\n components: () =>\n Promise.resolve({\n Content: AggregatedCardWithDefaultAggregationContent,\n }),\n },\n });\n\n/**\n * NFS widget: AggregatedCardWithJiraOpenIssues.\n * @alpha\n */\nexport const aggregatedCardWithJiraOpenIssuesWidget =\n HomePageWidgetBlueprint.make({\n name: 'scorecard-jira-open-issues',\n params: {\n name: 'AggregatedCardWithJiraOpenIssues',\n title: 'Scorecard: Jira open blocking tickets',\n layout: defaultCardLayout,\n componentProps: {\n Renderer: BorderlessHomeWidgetRenderer,\n },\n components: () =>\n Promise.resolve({\n Content: AggregatedCardWithJiraOpenIssuesContent,\n }),\n },\n });\n\n/**\n * NFS widget: AggregatedCardWithGithubOpenPrs.\n * @alpha\n */\nexport const aggregatedCardWithGithubOpenPrsWidget =\n HomePageWidgetBlueprint.make({\n name: 'scorecard-github-open-prs',\n params: {\n name: 'AggregatedCardWithGithubOpenPrs',\n title: 'Scorecard: GitHub open PRs',\n layout: defaultCardLayout,\n componentProps: {\n Renderer: BorderlessHomeWidgetRenderer,\n },\n components: () =>\n Promise.resolve({\n Content: AggregatedCardWithGithubOpenPrsContent,\n }),\n },\n });\n\n/**\n * NFS widget: AggregatedCardWithGithubFilecheckLicense.\n * @alpha\n */\nexport const aggregatedCardWithGithubFilecheckLicenseWidget =\n HomePageWidgetBlueprint.make({\n name: 'scorecard-github-filecheck-license',\n params: {\n name: 'AggregatedCardWithGithubFilecheckLicense',\n title: 'Scorecard: LICENSE file exists',\n layout: defaultCardLayout,\n componentProps: {\n Renderer: BorderlessHomeWidgetRenderer,\n },\n components: () =>\n Promise.resolve({\n Content: AggregatedCardWithGithubFilecheckLicenseContent,\n }),\n },\n });\n\n/**\n * NFS widget: AggregatedCardWithGithubFilecheckCodeowners.\n * @alpha\n */\nexport const aggregatedCardWithGithubFilecheckCodeownersWidget =\n HomePageWidgetBlueprint.make({\n name: 'scorecard-github-filecheck-codeowners',\n params: {\n name: 'AggregatedCardWithGithubFilecheckCodeowners',\n title: 'Scorecard: CODEOWNERS file exists',\n layout: defaultCardLayout,\n componentProps: {\n Renderer: BorderlessHomeWidgetRenderer,\n },\n components: () =>\n Promise.resolve({\n Content: AggregatedCardWithGithubFilecheckCodeownersContent,\n }),\n },\n });\n"],"names":[],"mappings":";;;;AAoBA,MAAM,iBAAoB,GAAA;AAAA,EACxB,KAAO,EAAA;AAAA,IACL,UAAY,EAAA,CAAA;AAAA,IACZ,UAAY,EAAA,EAAA;AAAA,IACZ,cAAgB,EAAA;AAAA,GAClB;AAAA,EACA,MAAQ,EAAA;AAAA,IACN,OAAS,EAAA,CAAA;AAAA,IACT,OAAS,EAAA,EAAA;AAAA,IACT,WAAa,EAAA;AAAA;AAEjB,CAAA;AAEA,SAAS,2CAA8C,GAAA;AACrD,EAAO,uBAAA,GAAA,CAAC,iCAAkC,EAAA,EAAA,QAAA,EAAS,kBAAmB,EAAA,CAAA;AACxE;AAEA,SAAS,2CAA8C,GAAA;AACrD,EAAO,uBAAA,GAAA,CAAC,iCAAkC,EAAA,EAAA,aAAA,EAAc,iBAAkB,EAAA,CAAA;AAC5E;AAEA,SAAS,uCAA0C,GAAA;AACjD,EAAO,uBAAA,GAAA,CAAC,iCAAkC,EAAA,EAAA,aAAA,EAAc,eAAgB,EAAA,CAAA;AAC1E;AAEA,SAAS,sCAAyC,GAAA;AAChD,EAAO,uBAAA,GAAA,CAAC,iCAAkC,EAAA,EAAA,aAAA,EAAc,YAAa,EAAA,CAAA;AACvE;AAEA,SAAS,+CAAkD,GAAA;AACzD,EACE,uBAAA,GAAA,CAAC,iCAAkC,EAAA,EAAA,aAAA,EAAc,sBAAuB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react';
|
|
2
2
|
import * as _backstage_frontend_plugin_api from '@backstage/frontend-plugin-api';
|
|
3
3
|
import * as _backstage_core_plugin_api from '@backstage/core-plugin-api';
|
|
4
|
-
export { a as scorecardTranslationRef, s as scorecardTranslations } from './types/index.d-
|
|
4
|
+
export { a as scorecardTranslationRef, s as scorecardTranslations } from './types/index.d-WA6f0Uad.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* The primary Scorecard frontend plugin.
|
package/dist/alpha.esm.js
CHANGED
|
@@ -4,7 +4,7 @@ import { scorecardDrillDownRouteRef, rootRouteRef } from './routes.esm.js';
|
|
|
4
4
|
import { scorecardTranslations } from './translations/index.esm.js';
|
|
5
5
|
import { scorecardApi } from './alpha/extensions/api.esm.js';
|
|
6
6
|
import { scorecardEntityContent } from './alpha/extensions/entityTab.esm.js';
|
|
7
|
-
import { aggregatedCardWithDeprecatedMetricIdWidget, aggregatedCardWithDefaultAggregationWidget, aggregatedCardWithJiraOpenIssuesWidget, aggregatedCardWithGithubOpenPrsWidget } from './alpha/extensions/homePageCards.esm.js';
|
|
7
|
+
import { aggregatedCardWithDeprecatedMetricIdWidget, aggregatedCardWithDefaultAggregationWidget, aggregatedCardWithJiraOpenIssuesWidget, aggregatedCardWithGithubOpenPrsWidget, aggregatedCardWithGithubFilecheckLicenseWidget, aggregatedCardWithGithubFilecheckCodeownersWidget } from './alpha/extensions/homePageCards.esm.js';
|
|
8
8
|
import { scorecardPage } from './alpha/extensions/scorecardPage.esm.js';
|
|
9
9
|
export { scorecardTranslationRef } from './translations/ref.esm.js';
|
|
10
10
|
|
|
@@ -35,7 +35,9 @@ const scorecardHomeModule = createFrontendModule({
|
|
|
35
35
|
aggregatedCardWithDeprecatedMetricIdWidget,
|
|
36
36
|
aggregatedCardWithDefaultAggregationWidget,
|
|
37
37
|
aggregatedCardWithJiraOpenIssuesWidget,
|
|
38
|
-
aggregatedCardWithGithubOpenPrsWidget
|
|
38
|
+
aggregatedCardWithGithubOpenPrsWidget,
|
|
39
|
+
aggregatedCardWithGithubFilecheckLicenseWidget,
|
|
40
|
+
aggregatedCardWithGithubFilecheckCodeownersWidget
|
|
39
41
|
]
|
|
40
42
|
});
|
|
41
43
|
|
package/dist/alpha.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alpha.esm.js","sources":["../src/alpha/index.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 createFrontendModule,\n createFrontendPlugin,\n} from '@backstage/frontend-plugin-api';\nimport { TranslationBlueprint } from '@backstage/plugin-app-react';\nimport { rootRouteRef, scorecardDrillDownRouteRef } from '../routes';\nimport { scorecardTranslations } from '../translations';\nimport { scorecardApi } from './extensions/api';\nimport { scorecardEntityContent } from './extensions/entityTab';\nimport {\n aggregatedCardWithDeprecatedMetricIdWidget,\n aggregatedCardWithDefaultAggregationWidget,\n aggregatedCardWithGithubOpenPrsWidget,\n aggregatedCardWithJiraOpenIssuesWidget,\n} from './extensions/homePageCards';\nimport { scorecardPage } from './extensions/scorecardPage';\n\n/**\n * Extension for Scorecard translations.\n */\nconst scorecardTranslation = TranslationBlueprint.make({\n params: {\n resource: scorecardTranslations,\n },\n});\n\n/**\n * The primary Scorecard frontend plugin.\n * @alpha\n */\nexport default createFrontendPlugin({\n pluginId: 'scorecard',\n extensions: [scorecardApi, scorecardPage],\n routes: {\n root: rootRouteRef,\n drillDown: scorecardDrillDownRouteRef,\n },\n});\n\n/**\n * Catalog module that automatically injects the Scorecard tab into the Catalog.\n * @alpha\n */\nexport const scorecardCatalogModule = createFrontendModule({\n pluginId: 'catalog',\n extensions: [scorecardEntityContent],\n});\n\n/**\n * App module that automatically registers Scorecard translations.\n * @alpha\n */\nexport const scorecardTranslationsModule = createFrontendModule({\n pluginId: 'app',\n extensions: [scorecardTranslation],\n});\n\n/**\n * Home module that contributes scorecard homepage widget and layout.\n * @alpha\n */\nexport const scorecardHomeModule = createFrontendModule({\n pluginId: 'home',\n extensions: [\n aggregatedCardWithDeprecatedMetricIdWidget,\n aggregatedCardWithDefaultAggregationWidget,\n aggregatedCardWithJiraOpenIssuesWidget,\n aggregatedCardWithGithubOpenPrsWidget,\n ],\n});\n\n/**\n * Re-exporting translations for external usage.\n * @alpha\n */\nexport * from '../translations';\n"],"names":[],"mappings":";;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"alpha.esm.js","sources":["../src/alpha/index.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 createFrontendModule,\n createFrontendPlugin,\n} from '@backstage/frontend-plugin-api';\nimport { TranslationBlueprint } from '@backstage/plugin-app-react';\nimport { rootRouteRef, scorecardDrillDownRouteRef } from '../routes';\nimport { scorecardTranslations } from '../translations';\nimport { scorecardApi } from './extensions/api';\nimport { scorecardEntityContent } from './extensions/entityTab';\nimport {\n aggregatedCardWithDeprecatedMetricIdWidget,\n aggregatedCardWithDefaultAggregationWidget,\n aggregatedCardWithGithubOpenPrsWidget,\n aggregatedCardWithJiraOpenIssuesWidget,\n aggregatedCardWithGithubFilecheckLicenseWidget,\n aggregatedCardWithGithubFilecheckCodeownersWidget,\n} from './extensions/homePageCards';\nimport { scorecardPage } from './extensions/scorecardPage';\n\n/**\n * Extension for Scorecard translations.\n */\nconst scorecardTranslation = TranslationBlueprint.make({\n params: {\n resource: scorecardTranslations,\n },\n});\n\n/**\n * The primary Scorecard frontend plugin.\n * @alpha\n */\nexport default createFrontendPlugin({\n pluginId: 'scorecard',\n extensions: [scorecardApi, scorecardPage],\n routes: {\n root: rootRouteRef,\n drillDown: scorecardDrillDownRouteRef,\n },\n});\n\n/**\n * Catalog module that automatically injects the Scorecard tab into the Catalog.\n * @alpha\n */\nexport const scorecardCatalogModule = createFrontendModule({\n pluginId: 'catalog',\n extensions: [scorecardEntityContent],\n});\n\n/**\n * App module that automatically registers Scorecard translations.\n * @alpha\n */\nexport const scorecardTranslationsModule = createFrontendModule({\n pluginId: 'app',\n extensions: [scorecardTranslation],\n});\n\n/**\n * Home module that contributes scorecard homepage widget and layout.\n * @alpha\n */\nexport const scorecardHomeModule = createFrontendModule({\n pluginId: 'home',\n extensions: [\n aggregatedCardWithDeprecatedMetricIdWidget,\n aggregatedCardWithDefaultAggregationWidget,\n aggregatedCardWithJiraOpenIssuesWidget,\n aggregatedCardWithGithubOpenPrsWidget,\n aggregatedCardWithGithubFilecheckLicenseWidget,\n aggregatedCardWithGithubFilecheckCodeownersWidget,\n ],\n});\n\n/**\n * Re-exporting translations for external usage.\n * @alpha\n */\nexport * from '../translations';\n"],"names":[],"mappings":";;;;;;;;;;AAsCA,MAAM,oBAAA,GAAuB,qBAAqB,IAAK,CAAA;AAAA,EACrD,MAAQ,EAAA;AAAA,IACN,QAAU,EAAA;AAAA;AAEd,CAAC,CAAA;AAMD,YAAe,oBAAqB,CAAA;AAAA,EAClC,QAAU,EAAA,WAAA;AAAA,EACV,UAAA,EAAY,CAAC,YAAA,EAAc,aAAa,CAAA;AAAA,EACxC,MAAQ,EAAA;AAAA,IACN,IAAM,EAAA,YAAA;AAAA,IACN,SAAW,EAAA;AAAA;AAEf,CAAC,CAAA;AAMM,MAAM,yBAAyB,oBAAqB,CAAA;AAAA,EACzD,QAAU,EAAA,SAAA;AAAA,EACV,UAAA,EAAY,CAAC,sBAAsB;AACrC,CAAC;AAMM,MAAM,8BAA8B,oBAAqB,CAAA;AAAA,EAC9D,QAAU,EAAA,KAAA;AAAA,EACV,UAAA,EAAY,CAAC,oBAAoB;AACnC,CAAC;AAMM,MAAM,sBAAsB,oBAAqB,CAAA;AAAA,EACtD,QAAU,EAAA,MAAA;AAAA,EACV,UAAY,EAAA;AAAA,IACV,0CAAA;AAAA,IACA,0CAAA;AAAA,IACA,sCAAA;AAAA,IACA,qCAAA;AAAA,IACA,8CAAA;AAAA,IACA;AAAA;AAEJ,CAAC;;;;"}
|
|
@@ -61,8 +61,7 @@ const CustomLegend = (props) => {
|
|
|
61
61
|
const translated = t(`thresholds.${ruleKey}`, {});
|
|
62
62
|
return translated === `thresholds.${ruleKey}` ? ruleKey.charAt(0).toUpperCase() + ruleKey.slice(1) : translated;
|
|
63
63
|
})(),
|
|
64
|
-
|
|
65
|
-
ruleExpression && `${ruleExpression}`
|
|
64
|
+
ruleExpression && !/^==(?:true|false)$/.test(ruleExpression) && ` ${ruleExpression}`
|
|
66
65
|
]
|
|
67
66
|
}
|
|
68
67
|
)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CustomLegend.esm.js","sources":["../../../src/components/Scorecard/CustomLegend.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 ThresholdResult,\n ThresholdRule,\n} from '@red-hat-developer-hub/backstage-plugin-scorecard-common';\n\nimport Box from '@mui/material/Box';\nimport Typography from '@mui/material/Typography';\nimport { styled, useTheme } from '@mui/material/styles';\n\nimport { useTranslation } from '../../hooks/useTranslation';\nimport {\n getThresholdRuleColor,\n resolveStatusColor,\n SCORECARD_ERROR_STATE_COLOR,\n} from '../../utils';\n\nconst StyledLegend = styled(Box)(({ theme }) => ({\n display: 'flex',\n flexDirection: 'column',\n gap: theme.spacing(1),\n paddingLeft: theme.spacing(3.2),\n}));\n\nconst StyledLegendItem = styled(Box)(({ theme }) => ({\n display: 'flex',\n alignItems: 'center',\n gap: theme.spacing(1),\n}));\n\nconst StyledLegendColorBox = styled(Box)<{ color: string }>(({ color }) => ({\n width: '10px',\n height: '10px',\n backgroundColor: color,\n flexShrink: 0,\n}));\n\ntype CustomLegendProps = {\n thresholds?: ThresholdResult;\n};\n\nconst CustomLegend = (props: CustomLegendProps) => {\n const { thresholds } = props;\n const theme = useTheme();\n const { t } = useTranslation();\n\n if (\n !thresholds ||\n thresholds?.definition?.rules?.length === 0 ||\n thresholds?.definition?.rules === undefined\n ) {\n return (\n <StyledLegend>\n <StyledLegendItem>\n <StyledLegendColorBox color={theme.palette.grey['400']} /> --\n </StyledLegendItem>\n </StyledLegend>\n );\n }\n\n return (\n <StyledLegend>\n {thresholds?.definition?.rules?.map(\n ({ key: ruleKey, expression: ruleExpression }: ThresholdRule) => {\n return (\n <StyledLegendItem key={`legend-${ruleKey}`}>\n <StyledLegendColorBox\n data-testid={`legend-colorbox-${ruleKey}`}\n color={resolveStatusColor(\n theme,\n getThresholdRuleColor(\n thresholds.definition?.rules ?? [],\n ruleKey,\n ) ?? SCORECARD_ERROR_STATE_COLOR,\n )}\n />\n <Typography\n variant=\"body2\"\n sx={{ fontSize: '0.875rem', fontWeight: 400 }}\n >\n {(() => {\n const translated = t(`thresholds.${ruleKey}` as any, {});\n // If translation returns the ruleKey itself, fallback to capitalized ruleKey\n return translated === `thresholds.${ruleKey}`\n ? ruleKey.charAt(0).toUpperCase() + ruleKey.slice(1)\n : translated;\n })()}
|
|
1
|
+
{"version":3,"file":"CustomLegend.esm.js","sources":["../../../src/components/Scorecard/CustomLegend.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 ThresholdResult,\n ThresholdRule,\n} from '@red-hat-developer-hub/backstage-plugin-scorecard-common';\n\nimport Box from '@mui/material/Box';\nimport Typography from '@mui/material/Typography';\nimport { styled, useTheme } from '@mui/material/styles';\n\nimport { useTranslation } from '../../hooks/useTranslation';\nimport {\n getThresholdRuleColor,\n resolveStatusColor,\n SCORECARD_ERROR_STATE_COLOR,\n} from '../../utils';\n\nconst StyledLegend = styled(Box)(({ theme }) => ({\n display: 'flex',\n flexDirection: 'column',\n gap: theme.spacing(1),\n paddingLeft: theme.spacing(3.2),\n}));\n\nconst StyledLegendItem = styled(Box)(({ theme }) => ({\n display: 'flex',\n alignItems: 'center',\n gap: theme.spacing(1),\n}));\n\nconst StyledLegendColorBox = styled(Box)<{ color: string }>(({ color }) => ({\n width: '10px',\n height: '10px',\n backgroundColor: color,\n flexShrink: 0,\n}));\n\ntype CustomLegendProps = {\n thresholds?: ThresholdResult;\n};\n\nconst CustomLegend = (props: CustomLegendProps) => {\n const { thresholds } = props;\n const theme = useTheme();\n const { t } = useTranslation();\n\n if (\n !thresholds ||\n thresholds?.definition?.rules?.length === 0 ||\n thresholds?.definition?.rules === undefined\n ) {\n return (\n <StyledLegend>\n <StyledLegendItem>\n <StyledLegendColorBox color={theme.palette.grey['400']} /> --\n </StyledLegendItem>\n </StyledLegend>\n );\n }\n\n return (\n <StyledLegend>\n {thresholds?.definition?.rules?.map(\n ({ key: ruleKey, expression: ruleExpression }: ThresholdRule) => {\n return (\n <StyledLegendItem key={`legend-${ruleKey}`}>\n <StyledLegendColorBox\n data-testid={`legend-colorbox-${ruleKey}`}\n color={resolveStatusColor(\n theme,\n getThresholdRuleColor(\n thresholds.definition?.rules ?? [],\n ruleKey,\n ) ?? SCORECARD_ERROR_STATE_COLOR,\n )}\n />\n <Typography\n variant=\"body2\"\n sx={{ fontSize: '0.875rem', fontWeight: 400 }}\n >\n {(() => {\n const translated = t(`thresholds.${ruleKey}` as any, {});\n // If translation returns the ruleKey itself, fallback to capitalized ruleKey\n return translated === `thresholds.${ruleKey}`\n ? ruleKey.charAt(0).toUpperCase() + ruleKey.slice(1)\n : translated;\n })()}\n {ruleExpression &&\n !/^==(?:true|false)$/.test(ruleExpression) &&\n ` ${ruleExpression}`}\n </Typography>\n </StyledLegendItem>\n );\n },\n )}\n </StyledLegend>\n );\n};\n\nexport default CustomLegend;\n"],"names":[],"mappings":";;;;;;;;;;AAgCA,MAAM,eAAe,MAAO,CAAA,GAAG,EAAE,CAAC,EAAE,OAAa,MAAA;AAAA,EAC/C,OAAS,EAAA,MAAA;AAAA,EACT,aAAe,EAAA,QAAA;AAAA,EACf,GAAA,EAAK,KAAM,CAAA,OAAA,CAAQ,CAAC,CAAA;AAAA,EACpB,WAAA,EAAa,KAAM,CAAA,OAAA,CAAQ,GAAG;AAChC,CAAE,CAAA,CAAA;AAEF,MAAM,mBAAmB,MAAO,CAAA,GAAG,EAAE,CAAC,EAAE,OAAa,MAAA;AAAA,EACnD,OAAS,EAAA,MAAA;AAAA,EACT,UAAY,EAAA,QAAA;AAAA,EACZ,GAAA,EAAK,KAAM,CAAA,OAAA,CAAQ,CAAC;AACtB,CAAE,CAAA,CAAA;AAEF,MAAM,uBAAuB,MAAO,CAAA,GAAG,EAAqB,CAAC,EAAE,OAAa,MAAA;AAAA,EAC1E,KAAO,EAAA,MAAA;AAAA,EACP,MAAQ,EAAA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,OAAA;AAAA,YACR,EAAI,EAAA,EAAE,QAAU,EAAA,UAAA,EAAY,YAAY,GAAI,EAAA;AAAA,YAE1C,QAAA,EAAA;AAAA,cAAM,CAAA,MAAA;AACN,gBAAA,MAAM,aAAa,CAAE,CAAA,CAAA,WAAA,EAAc,OAAO,CAAA,CAAA,EAAW,EAAE,CAAA;AAEvD,gBAAA,OAAO,UAAe,KAAA,CAAA,WAAA,EAAc,OAAO,CAAA,CAAA,GACvC,OAAQ,CAAA,MAAA,CAAO,CAAC,CAAA,CAAE,WAAY,EAAA,GAAI,OAAQ,CAAA,KAAA,CAAM,CAAC,CACjD,GAAA,UAAA;AAAA,eACH,GAAA;AAAA,cACF,kBACC,CAAC,oBAAA,CAAqB,KAAK,cAAc,CAAA,IACzC,IAAI,cAAc,CAAA;AAAA;AAAA;AAAA;AACtB,OAzBqB,EAAA,EAAA,CAAA,OAAA,EAAU,OAAO,CA0BxC,CAAA,CAAA;AAAA;AAEJ,GAEJ,EAAA,CAAA;AAEJ;;;;"}
|
|
@@ -7,6 +7,7 @@ import { useScorecards } from '../../hooks/useScorecards.esm.js';
|
|
|
7
7
|
import 'date-fns';
|
|
8
8
|
import { getStatusConfig } from '../../utils/statusUtils.esm.js';
|
|
9
9
|
import '@red-hat-developer-hub/backstage-plugin-scorecard-common';
|
|
10
|
+
import { resolveMetricTranslation } from '../../utils/translationUtils.esm.js';
|
|
10
11
|
import PermissionRequiredState from '../Common/PermissionRequiredState.esm.js';
|
|
11
12
|
import { useTranslation } from '../../hooks/useTranslation.esm.js';
|
|
12
13
|
import { CardLoading } from '../Common/CardLoading.esm.js';
|
|
@@ -42,20 +43,27 @@ const EntityScorecardContent = () => {
|
|
|
42
43
|
metricStatus: metric.status,
|
|
43
44
|
thresholdRules: metric.result.thresholdResult.definition?.rules
|
|
44
45
|
});
|
|
45
|
-
const
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
46
|
+
const title = resolveMetricTranslation(
|
|
47
|
+
t,
|
|
48
|
+
metric.id,
|
|
49
|
+
"title",
|
|
50
|
+
metric.metadata.title
|
|
51
|
+
);
|
|
52
|
+
const description = resolveMetricTranslation(
|
|
53
|
+
t,
|
|
54
|
+
metric.id,
|
|
55
|
+
"description",
|
|
56
|
+
metric.metadata.description
|
|
57
|
+
);
|
|
51
58
|
return /* @__PURE__ */ jsx(
|
|
52
59
|
Scorecard,
|
|
53
60
|
{
|
|
54
|
-
cardTitle:
|
|
55
|
-
description
|
|
61
|
+
cardTitle: title,
|
|
62
|
+
description,
|
|
56
63
|
statusColor: statusConfig.color,
|
|
57
64
|
statusIcon: statusConfig.icon ?? "",
|
|
58
65
|
value: metric.result?.value,
|
|
66
|
+
metricType: metric.metadata.type,
|
|
59
67
|
thresholds: metric.result?.thresholdResult,
|
|
60
68
|
isMetricDataError,
|
|
61
69
|
metricDataError: metric?.error,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EntityScorecardContent.esm.js","sources":["../../../src/components/Scorecard/EntityScorecardContent.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 { MetricResult } from '@red-hat-developer-hub/backstage-plugin-scorecard-common';\nimport { ResponseErrorPanel } from '@backstage/core-components';\n\nimport Box from '@mui/material/Box';\n\nimport NoScorecardsState from '../Common/NoScorecardsState';\nimport Scorecard from './Scorecard';\nimport { useScorecards } from '../../hooks/useScorecards';\nimport { getStatusConfig } from '../../utils';\nimport PermissionRequiredState from '../Common/PermissionRequiredState';\nimport { useTranslation } from '../../hooks/useTranslation';\nimport { CardLoading } from '../Common/CardLoading';\n\nexport const EntityScorecardContent = () => {\n const { data: scorecards, isLoading, error } = useScorecards();\n const { t } = useTranslation();\n\n if (isLoading) {\n return <CardLoading />;\n }\n\n if (error) {\n if (error.message?.includes('NotAllowedError')) {\n return <PermissionRequiredState />;\n }\n return <ResponseErrorPanel error={error} />;\n }\n\n if (!isLoading && scorecards?.length === 0) {\n return <NoScorecardsState />;\n }\n\n return (\n <Box\n display=\"flex\"\n flexWrap=\"wrap\"\n gap={2}\n sx={{ alignItems: 'flex-start' }}\n >\n {scorecards?.map((metric: MetricResult) => {\n // Check if metric data unavailable\n const isMetricDataError =\n metric.status === 'error' || metric.result?.value === null;\n\n // Check if threshold has an error\n const isThresholdError =\n metric.result?.thresholdResult?.status === 'error';\n\n const statusConfig = getStatusConfig({\n evaluation: metric.result?.thresholdResult?.evaluation,\n thresholdStatus: metric.result?.thresholdResult?.status,\n metricStatus: metric.status,\n thresholdRules: metric.result.thresholdResult.definition?.rules,\n });\n\n
|
|
1
|
+
{"version":3,"file":"EntityScorecardContent.esm.js","sources":["../../../src/components/Scorecard/EntityScorecardContent.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 { MetricResult } from '@red-hat-developer-hub/backstage-plugin-scorecard-common';\nimport { ResponseErrorPanel } from '@backstage/core-components';\n\nimport Box from '@mui/material/Box';\n\nimport NoScorecardsState from '../Common/NoScorecardsState';\nimport Scorecard from './Scorecard';\nimport { useScorecards } from '../../hooks/useScorecards';\nimport { getStatusConfig, resolveMetricTranslation } from '../../utils';\nimport PermissionRequiredState from '../Common/PermissionRequiredState';\nimport { useTranslation } from '../../hooks/useTranslation';\nimport { CardLoading } from '../Common/CardLoading';\n\nexport const EntityScorecardContent = () => {\n const { data: scorecards, isLoading, error } = useScorecards();\n const { t } = useTranslation();\n\n if (isLoading) {\n return <CardLoading />;\n }\n\n if (error) {\n if (error.message?.includes('NotAllowedError')) {\n return <PermissionRequiredState />;\n }\n return <ResponseErrorPanel error={error} />;\n }\n\n if (!isLoading && scorecards?.length === 0) {\n return <NoScorecardsState />;\n }\n\n return (\n <Box\n display=\"flex\"\n flexWrap=\"wrap\"\n gap={2}\n sx={{ alignItems: 'flex-start' }}\n >\n {scorecards?.map((metric: MetricResult) => {\n // Check if metric data unavailable\n const isMetricDataError =\n metric.status === 'error' || metric.result?.value === null;\n\n // Check if threshold has an error\n const isThresholdError =\n metric.result?.thresholdResult?.status === 'error';\n\n const statusConfig = getStatusConfig({\n evaluation: metric.result?.thresholdResult?.evaluation,\n thresholdStatus: metric.result?.thresholdResult?.status,\n metricStatus: metric.status,\n thresholdRules: metric.result.thresholdResult.definition?.rules,\n });\n\n const title = resolveMetricTranslation(\n t,\n metric.id,\n 'title',\n metric.metadata.title,\n );\n const description = resolveMetricTranslation(\n t,\n metric.id,\n 'description',\n metric.metadata.description,\n );\n\n return (\n <Scorecard\n key={metric.id}\n cardTitle={title}\n description={description}\n statusColor={statusConfig.color}\n statusIcon={statusConfig.icon ?? ''}\n value={metric.result?.value}\n metricType={metric.metadata.type}\n thresholds={metric.result?.thresholdResult}\n isMetricDataError={isMetricDataError}\n metricDataError={metric?.error}\n isThresholdError={isThresholdError}\n thresholdError={metric.result?.thresholdResult?.error}\n />\n );\n })}\n </Box>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;AA6BO,MAAM,yBAAyB,MAAM;AAC1C,EAAA,MAAM,EAAE,IAAM,EAAA,UAAA,EAAY,SAAW,EAAA,KAAA,KAAU,aAAc,EAAA;AAC7D,EAAM,MAAA,EAAE,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,MAAM,KAAQ,GAAA,wBAAA;AAAA,UACZ,CAAA;AAAA,UACA,MAAO,CAAA,EAAA;AAAA,UACP,OAAA;AAAA,UACA,OAAO,QAAS,CAAA;AAAA,SAClB;AACA,QAAA,MAAM,WAAc,GAAA,wBAAA;AAAA,UAClB,CAAA;AAAA,UACA,MAAO,CAAA,EAAA;AAAA,UACP,aAAA;AAAA,UACA,OAAO,QAAS,CAAA;AAAA,SAClB;AAEA,QACE,uBAAA,GAAA;AAAA,UAAC,SAAA;AAAA,UAAA;AAAA,YAEC,SAAW,EAAA,KAAA;AAAA,YACX,WAAA;AAAA,YACA,aAAa,YAAa,CAAA,KAAA;AAAA,YAC1B,UAAA,EAAY,aAAa,IAAQ,IAAA,EAAA;AAAA,YACjC,KAAA,EAAO,OAAO,MAAQ,EAAA,KAAA;AAAA,YACtB,UAAA,EAAY,OAAO,QAAS,CAAA,IAAA;AAAA,YAC5B,UAAA,EAAY,OAAO,MAAQ,EAAA,eAAA;AAAA,YAC3B,iBAAA;AAAA,YACA,iBAAiB,MAAQ,EAAA,KAAA;AAAA,YACzB,gBAAA;AAAA,YACA,cAAA,EAAgB,MAAO,CAAA,MAAA,EAAQ,eAAiB,EAAA;AAAA,WAAA;AAAA,UAX3C,MAAO,CAAA;AAAA,SAYd;AAAA,OAEH;AAAA;AAAA,GACH;AAEJ;;;;"}
|
|
@@ -18,6 +18,7 @@ const ScorecardCenterLabel = ({
|
|
|
18
18
|
cy,
|
|
19
19
|
statusIcon,
|
|
20
20
|
value,
|
|
21
|
+
metricType,
|
|
21
22
|
isErrorState,
|
|
22
23
|
errorLabel,
|
|
23
24
|
color,
|
|
@@ -40,19 +41,29 @@ const ScorecardCenterLabel = ({
|
|
|
40
41
|
(prev) => prev.yOffset === nextOffset && prev.height === nextHeight ? prev : { yOffset: nextOffset, height: nextHeight }
|
|
41
42
|
);
|
|
42
43
|
}, [isErrorState, errorLabel]);
|
|
44
|
+
const hasDisplayableValue = !isErrorState && metricType === "number";
|
|
43
45
|
return /* @__PURE__ */ jsxs("g", { transform: `translate(${cx}, ${cy})`, children: [
|
|
44
|
-
/* @__PURE__ */ jsx(
|
|
45
|
-
|
|
46
|
+
/* @__PURE__ */ jsx(
|
|
47
|
+
"foreignObject",
|
|
46
48
|
{
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
49
|
+
x: -12,
|
|
50
|
+
y: hasDisplayableValue ? -28 : -12,
|
|
51
|
+
width: 24,
|
|
52
|
+
height: 24,
|
|
53
|
+
children: /* @__PURE__ */ jsx(
|
|
54
|
+
ScorecardIcon,
|
|
55
|
+
{
|
|
56
|
+
icon: statusIcon,
|
|
57
|
+
size: "medium",
|
|
58
|
+
sx: {
|
|
59
|
+
fontSize: 24,
|
|
60
|
+
color
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
)
|
|
53
64
|
}
|
|
54
|
-
)
|
|
55
|
-
|
|
65
|
+
),
|
|
66
|
+
hasDisplayableValue && /* @__PURE__ */ jsx(
|
|
56
67
|
"text",
|
|
57
68
|
{
|
|
58
69
|
y: 12,
|
|
@@ -100,6 +111,7 @@ const Scorecard = ({
|
|
|
100
111
|
statusColor,
|
|
101
112
|
statusIcon,
|
|
102
113
|
value,
|
|
114
|
+
metricType,
|
|
103
115
|
thresholds,
|
|
104
116
|
isMetricDataError = false,
|
|
105
117
|
metricDataError,
|
|
@@ -198,6 +210,7 @@ const Scorecard = ({
|
|
|
198
210
|
cy: Number(cy),
|
|
199
211
|
statusIcon,
|
|
200
212
|
value,
|
|
213
|
+
metricType,
|
|
201
214
|
isErrorState,
|
|
202
215
|
errorLabel,
|
|
203
216
|
color: resolvedStatusColor,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Scorecard.esm.js","sources":["../../../src/components/Scorecard/Scorecard.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';\n\nimport {\n MetricValue,\n ThresholdResult,\n} from '@red-hat-developer-hub/backstage-plugin-scorecard-common';\n\nimport {\n PieChart,\n Pie,\n ResponsiveContainer,\n Cell,\n Legend,\n Tooltip,\n} from 'recharts';\nimport Box from '@mui/material/Box';\nimport { useTheme } from '@mui/material/styles';\n\nimport { useTranslation } from '../../hooks/useTranslation';\nimport { CardWrapper } from '../Common/CardWrapper';\nimport CustomLegend from './CustomLegend';\nimport { ScorecardIcon } from '../ScorecardIcon/ScorecardIcon';\nimport {\n getHeightForCenterLabel,\n getYOffsetForCenterLabel,\n resolveStatusColor,\n} from '../../utils';\nimport { ErrorTooltip } from '../Common/ErrorTooltip';\nimport type { PieData } from '../types';\n\ninterface ScorecardProps {\n cardTitle: string;\n description: string;\n statusColor: string;\n statusIcon: string;\n value: MetricValue | null;\n thresholds?: ThresholdResult;\n isMetricDataError?: boolean;\n metricDataError?: string;\n isThresholdError?: boolean;\n thresholdError?: string;\n}\n\nconst ScorecardCenterLabel = ({\n cx,\n cy,\n statusIcon,\n value,\n isErrorState,\n errorLabel,\n color,\n onLabelMouseEnter,\n onLabelMouseLeave,\n}: {\n cx: number;\n cy: number;\n statusIcon: string;\n value: MetricValue | null;\n isErrorState: boolean;\n errorLabel: string;\n color: string | undefined;\n onLabelMouseEnter: (e: React.MouseEvent) => void;\n onLabelMouseLeave: (e: React.MouseEvent) => void;\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 useLayoutEffect(() => {\n if (!isErrorState) return;\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 = getYOffsetForCenterLabel(lineCount);\n const nextHeight = getHeightForCenterLabel(lineCount);\n\n setLayout(prev =>\n prev.yOffset === nextOffset && prev.height === nextHeight\n ? prev\n : { yOffset: nextOffset, height: nextHeight },\n );\n }, [isErrorState, errorLabel]);\n\n return (\n <g transform={`translate(${cx}, ${cy})`}>\n <foreignObject x={-12} y={-28} width={24} height={24}>\n <ScorecardIcon\n icon={statusIcon}\n size=\"medium\"\n sx={{\n fontSize: 24,\n color,\n }}\n />\n </foreignObject>\n {!isErrorState && (\n <text\n y={12}\n textAnchor=\"middle\"\n dominantBaseline=\"middle\"\n fontSize={24}\n fontWeight={500}\n fill={color}\n >\n {value}\n </text>\n )}\n {isErrorState && (\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 cursor: 'pointer',\n }}\n onMouseEnter={onLabelMouseEnter}\n onMouseLeave={onLabelMouseLeave}\n >\n {errorLabel}\n </div>\n </foreignObject>\n )}\n </g>\n );\n};\n\nconst Scorecard = ({\n cardTitle,\n description,\n statusColor,\n statusIcon,\n value,\n thresholds,\n isMetricDataError = false,\n metricDataError,\n isThresholdError = false,\n thresholdError,\n}: ScorecardProps) => {\n const theme = useTheme();\n const { t } = useTranslation();\n\n const [isPieAreaActive, setIsPieAreaActive] = useState(false);\n\n const isErrorState = isMetricDataError || isThresholdError;\n\n const resolvedStatusColor = resolveStatusColor(theme, statusColor);\n\n const pieData: PieData[] = [\n { name: 'full', value: 100, color: resolvedStatusColor },\n ];\n\n return (\n <CardWrapper\n role=\"article\"\n title={cardTitle}\n description={description}\n width=\"371px\"\n >\n <Box\n width=\"100%\"\n height={160}\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 <ResponsiveContainer\n width=\"100%\"\n height={160}\n style={{\n outline: 'none',\n }}\n >\n <PieChart margin={{ top: 0, right: 0, bottom: 0, left: 0 }}>\n {/* This is the circle that is used to trigger the tooltip */}\n {isErrorState && (\n <g>\n <circle\n cx=\"22%\"\n cy=\"50%\"\n r={74}\n fill=\"transparent\"\n style={{ cursor: 'pointer' }}\n onMouseEnter={e => {\n setIsPieAreaActive(true);\n e.stopPropagation();\n }}\n onMouseLeave={e => {\n setIsPieAreaActive(false);\n e.stopPropagation();\n }}\n />\n </g>\n )}\n\n <Pie\n data={pieData}\n dataKey=\"value\"\n nameKey=\"name\"\n cx=\"22%\"\n cy=\"50%\"\n innerRadius={64}\n outerRadius={74}\n startAngle={90}\n endAngle={-270}\n stroke=\"none\"\n cursor={isErrorState ? 'pointer' : 'default'}\n isAnimationActive={false}\n style={{\n outline: 'none',\n }}\n labelLine={false}\n label={({ cx, cy }) => {\n if (cx === null || cy === null) return null;\n\n let errorLabel = '';\n if (isMetricDataError) {\n errorLabel = t('errors.metricDataUnavailable');\n } else if (isThresholdError) {\n errorLabel = t('errors.invalidThresholds');\n }\n\n return (\n <ScorecardCenterLabel\n cx={Number(cx)}\n cy={Number(cy)}\n statusIcon={statusIcon}\n value={value}\n isErrorState={isErrorState}\n errorLabel={errorLabel}\n color={resolvedStatusColor}\n onLabelMouseEnter={e => {\n setIsPieAreaActive(true);\n e.stopPropagation();\n }}\n onLabelMouseLeave={e => {\n setIsPieAreaActive(false);\n e.stopPropagation();\n }}\n />\n );\n }}\n onMouseEnter={() => {\n setIsPieAreaActive(true);\n }}\n onMouseLeave={() => {\n setIsPieAreaActive(false);\n }}\n >\n {pieData.map(entry => (\n <Cell key={entry.name} fill={entry.color} />\n ))}\n </Pie>\n\n <Legend\n layout=\"vertical\"\n align=\"center\"\n verticalAlign=\"middle\"\n wrapperStyle={{\n position: 'absolute',\n left: '160px',\n top: '42px',\n display: 'flex',\n alignItems: 'center',\n height: '76px',\n }}\n content={props => (\n <CustomLegend {...props} thresholds={thresholds} />\n )}\n />\n\n <Tooltip\n isAnimationActive={false}\n content={({ coordinate }) => {\n let errorTooltipTitle: string | undefined;\n if (isMetricDataError) {\n errorTooltipTitle = metricDataError;\n } else if (isThresholdError) {\n errorTooltipTitle = thresholdError;\n } else {\n errorTooltipTitle = undefined;\n }\n\n if (!isPieAreaActive || coordinate === undefined) return null;\n return (\n <ErrorTooltip\n title={errorTooltipTitle}\n tooltipPosition={{\n x: coordinate.x - 25,\n y: coordinate?.y - 16,\n }}\n />\n );\n }}\n />\n </PieChart>\n </ResponsiveContainer>\n </Box>\n </CardWrapper>\n );\n};\n\nexport default Scorecard;\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AA2DA,MAAM,uBAAuB,CAAC;AAAA,EAC5B,EAAA;AAAA,EACA,EAAA;AAAA,EACA,UAAA;AAAA,EACA,KAAA;AAAA,EACA,YAAA;AAAA,EACA,UAAA;AAAA,EACA,KAAA;AAAA,EACA,iBAAA;AAAA,EACA;AACF,CAUM,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,EAAA,eAAA,CAAgB,MAAM;AACpB,IAAA,IAAI,CAAC,YAAc,EAAA;AACnB,IAAA,MAAM,KAAK,OAAQ,CAAA,OAAA;AACnB,IAAA,IAAI,CAAC,EAAI,EAAA;AAET,IAAA,MAAM,eAAe,QAAW,GAAA,UAAA;AAChC,IAAA,MAAM,SAA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AAAA,kBAAA;AAAA,oBACC,iBAAmB,EAAA,KAAA;AAAA,oBACnB,OAAS,EAAA,CAAC,EAAE,UAAA,EAAiB,KAAA;AAC3B,sBAAI,IAAA,iBAAA;AACJ,sBAAA,IAAI,iBAAmB,EAAA;AACrB,wBAAoB,iBAAA,GAAA,eAAA;AAAA,iCACX,gBAAkB,EAAA;AAC3B,wBAAoB,iBAAA,GAAA,cAAA;AAAA,uBACf,MAAA;AACL,wBAAoB,iBAAA,GAAA,MAAA;AAAA;AAGtB,sBAAA,IAAI,CAAC,eAAA,IAAmB,UAAe,KAAA,MAAA,EAAkB,OAAA,IAAA;AACzD,sBACE,uBAAA,GAAA;AAAA,wBAAC,YAAA;AAAA,wBAAA;AAAA,0BACC,KAAO,EAAA,iBAAA;AAAA,0BACP,eAAiB,EAAA;AAAA,4BACf,CAAA,EAAG,WAAW,CAAI,GAAA,EAAA;AAAA,4BAClB,CAAA,EAAG,YAAY,CAAI,GAAA;AAAA;AACrB;AAAA,uBACF;AAAA;AAEJ;AAAA;AACF,eACF,EAAA;AAAA;AAAA;AACF;AAAA;AACF;AAAA,GACF;AAEJ;;;;"}
|
|
1
|
+
{"version":3,"file":"Scorecard.esm.js","sources":["../../../src/components/Scorecard/Scorecard.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';\n\nimport {\n MetricType,\n MetricValue,\n ThresholdResult,\n} from '@red-hat-developer-hub/backstage-plugin-scorecard-common';\n\nimport {\n PieChart,\n Pie,\n ResponsiveContainer,\n Cell,\n Legend,\n Tooltip,\n} from 'recharts';\nimport Box from '@mui/material/Box';\nimport { useTheme } from '@mui/material/styles';\n\nimport { useTranslation } from '../../hooks/useTranslation';\nimport { CardWrapper } from '../Common/CardWrapper';\nimport CustomLegend from './CustomLegend';\nimport { ScorecardIcon } from '../ScorecardIcon/ScorecardIcon';\nimport {\n getHeightForCenterLabel,\n getYOffsetForCenterLabel,\n resolveStatusColor,\n} from '../../utils';\nimport { ErrorTooltip } from '../Common/ErrorTooltip';\nimport type { PieData } from '../types';\n\ninterface ScorecardProps {\n cardTitle: string;\n description: string;\n statusColor: string;\n statusIcon: string;\n value: MetricValue | null;\n metricType: MetricType;\n thresholds?: ThresholdResult;\n isMetricDataError?: boolean;\n metricDataError?: string;\n isThresholdError?: boolean;\n thresholdError?: string;\n}\n\nconst ScorecardCenterLabel = ({\n cx,\n cy,\n statusIcon,\n value,\n metricType,\n isErrorState,\n errorLabel,\n color,\n onLabelMouseEnter,\n onLabelMouseLeave,\n}: {\n cx: number;\n cy: number;\n statusIcon: string;\n value: MetricValue | null;\n metricType: MetricType;\n isErrorState: boolean;\n errorLabel: string;\n color: string | undefined;\n onLabelMouseEnter: (e: React.MouseEvent) => void;\n onLabelMouseLeave: (e: React.MouseEvent) => void;\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 useLayoutEffect(() => {\n if (!isErrorState) return;\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 = getYOffsetForCenterLabel(lineCount);\n const nextHeight = getHeightForCenterLabel(lineCount);\n\n setLayout(prev =>\n prev.yOffset === nextOffset && prev.height === nextHeight\n ? prev\n : { yOffset: nextOffset, height: nextHeight },\n );\n }, [isErrorState, errorLabel]);\n\n const hasDisplayableValue = !isErrorState && metricType === 'number';\n\n return (\n <g transform={`translate(${cx}, ${cy})`}>\n <foreignObject\n x={-12}\n y={hasDisplayableValue ? -28 : -12}\n width={24}\n height={24}\n >\n <ScorecardIcon\n icon={statusIcon}\n size=\"medium\"\n sx={{\n fontSize: 24,\n color,\n }}\n />\n </foreignObject>\n {hasDisplayableValue && (\n <text\n y={12}\n textAnchor=\"middle\"\n dominantBaseline=\"middle\"\n fontSize={24}\n fontWeight={500}\n fill={color}\n >\n {value}\n </text>\n )}\n {isErrorState && (\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 cursor: 'pointer',\n }}\n onMouseEnter={onLabelMouseEnter}\n onMouseLeave={onLabelMouseLeave}\n >\n {errorLabel}\n </div>\n </foreignObject>\n )}\n </g>\n );\n};\n\nconst Scorecard = ({\n cardTitle,\n description,\n statusColor,\n statusIcon,\n value,\n metricType,\n thresholds,\n isMetricDataError = false,\n metricDataError,\n isThresholdError = false,\n thresholdError,\n}: ScorecardProps) => {\n const theme = useTheme();\n const { t } = useTranslation();\n\n const [isPieAreaActive, setIsPieAreaActive] = useState(false);\n\n const isErrorState = isMetricDataError || isThresholdError;\n\n const resolvedStatusColor = resolveStatusColor(theme, statusColor);\n\n const pieData: PieData[] = [\n { name: 'full', value: 100, color: resolvedStatusColor },\n ];\n\n return (\n <CardWrapper\n role=\"article\"\n title={cardTitle}\n description={description}\n width=\"371px\"\n >\n <Box\n width=\"100%\"\n height={160}\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 <ResponsiveContainer\n width=\"100%\"\n height={160}\n style={{\n outline: 'none',\n }}\n >\n <PieChart margin={{ top: 0, right: 0, bottom: 0, left: 0 }}>\n {/* This is the circle that is used to trigger the tooltip */}\n {isErrorState && (\n <g>\n <circle\n cx=\"22%\"\n cy=\"50%\"\n r={74}\n fill=\"transparent\"\n style={{ cursor: 'pointer' }}\n onMouseEnter={e => {\n setIsPieAreaActive(true);\n e.stopPropagation();\n }}\n onMouseLeave={e => {\n setIsPieAreaActive(false);\n e.stopPropagation();\n }}\n />\n </g>\n )}\n\n <Pie\n data={pieData}\n dataKey=\"value\"\n nameKey=\"name\"\n cx=\"22%\"\n cy=\"50%\"\n innerRadius={64}\n outerRadius={74}\n startAngle={90}\n endAngle={-270}\n stroke=\"none\"\n cursor={isErrorState ? 'pointer' : 'default'}\n isAnimationActive={false}\n style={{\n outline: 'none',\n }}\n labelLine={false}\n label={({ cx, cy }) => {\n if (cx === null || cy === null) return null;\n\n let errorLabel = '';\n if (isMetricDataError) {\n errorLabel = t('errors.metricDataUnavailable');\n } else if (isThresholdError) {\n errorLabel = t('errors.invalidThresholds');\n }\n\n return (\n <ScorecardCenterLabel\n cx={Number(cx)}\n cy={Number(cy)}\n statusIcon={statusIcon}\n value={value}\n metricType={metricType}\n isErrorState={isErrorState}\n errorLabel={errorLabel}\n color={resolvedStatusColor}\n onLabelMouseEnter={e => {\n setIsPieAreaActive(true);\n e.stopPropagation();\n }}\n onLabelMouseLeave={e => {\n setIsPieAreaActive(false);\n e.stopPropagation();\n }}\n />\n );\n }}\n onMouseEnter={() => {\n setIsPieAreaActive(true);\n }}\n onMouseLeave={() => {\n setIsPieAreaActive(false);\n }}\n >\n {pieData.map(entry => (\n <Cell key={entry.name} fill={entry.color} />\n ))}\n </Pie>\n\n <Legend\n layout=\"vertical\"\n align=\"center\"\n verticalAlign=\"middle\"\n wrapperStyle={{\n position: 'absolute',\n left: '160px',\n top: '42px',\n display: 'flex',\n alignItems: 'center',\n height: '76px',\n }}\n content={props => (\n <CustomLegend {...props} thresholds={thresholds} />\n )}\n />\n\n <Tooltip\n isAnimationActive={false}\n content={({ coordinate }) => {\n let errorTooltipTitle: string | undefined;\n if (isMetricDataError) {\n errorTooltipTitle = metricDataError;\n } else if (isThresholdError) {\n errorTooltipTitle = thresholdError;\n } else {\n errorTooltipTitle = undefined;\n }\n\n if (!isPieAreaActive || coordinate === undefined) return null;\n return (\n <ErrorTooltip\n title={errorTooltipTitle}\n tooltipPosition={{\n x: coordinate.x - 25,\n y: coordinate?.y - 16,\n }}\n />\n );\n }}\n />\n </PieChart>\n </ResponsiveContainer>\n </Box>\n </CardWrapper>\n );\n};\n\nexport default Scorecard;\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AA6DA,MAAM,uBAAuB,CAAC;AAAA,EAC5B,EAAA;AAAA,EACA,EAAA;AAAA,EACA,UAAA;AAAA,EACA,KAAA;AAAA,EACA,UAAA;AAAA,EACA,YAAA;AAAA,EACA,UAAA;AAAA,EACA,KAAA;AAAA,EACA,iBAAA;AAAA,EACA;AACF,CAWM,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,EAAA,eAAA,CAAgB,MAAM;AACpB,IAAA,IAAI,CAAC,YAAc,EAAA;AACnB,IAAA,MAAM,KAAK,OAAQ,CAAA,OAAA;AACnB,IAAA,IAAI,CAAC,EAAI,EAAA;AAET,IAAA,MAAM,eAAe,QAAW,GAAA,UAAA;AAChC,IAAA,MAAM,SAAY,GAAA,IAAA,CAAK,KAAM,CAAA,EAAA,CAAG,eAAe,YAAY,CAAA;AAE3D,IAAM,MAAA,UAAA,GAAa,yBAAyB,SAAS,CAAA;AACrD,IAAM,MAAA,UAAA,GAAa,wBAAwB,SAAS,CAAA;AAEpD,IAAA,SAAA;AAAA,MAAU,CACR,IAAA,KAAA,IAAA,CAAK,OAA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ACnB,OAAS,EAAA,CAAC,EAAE,UAAA,EAAiB,KAAA;AAC3B,sBAAI,IAAA,iBAAA;AACJ,sBAAA,IAAI,iBAAmB,EAAA;AACrB,wBAAoB,iBAAA,GAAA,eAAA;AAAA,iCACX,gBAAkB,EAAA;AAC3B,wBAAoB,iBAAA,GAAA,cAAA;AAAA,uBACf,MAAA;AACL,wBAAoB,iBAAA,GAAA,MAAA;AAAA;AAGtB,sBAAA,IAAI,CAAC,eAAA,IAAmB,UAAe,KAAA,MAAA,EAAkB,OAAA,IAAA;AACzD,sBACE,uBAAA,GAAA;AAAA,wBAAC,YAAA;AAAA,wBAAA;AAAA,0BACC,KAAO,EAAA,iBAAA;AAAA,0BACP,eAAiB,EAAA;AAAA,4BACf,CAAA,EAAG,WAAW,CAAI,GAAA,EAAA;AAAA,4BAClB,CAAA,EAAG,YAAY,CAAI,GAAA;AAAA;AACrB;AAAA,uBACF;AAAA;AAEJ;AAAA;AACF,eACF,EAAA;AAAA;AAAA;AACF;AAAA;AACF;AAAA,GACF;AAEJ;;;;"}
|
|
@@ -2,7 +2,15 @@ import { jsx } from 'react/jsx-runtime';
|
|
|
2
2
|
import { useApp } from '@backstage/core-plugin-api';
|
|
3
3
|
import Box from '@mui/material/Box';
|
|
4
4
|
import MuiIcon from '@mui/material/Icon';
|
|
5
|
+
import ScorecardErrorStatusIcon from '@mui/icons-material/DangerousOutlined';
|
|
6
|
+
import ScorecardWarningStatusIcon from '@mui/icons-material/WarningAmber';
|
|
7
|
+
import ScorecardSuccessStatusIcon from '@mui/icons-material/CheckCircleOutline';
|
|
5
8
|
|
|
9
|
+
const builtInIcons = {
|
|
10
|
+
scorecardSuccessStatusIcon: ScorecardSuccessStatusIcon,
|
|
11
|
+
scorecardWarningStatusIcon: ScorecardWarningStatusIcon,
|
|
12
|
+
scorecardErrorStatusIcon: ScorecardErrorStatusIcon
|
|
13
|
+
};
|
|
6
14
|
const ScorecardIcon = ({
|
|
7
15
|
icon,
|
|
8
16
|
size = "small",
|
|
@@ -12,7 +20,7 @@ const ScorecardIcon = ({
|
|
|
12
20
|
if (!icon) {
|
|
13
21
|
return null;
|
|
14
22
|
}
|
|
15
|
-
const SystemIcon = app.getSystemIcon(icon);
|
|
23
|
+
const SystemIcon = app.getSystemIcon(icon) ?? builtInIcons[icon];
|
|
16
24
|
if (SystemIcon) {
|
|
17
25
|
return /* @__PURE__ */ jsx(Box, { sx: { display: "flex", alignItems: "center", ...sx }, children: /* @__PURE__ */ jsx(SystemIcon, { fontSize: size }) });
|
|
18
26
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScorecardIcon.esm.js","sources":["../../../src/components/ScorecardIcon/ScorecardIcon.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 { useApp } from '@backstage/core-plugin-api';\nimport Box from '@mui/material/Box';\nimport MuiIcon from '@mui/material/Icon';\nimport type { SxProps, Theme } from '@mui/material/styles';\n\n/**\n * @public\n */\nexport interface ScorecardIconProps {\n icon: string;\n size?: 'small' | 'medium' | 'large';\n sx?: SxProps<Theme>;\n}\n\n/**\n * @public\n */\nexport const ScorecardIcon = ({\n icon,\n size = 'small',\n sx,\n}: ScorecardIconProps) => {\n const app = useApp();\n if (!icon) {\n return null;\n }\n\n const SystemIcon = app.getSystemIcon(icon);\n if (SystemIcon) {\n return (\n <Box sx={{ display: 'flex', alignItems: 'center', ...sx }}>\n <SystemIcon fontSize={size} />\n </Box>\n );\n }\n\n if (icon.startsWith('<svg')) {\n const svgDataUri = `data:image/svg+xml;base64,${btoa(icon)}`;\n return (\n <MuiIcon fontSize={size} sx={sx}>\n <img src={svgDataUri} alt=\"\" />\n </MuiIcon>\n );\n }\n\n if (\n icon.startsWith('data:') ||\n icon.startsWith('https://') ||\n icon.startsWith('http://') ||\n icon.startsWith('/')\n ) {\n return (\n <MuiIcon fontSize={size} baseClassName=\"material-icons-outlined\" sx={sx}>\n <img src={icon} alt=\"\" height=\"100%\" width=\"100%\" />\n </MuiIcon>\n );\n }\n\n return (\n <MuiIcon fontSize={size} baseClassName=\"material-icons-outlined\" sx={sx}>\n {icon}\n </MuiIcon>\n );\n};\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ScorecardIcon.esm.js","sources":["../../../src/components/ScorecardIcon/ScorecardIcon.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 { useApp } from '@backstage/core-plugin-api';\nimport Box from '@mui/material/Box';\nimport MuiIcon from '@mui/material/Icon';\nimport type { SvgIconComponent } from '@mui/icons-material';\nimport type { SxProps, Theme } from '@mui/material/styles';\nimport {\n ScorecardSuccessStatusIcon,\n ScorecardWarningStatusIcon,\n ScorecardErrorStatusIcon,\n} from '../..';\n\nconst builtInIcons: Record<string, SvgIconComponent> = {\n scorecardSuccessStatusIcon: ScorecardSuccessStatusIcon,\n scorecardWarningStatusIcon: ScorecardWarningStatusIcon,\n scorecardErrorStatusIcon: ScorecardErrorStatusIcon,\n};\n\n/**\n * @public\n */\nexport interface ScorecardIconProps {\n icon: string;\n size?: 'small' | 'medium' | 'large';\n sx?: SxProps<Theme>;\n}\n\n/**\n * @public\n */\nexport const ScorecardIcon = ({\n icon,\n size = 'small',\n sx,\n}: ScorecardIconProps) => {\n const app = useApp();\n if (!icon) {\n return null;\n }\n\n const SystemIcon = app.getSystemIcon(icon) ?? builtInIcons[icon];\n if (SystemIcon) {\n return (\n <Box sx={{ display: 'flex', alignItems: 'center', ...sx }}>\n <SystemIcon fontSize={size} />\n </Box>\n );\n }\n\n if (icon.startsWith('<svg')) {\n const svgDataUri = `data:image/svg+xml;base64,${btoa(icon)}`;\n return (\n <MuiIcon fontSize={size} sx={sx}>\n <img src={svgDataUri} alt=\"\" />\n </MuiIcon>\n );\n }\n\n if (\n icon.startsWith('data:') ||\n icon.startsWith('https://') ||\n icon.startsWith('http://') ||\n icon.startsWith('/')\n ) {\n return (\n <MuiIcon fontSize={size} baseClassName=\"material-icons-outlined\" sx={sx}>\n <img src={icon} alt=\"\" height=\"100%\" width=\"100%\" />\n </MuiIcon>\n );\n }\n\n return (\n <MuiIcon fontSize={size} baseClassName=\"material-icons-outlined\" sx={sx}>\n {icon}\n </MuiIcon>\n );\n};\n"],"names":[],"mappings":";;;;;;;;AA0BA,MAAM,YAAiD,GAAA;AAAA,EACrD,0BAA4B,EAAA,0BAAA;AAAA,EAC5B,0BAA4B,EAAA,0BAAA;AAAA,EAC5B,wBAA0B,EAAA;AAC5B,CAAA;AAcO,MAAM,gBAAgB,CAAC;AAAA,EAC5B,IAAA;AAAA,EACA,IAAO,GAAA,OAAA;AAAA,EACP;AACF,CAA0B,KAAA;AACxB,EAAA,MAAM,MAAM,MAAO,EAAA;AACnB,EAAA,IAAI,CAAC,IAAM,EAAA;AACT,IAAO,OAAA,IAAA;AAAA;AAGT,EAAA,MAAM,aAAa,GAAI,CAAA,aAAA,CAAc,IAAI,CAAA,IAAK,aAAa,IAAI,CAAA;AAC/D,EAAA,IAAI,UAAY,EAAA;AACd,IAAA,uBACG,GAAA,CAAA,GAAA,EAAA,EAAI,EAAI,EAAA,EAAE,SAAS,MAAQ,EAAA,UAAA,EAAY,QAAU,EAAA,GAAG,IACnD,EAAA,QAAA,kBAAA,GAAA,CAAC,UAAW,EAAA,EAAA,QAAA,EAAU,MAAM,CAC9B,EAAA,CAAA;AAAA;AAIJ,EAAI,IAAA,IAAA,CAAK,UAAW,CAAA,MAAM,CAAG,EAAA;AAC3B,IAAA,MAAM,UAAa,GAAA,CAAA,0BAAA,EAA6B,IAAK,CAAA,IAAI,CAAC,CAAA,CAAA;AAC1D,IACE,uBAAA,GAAA,CAAC,OAAQ,EAAA,EAAA,QAAA,EAAU,IAAM,EAAA,EAAA,EACvB,QAAC,kBAAA,GAAA,CAAA,KAAA,EAAA,EAAI,GAAK,EAAA,UAAA,EAAY,GAAI,EAAA,EAAA,EAAG,CAC/B,EAAA,CAAA;AAAA;AAIJ,EAAA,IACE,IAAK,CAAA,UAAA,CAAW,OAAO,CAAA,IACvB,KAAK,UAAW,CAAA,UAAU,CAC1B,IAAA,IAAA,CAAK,WAAW,SAAS,CAAA,IACzB,IAAK,CAAA,UAAA,CAAW,GAAG,CACnB,EAAA;AACA,IAAA,2BACG,OAAQ,EAAA,EAAA,QAAA,EAAU,IAAM,EAAA,aAAA,EAAc,2BAA0B,EAC/D,EAAA,QAAA,kBAAA,GAAA,CAAC,KAAI,EAAA,EAAA,GAAA,EAAK,MAAM,GAAI,EAAA,EAAA,EAAG,QAAO,MAAO,EAAA,KAAA,EAAM,QAAO,CACpD,EAAA,CAAA;AAAA;AAIJ,EAAA,2BACG,OAAQ,EAAA,EAAA,QAAA,EAAU,MAAM,aAAc,EAAA,yBAAA,EAA0B,IAC9D,QACH,EAAA,IAAA,EAAA,CAAA;AAEJ;;;;"}
|
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import { useTranslation } from './useTranslation.esm.js';
|
|
2
|
+
import 'date-fns';
|
|
3
|
+
import '@red-hat-developer-hub/backstage-plugin-scorecard-common';
|
|
4
|
+
import { resolveMetricTranslation } from '../utils/translationUtils.esm.js';
|
|
2
5
|
|
|
3
6
|
const useMetricDisplayLabels = (metric) => {
|
|
4
7
|
const { t } = useTranslation();
|
|
5
8
|
if (!metric) {
|
|
6
9
|
return { title: "", description: "" };
|
|
7
10
|
}
|
|
8
|
-
const { id, title: originalTitle, description: originalDescription } = metric;
|
|
9
|
-
const titleKey = `metric.${id}.title`;
|
|
10
|
-
const descriptionKey = `metric.${id}.description`;
|
|
11
|
-
const translatedTitle = t(titleKey, {});
|
|
12
|
-
const translatedDescription = t(descriptionKey, {});
|
|
13
|
-
const isTitleTranslated = translatedTitle !== titleKey;
|
|
14
|
-
const isDescriptionTranslated = translatedDescription !== descriptionKey;
|
|
15
11
|
return {
|
|
16
|
-
title:
|
|
17
|
-
description:
|
|
12
|
+
title: resolveMetricTranslation(t, metric.id, "title", metric.title),
|
|
13
|
+
description: resolveMetricTranslation(
|
|
14
|
+
t,
|
|
15
|
+
metric.id,
|
|
16
|
+
"description",
|
|
17
|
+
metric.description
|
|
18
|
+
)
|
|
18
19
|
};
|
|
19
20
|
};
|
|
20
21
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useMetricDisplayLabels.esm.js","sources":["../../src/hooks/useMetricDisplayLabels.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 { Metric } from '@red-hat-developer-hub/backstage-plugin-scorecard-common';\n\nimport { useTranslation } from './useTranslation';\n\nexport const useMetricDisplayLabels = (\n metric?: Pick<Metric, 'id' | 'title' | 'description'>,\n): {\n title: string;\n description: string;\n} => {\n const { t } = useTranslation();\n\n if (!metric) {\n return { title: '', description: '' };\n }\n\n
|
|
1
|
+
{"version":3,"file":"useMetricDisplayLabels.esm.js","sources":["../../src/hooks/useMetricDisplayLabels.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 { Metric } from '@red-hat-developer-hub/backstage-plugin-scorecard-common';\n\nimport { useTranslation } from './useTranslation';\nimport { resolveMetricTranslation } from '../utils';\n\nexport const useMetricDisplayLabels = (\n metric?: Pick<Metric, 'id' | 'title' | 'description'>,\n): {\n title: string;\n description: string;\n} => {\n const { t } = useTranslation();\n\n if (!metric) {\n return { title: '', description: '' };\n }\n\n return {\n title: resolveMetricTranslation(t, metric.id, 'title', metric.title),\n description: resolveMetricTranslation(\n t,\n metric.id,\n 'description',\n metric.description,\n ),\n };\n};\n"],"names":[],"mappings":";;;;;AAqBa,MAAA,sBAAA,GAAyB,CACpC,MAIG,KAAA;AACH,EAAM,MAAA,EAAE,CAAE,EAAA,GAAI,cAAe,EAAA;AAE7B,EAAA,IAAI,CAAC,MAAQ,EAAA;AACX,IAAA,OAAO,EAAE,KAAA,EAAO,EAAI,EAAA,WAAA,EAAa,EAAG,EAAA;AAAA;AAGtC,EAAO,OAAA;AAAA,IACL,OAAO,wBAAyB,CAAA,CAAA,EAAG,OAAO,EAAI,EAAA,OAAA,EAAS,OAAO,KAAK,CAAA;AAAA,IACnE,WAAa,EAAA,wBAAA;AAAA,MACX,CAAA;AAAA,MACA,MAAO,CAAA,EAAA;AAAA,MACP,aAAA;AAAA,MACA,MAAO,CAAA;AAAA;AACT,GACF;AACF;;;;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as _backstage_core_plugin_api from '@backstage/core-plugin-api';
|
|
3
|
-
export { a as scorecardTranslationRef, s as scorecardTranslations } from './types/index.d-
|
|
3
|
+
export { a as scorecardTranslationRef, s as scorecardTranslations } from './types/index.d-WA6f0Uad.js';
|
|
4
4
|
export { default as ScorecardSuccessStatusIcon } from '@mui/icons-material/CheckCircleOutline';
|
|
5
5
|
export { default as ScorecardWarningStatusIcon } from '@mui/icons-material/WarningAmber';
|
|
6
6
|
export { default as ScorecardErrorStatusIcon } from '@mui/icons-material/DangerousOutlined';
|
|
@@ -42,6 +42,8 @@ const scorecardTranslationDe = createTranslationMessages({
|
|
|
42
42
|
"metric.github.open_prs.description": "Aktuelle Anzahl offener Pull Requests f\xFCr ein bestimmtes GitHub-Repository.",
|
|
43
43
|
"metric.jira.open_issues.title": "Jira offene blockierende Tickets",
|
|
44
44
|
"metric.jira.open_issues.description": "Hervorhebt die Anzahl der kritischen, blockierenden Probleme, die derzeit in Jira offen sind.",
|
|
45
|
+
"metric.filecheck.title": "Dateipr\xFCfung: {{name}}",
|
|
46
|
+
"metric.filecheck.description": "Pr\xFCft, ob die Datei {{name}} im Repository vorhanden ist.",
|
|
45
47
|
"metric.lastUpdated": "Zuletzt aktualisiert: {{timestamp}}",
|
|
46
48
|
"metric.lastUpdatedNotAvailable": "Zuletzt aktualisiert: Nicht verf\xFCgbar",
|
|
47
49
|
"metric.someEntitiesNotReportingValues": "Einige Elemente melden keine Werte, die mit dieser Metrik in Verbindung stehen.",
|
|
@@ -49,6 +51,8 @@ const scorecardTranslationDe = createTranslationMessages({
|
|
|
49
51
|
"thresholds.success": "Erfolg",
|
|
50
52
|
"thresholds.warning": "Warnung",
|
|
51
53
|
"thresholds.error": "Fehler",
|
|
54
|
+
"thresholds.exist": "Vorhanden",
|
|
55
|
+
"thresholds.missing": "Fehlend",
|
|
52
56
|
"thresholds.noEntities": "Keine Elemente im {{category}}-Zustand",
|
|
53
57
|
"thresholds.entities_one": "{{count}} Element",
|
|
54
58
|
"thresholds.entities_other": "{{count}} Elemente",
|
|
@@ -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\n/**\n * de translation for plugin.scorecard.\n * @public\n */\nconst scorecardTranslationDe = createTranslationMessages({\n ref: scorecardTranslationRef,\n messages: {\n // Empty state translations\n 'emptyState.title': 'Noch keine Scorecards hinzugefügt',\n 'emptyState.description':\n 'Scorecards helfen Ihnen, den Zustand der Komponenten auf einen Blick zu überwachen. Schauen Sie sich zunächst unsere Dokumentation mit den Einrichtungshinweisen an.',\n 'emptyState.button': 'Dokumentation anzeigen',\n 'emptyState.altText': 'Keine Scorecards',\n\n // Permission required translations\n 'permissionRequired.title': 'Fehlende Berechtigung',\n 'permissionRequired.description':\n 'Wenn Sie das Scorecard-Plugin anzeigen möchten, wenden Sie sich an den Administrator, um die Berechtigung {{permission}} zu erhalten.',\n 'permissionRequired.button': 'Mehr erfahren',\n 'permissionRequired.altText': 'Berechtigung erforderlich',\n\n // Not found state\n 'notFound.title': '404 Diese Seite wurde nicht gefunden',\n 'notFound.description':\n 'Fügen Sie eine {{indexFile}}-Datei im Stammverzeichnis des docs-Ordners dieses Repositorys hinzu.',\n 'notFound.readMore': 'Mehr erfahren',\n 'notFound.goBack': 'Zurück',\n 'notFound.contactSupport': 'Support kontaktieren',\n 'notFound.altText': 'Seite nicht gefunden',\n\n // Error messages\n 'errors.entityMissingProperties':\n 'Für die Scorecard-Suche fehlen dem Element die erforderlichen Eigenschaften.',\n 'errors.missingAggregationId':\n 'Die Scorecard ist falsch konfiguriert; die Eigenschaft „Aggregations-ID“ (oder „Metrik-ID“) wurde nicht angegeben',\n 'errors.invalidApiResponse': 'Ungültiges Antwortformat 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': 'Fehlende Berechtigung',\n 'errors.noDataFound': 'Keine Daten gefunden',\n 'errors.authenticationError': 'Authentifizierungsfehler',\n 'errors.missingPermissionMessage':\n 'Um die Metriken der Scorecard einzusehen, muss Ihnen der Administrator die erforderliche Berechtigung erteilen.',\n 'errors.userNotFoundInCatalogMessage':\n 'Benutzer-Element nicht im Katalog gefunden.',\n 'errors.noDataFoundMessage':\n 'Um Ihre Daten hier anzuzeigen, überprüfen Sie, ob Ihre Elemente Werte melden, die mit dieser Metrik in Verbindung stehen.',\n 'errors.authenticationErrorMessage':\n 'Bitte melden Sie sich an, um Ihre Daten anzuzeigen.',\n 'errors.noMetricsFound':\n 'Keine Metriken für die angegebene Metrik-ID gefunden.',\n 'errors.multipleMetricsFound':\n 'Mehrere Metriken für die angegebene Metrik-ID gefunden. Genau eine erwartet.',\n\n // Metric translations\n 'metric.github.open_prs.title': 'GitHub PRs offen',\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 'Hervorhebt die Anzahl der kritischen, blockierenden Probleme, die derzeit in Jira offen sind.',\n 'metric.lastUpdated': 'Zuletzt aktualisiert: {{timestamp}}',\n 'metric.lastUpdatedNotAvailable': 'Zuletzt aktualisiert: Nicht verfügbar',\n 'metric.someEntitiesNotReportingValues':\n 'Einige Elemente melden keine Werte, die mit dieser Metrik in Verbindung stehen.',\n\n // Threshold translations\n 'thresholds.success': 'Erfolg',\n 'thresholds.warning': 'Warnung',\n 'thresholds.error': 'Fehler',\n 'thresholds.noEntities': 'Keine Elemente im {{category}}-Zustand',\n 'thresholds.entities_one': '{{count}} Element',\n 'thresholds.entities_other': '{{count}} Elemente',\n\n // Entities page translations\n 'entitiesPage.unknownMetric': 'Unbekannte Metrik',\n 'entitiesPage.noDataFound':\n 'Um Ihre Daten hier anzuzeigen, überprüfen Sie, ob Ihre Elemente Werte melden, die mit dieser Metrik in Verbindung stehen.',\n 'entitiesPage.missingPermission':\n 'Um die Metriken der Scorecard einzusehen, muss Ihnen der Administrator die erforderliche Berechtigung erteilen.',\n 'entitiesPage.metricProviderNotRegistered':\n 'Metrik-Anbieter mit ID {{metricId}} ist nicht registriert.',\n 'entitiesPage.entitiesTable.title': 'Elemente',\n 'entitiesPage.entitiesTable.unavailable': 'Nicht verfügbar',\n 'entitiesPage.entitiesTable.titleWithCount': 'Elemente ({{count}})',\n 'entitiesPage.entitiesTable.header.status': 'Status',\n 'entitiesPage.entitiesTable.header.value': 'Wert',\n 'entitiesPage.entitiesTable.header.entity': 'Element',\n 'entitiesPage.entitiesTable.header.owner': 'Eigentümer',\n 'entitiesPage.entitiesTable.header.kind': 'Art',\n 'entitiesPage.entitiesTable.header.lastUpdated': 'Zuletzt aktualisiert',\n 'entitiesPage.entitiesTable.footer.allRows': 'Alle Zeilen',\n 'entitiesPage.entitiesTable.footer.rows_one': '{{count}} Zeile',\n 'entitiesPage.entitiesTable.footer.rows_other': '{{count}} Zeilen',\n 'entitiesPage.entitiesTable.footer.of': 'von',\n },\n});\n\nexport default scorecardTranslationDe;\n"],"names":[],"mappings":";;;AAuBA,MAAM,yBAAyB,yBAA0B,CAAA;AAAA,EACvD,GAAK,EAAA,uBAAA;AAAA,EACL,QAA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AsB,EAAA,QAAA;AAAA,IACtB,oBAAsB,EAAA,SAAA;AAAA,IACtB,kBAAoB,EAAA,QAAA;AAAA,IACpB,uBAAyB,EAAA,wCAAA;AAAA,IACzB,yBAA2B,EAAA,mBAAA;AAAA,IAC3B,2BAA6B,EAAA,oBAAA;AAAA;AAAA,IAG7B,4BAA8B,EAAA,mBAAA;AAAA,IAC9B,0BACE,EAAA,iIAAA;AAAA,IACF,gCACE,EAAA,iHAAA;AAAA,IACF,0CACE,EAAA,4DAAA;AAAA,IACF,kCAAoC,EAAA,UAAA;AAAA,IACpC,wCAA0C,EAAA,oBAAA;AAAA,IAC1C,2CAA6C,EAAA,sBAAA;AAAA,IAC7C,0CAA4C,EAAA,QAAA;AAAA,IAC5C,yCAA2C,EAAA,MAAA;AAAA,IAC3C,0CAA4C,EAAA,SAAA;AAAA,IAC5C,yCAA2C,EAAA,eAAA;AAAA,IAC3C,wCAA0C,EAAA,KAAA;AAAA,IAC1C,+CAAiD,EAAA,sBAAA;AAAA,IACjD,2CAA6C,EAAA,aAAA;AAAA,IAC7C,4CAA8C,EAAA,iBAAA;AAAA,IAC9C,8CAAgD,EAAA,kBAAA;AAAA,IAChD,sCAAwC,EAAA;AAAA;AAE5C,CAAC;;;;"}
|
|
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\n/**\n * de translation for plugin.scorecard.\n * @public\n */\nconst scorecardTranslationDe = createTranslationMessages({\n ref: scorecardTranslationRef,\n messages: {\n // Empty state translations\n 'emptyState.title': 'Noch keine Scorecards hinzugefügt',\n 'emptyState.description':\n 'Scorecards helfen Ihnen, den Zustand der Komponenten auf einen Blick zu überwachen. Schauen Sie sich zunächst unsere Dokumentation mit den Einrichtungshinweisen an.',\n 'emptyState.button': 'Dokumentation anzeigen',\n 'emptyState.altText': 'Keine Scorecards',\n\n // Permission required translations\n 'permissionRequired.title': 'Fehlende Berechtigung',\n 'permissionRequired.description':\n 'Wenn Sie das Scorecard-Plugin anzeigen möchten, wenden Sie sich an den Administrator, um die Berechtigung {{permission}} zu erhalten.',\n 'permissionRequired.button': 'Mehr erfahren',\n 'permissionRequired.altText': 'Berechtigung erforderlich',\n\n // Not found state\n 'notFound.title': '404 Diese Seite wurde nicht gefunden',\n 'notFound.description':\n 'Fügen Sie eine {{indexFile}}-Datei im Stammverzeichnis des docs-Ordners dieses Repositorys hinzu.',\n 'notFound.readMore': 'Mehr erfahren',\n 'notFound.goBack': 'Zurück',\n 'notFound.contactSupport': 'Support kontaktieren',\n 'notFound.altText': 'Seite nicht gefunden',\n\n // Error messages\n 'errors.entityMissingProperties':\n 'Für die Scorecard-Suche fehlen dem Element die erforderlichen Eigenschaften.',\n 'errors.missingAggregationId':\n 'Die Scorecard ist falsch konfiguriert; die Eigenschaft „Aggregations-ID“ (oder „Metrik-ID“) wurde nicht angegeben',\n 'errors.invalidApiResponse': 'Ungültiges Antwortformat 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': 'Fehlende Berechtigung',\n 'errors.noDataFound': 'Keine Daten gefunden',\n 'errors.authenticationError': 'Authentifizierungsfehler',\n 'errors.missingPermissionMessage':\n 'Um die Metriken der Scorecard einzusehen, muss Ihnen der Administrator die erforderliche Berechtigung erteilen.',\n 'errors.userNotFoundInCatalogMessage':\n 'Benutzer-Element nicht im Katalog gefunden.',\n 'errors.noDataFoundMessage':\n 'Um Ihre Daten hier anzuzeigen, überprüfen Sie, ob Ihre Elemente Werte melden, die mit dieser Metrik in Verbindung stehen.',\n 'errors.authenticationErrorMessage':\n 'Bitte melden Sie sich an, um Ihre Daten anzuzeigen.',\n 'errors.noMetricsFound':\n 'Keine Metriken für die angegebene Metrik-ID gefunden.',\n 'errors.multipleMetricsFound':\n 'Mehrere Metriken für die angegebene Metrik-ID gefunden. Genau eine erwartet.',\n\n // Metric translations\n 'metric.github.open_prs.title': 'GitHub PRs offen',\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 'Hervorhebt die Anzahl der kritischen, blockierenden Probleme, die derzeit in Jira offen sind.',\n 'metric.filecheck.title': 'Dateiprüfung: {{name}}',\n 'metric.filecheck.description':\n 'Prüft, ob die Datei {{name}} im Repository vorhanden ist.',\n 'metric.lastUpdated': 'Zuletzt aktualisiert: {{timestamp}}',\n 'metric.lastUpdatedNotAvailable': 'Zuletzt aktualisiert: Nicht verfügbar',\n 'metric.someEntitiesNotReportingValues':\n 'Einige Elemente melden keine Werte, die mit dieser Metrik in Verbindung stehen.',\n\n // Threshold translations\n 'thresholds.success': 'Erfolg',\n 'thresholds.warning': 'Warnung',\n 'thresholds.error': 'Fehler',\n 'thresholds.exist': 'Vorhanden',\n 'thresholds.missing': 'Fehlend',\n 'thresholds.noEntities': 'Keine Elemente im {{category}}-Zustand',\n 'thresholds.entities_one': '{{count}} Element',\n 'thresholds.entities_other': '{{count}} Elemente',\n\n // Entities page translations\n 'entitiesPage.unknownMetric': 'Unbekannte Metrik',\n 'entitiesPage.noDataFound':\n 'Um Ihre Daten hier anzuzeigen, überprüfen Sie, ob Ihre Elemente Werte melden, die mit dieser Metrik in Verbindung stehen.',\n 'entitiesPage.missingPermission':\n 'Um die Metriken der Scorecard einzusehen, muss Ihnen der Administrator die erforderliche Berechtigung erteilen.',\n 'entitiesPage.metricProviderNotRegistered':\n 'Metrik-Anbieter mit ID {{metricId}} ist nicht registriert.',\n 'entitiesPage.entitiesTable.title': 'Elemente',\n 'entitiesPage.entitiesTable.unavailable': 'Nicht verfügbar',\n 'entitiesPage.entitiesTable.titleWithCount': 'Elemente ({{count}})',\n 'entitiesPage.entitiesTable.header.status': 'Status',\n 'entitiesPage.entitiesTable.header.value': 'Wert',\n 'entitiesPage.entitiesTable.header.entity': 'Element',\n 'entitiesPage.entitiesTable.header.owner': 'Eigentümer',\n 'entitiesPage.entitiesTable.header.kind': 'Art',\n 'entitiesPage.entitiesTable.header.lastUpdated': 'Zuletzt aktualisiert',\n 'entitiesPage.entitiesTable.footer.allRows': 'Alle Zeilen',\n 'entitiesPage.entitiesTable.footer.rows_one': '{{count}} Zeile',\n 'entitiesPage.entitiesTable.footer.rows_other': '{{count}} Zeilen',\n 'entitiesPage.entitiesTable.footer.of': 'von',\n },\n});\n\nexport default scorecardTranslationDe;\n"],"names":[],"mappings":";;;AAuBA,MAAM,yBAAyB,yBAA0B,CAAA;AAAA,EACvD,GAAK,EAAA,uBAAA;AAAA,EACL,QAAU,EAAA;AAAA;AAAA,IAER,kBAAoB,EAAA,sCAAA;AAAA,IACpB,wBACE,EAAA,4KAAA;AAAA,IACF,mBAAqB,EAAA,wBAAA;AAAA,IACrB,oBAAsB,EAAA,kBAAA;AAAA;AAAA,IAGtB,0BAA4B,EAAA,uBAAA;AAAA,IAC5B,gCACE,EAAA,0IAAA;AAAA,IACF,2BAA6B,EAAA,eAAA;AAAA,IAC7B,4BAA8B,EAAA,2BAAA;AAAA;AAAA,IAG9B,gBAAkB,EAAA,sCAAA;AAAA,IAClB,sBACE,EAAA,sGAAA;AAAA,IACF,mBAAqB,EAAA,eAAA;AAAA,IACrB,iBAAmB,EAAA,WAAA;AAAA,IACnB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ACE,EAAA,4DAAA;AAAA,IACF,kCAAoC,EAAA,UAAA;AAAA,IACpC,wCAA0C,EAAA,oBAAA;AAAA,IAC1C,2CAA6C,EAAA,sBAAA;AAAA,IAC7C,0CAA4C,EAAA,QAAA;AAAA,IAC5C,yCAA2C,EAAA,MAAA;AAAA,IAC3C,0CAA4C,EAAA,SAAA;AAAA,IAC5C,yCAA2C,EAAA,eAAA;AAAA,IAC3C,wCAA0C,EAAA,KAAA;AAAA,IAC1C,+CAAiD,EAAA,sBAAA;AAAA,IACjD,2CAA6C,EAAA,aAAA;AAAA,IAC7C,4CAA8C,EAAA,iBAAA;AAAA,IAC9C,8CAAgD,EAAA,kBAAA;AAAA,IAChD,sCAAwC,EAAA;AAAA;AAE5C,CAAC;;;;"}
|
|
@@ -42,6 +42,8 @@ const scorecardTranslationEs = createTranslationMessages({
|
|
|
42
42
|
"metric.github.open_prs.description": "Recuento actual de Pull Requests abiertas para un repositorio de GitHub dado.",
|
|
43
43
|
"metric.jira.open_issues.title": "Jira tickets bloqueantes abiertos",
|
|
44
44
|
"metric.jira.open_issues.description": "Destaca el n\xFAmero de problemas cr\xEDticos y bloqueantes que est\xE1n actualmente abiertos en Jira.",
|
|
45
|
+
"metric.filecheck.title": "Verificaci\xF3n de archivo: {{name}}",
|
|
46
|
+
"metric.filecheck.description": "Verifica si el archivo {{name}} existe en el repositorio.",
|
|
45
47
|
"metric.lastUpdated": "\xDAltima actualizaci\xF3n: {{timestamp}}",
|
|
46
48
|
"metric.lastUpdatedNotAvailable": "\xDAltima actualizaci\xF3n: No disponible",
|
|
47
49
|
"metric.someEntitiesNotReportingValues": "Algunas entidades no est\xE1n reportando valores relacionados con esta m\xE9trica.",
|
|
@@ -49,6 +51,8 @@ const scorecardTranslationEs = createTranslationMessages({
|
|
|
49
51
|
"thresholds.success": "\xC9xito",
|
|
50
52
|
"thresholds.warning": "Advertencia",
|
|
51
53
|
"thresholds.error": "Error",
|
|
54
|
+
"thresholds.exist": "Existe",
|
|
55
|
+
"thresholds.missing": "Faltante",
|
|
52
56
|
"thresholds.noEntities": "No hay entidades en el estado {{category}}",
|
|
53
57
|
"thresholds.entities_one": "{{count}} entidad",
|
|
54
58
|
"thresholds.entities_other": "{{count}} entidades",
|
|
@@ -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\n/**\n * es translation for plugin.scorecard.\n * @public\n */\nconst scorecardTranslationEs = createTranslationMessages({\n ref: scorecardTranslationRef,\n messages: {\n // Empty state translations\n 'emptyState.title': 'Aún no se agregaron tarjetas de puntuación',\n 'emptyState.description':\n 'Las tarjetas de puntuación ayudan a monitorear el estado del componente de un vistazo. Para comenzar, explore la documentación para obtener pautas de configuración.',\n 'emptyState.button': 'Ver documentación',\n 'emptyState.altText': 'No hay tarjetas de puntuación',\n\n // Permission required translations\n 'permissionRequired.title': 'Permiso faltante',\n 'permissionRequired.description':\n 'Para ver el complemento de tarjetas de puntuación, comuníquese con su administrador para que le otorgue el permiso {{permission}}.',\n 'permissionRequired.button': 'Leer más',\n 'permissionRequired.altText': 'Permiso requerido',\n\n // Not found state\n 'notFound.title': '404 No pudimos encontrar esa página',\n 'notFound.description':\n 'Intente agregar un archivo {{indexFile}} en la raíz del directorio de documentación de este repositorio.',\n 'notFound.readMore': 'Leer más',\n 'notFound.goBack': 'Volver',\n 'notFound.contactSupport': 'Contactar soporte',\n 'notFound.altText': 'Página no encontrada',\n\n // Error messages\n 'errors.entityMissingProperties':\n 'Entidad a la que le faltan las propiedades requeridas para la búsqueda en la tarjeta de puntuación',\n 'errors.missingAggregationId':\n 'El cuadro de mando está mal configurado; no se ha proporcionado la propiedad «ID de agregación» (o «ID de métrica»)',\n 'errors.invalidApiResponse':\n 'Formato de respuesta no válido de la API de la tarjeta de puntuación',\n 'errors.fetchError':\n 'Error al extraer las tarjetas de puntuación: {{error}}',\n 'errors.metricDataUnavailable': 'Datos de métricas no disponibles',\n 'errors.invalidThresholds': 'Umbrales no válidos',\n 'errors.missingPermission': 'Permiso faltante',\n 'errors.noDataFound': 'No se encontraron datos',\n 'errors.authenticationError': 'Error de autenticación',\n 'errors.missingPermissionMessage':\n 'Para ver las métricas de la tarjeta de puntuación, su 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 'errors.noMetricsFound':\n 'No se encontraron métricas para la ID de métrica especificada.',\n 'errors.multipleMetricsFound':\n 'Se encontraron múltiples métricas para la ID de métrica especificada. Se esperaba exactamente una.',\n\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 'metric.lastUpdated': 'Última actualización: {{timestamp}}',\n 'metric.lastUpdatedNotAvailable': 'Última actualización: No disponible',\n 'metric.someEntitiesNotReportingValues':\n 'Algunas entidades no están reportando valores relacionados con esta métrica.',\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 // Entities page translations\n 'entitiesPage.unknownMetric': 'Métrica desconocida',\n 'entitiesPage.noDataFound':\n 'Para ver tus datos aquí, comprueba que tus entidades estén reportando valores relacionados con esta métrica.',\n 'entitiesPage.missingPermission':\n 'Para ver las métricas de scorecard, tu administrador debe otorgarle el permiso requerido.',\n 'entitiesPage.metricProviderNotRegistered':\n 'Proveedor de métrica con ID {{metricId}} no registrado.',\n 'entitiesPage.entitiesTable.title': 'Entidades',\n 'entitiesPage.entitiesTable.unavailable': 'No disponible',\n 'entitiesPage.entitiesTable.titleWithCount': 'Entidades ({{count}})',\n 'entitiesPage.entitiesTable.header.status': 'Estado',\n 'entitiesPage.entitiesTable.header.value': 'Valor',\n 'entitiesPage.entitiesTable.header.entity': 'Entidad',\n 'entitiesPage.entitiesTable.header.owner': 'Propietario',\n 'entitiesPage.entitiesTable.header.kind': 'Tipo',\n 'entitiesPage.entitiesTable.header.lastUpdated': 'Última actualización',\n 'entitiesPage.entitiesTable.footer.allRows': 'Todas las filas',\n 'entitiesPage.entitiesTable.footer.rows_one': '{{count}} fila',\n 'entitiesPage.entitiesTable.footer.rows_other': '{{count}} filas',\n 'entitiesPage.entitiesTable.footer.of': 'de',\n },\n});\n\nexport default scorecardTranslationEs;\n"],"names":[],"mappings":";;;AAuBA,MAAM,yBAAyB,yBAA0B,CAAA;AAAA,EACvD,GAAK,EAAA,uBAAA;AAAA,EACL,QAAU,EAAA;AAAA;AAAA,IAER,kBAAoB,EAAA,kDAAA;AAAA,IACpB,wBACE,EAAA,+KAAA;AAAA,IACF,mBAAqB,EAAA,sBAAA;AAAA,IACrB,oBAAsB,EAAA,kCAAA;AAAA;AAAA,IAGtB,0BAA4B,EAAA,kBAAA;AAAA,IAC5B,gCACE,EAAA,0IAAA;AAAA,IACF,2BAA6B,EAA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AAA,uHAAA;AAAA,IACF,gCACE,EAAA,8FAAA;AAAA,IACF,0CACE,EAAA,4DAAA;AAAA,IACF,kCAAoC,EAAA,WAAA;AAAA,IACpC,wCAA0C,EAAA,eAAA;AAAA,IAC1C,2CAA6C,EAAA,uBAAA;AAAA,IAC7C,0CAA4C,EAAA,QAAA;AAAA,IAC5C,yCAA2C,EAAA,OAAA;AAAA,IAC3C,0CAA4C,EAAA,SAAA;AAAA,IAC5C,yCAA2C,EAAA,aAAA;AAAA,IAC3C,wCAA0C,EAAA,MAAA;AAAA,IAC1C,+CAAiD,EAAA,4BAAA;AAAA,IACjD,2CAA6C,EAAA,iBAAA;AAAA,IAC7C,4CAA8C,EAAA,gBAAA;AAAA,IAC9C,8CAAgD,EAAA,iBAAA;AAAA,IAChD,sCAAwC,EAAA;AAAA;AAE5C,CAAC;;;;"}
|
|
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\n/**\n * es translation for plugin.scorecard.\n * @public\n */\nconst scorecardTranslationEs = createTranslationMessages({\n ref: scorecardTranslationRef,\n messages: {\n // Empty state translations\n 'emptyState.title': 'Aún no se agregaron tarjetas de puntuación',\n 'emptyState.description':\n 'Las tarjetas de puntuación ayudan a monitorear el estado del componente de un vistazo. Para comenzar, explore la documentación para obtener pautas de configuración.',\n 'emptyState.button': 'Ver documentación',\n 'emptyState.altText': 'No hay tarjetas de puntuación',\n\n // Permission required translations\n 'permissionRequired.title': 'Permiso faltante',\n 'permissionRequired.description':\n 'Para ver el complemento de tarjetas de puntuación, comuníquese con su administrador para que le otorgue el permiso {{permission}}.',\n 'permissionRequired.button': 'Leer más',\n 'permissionRequired.altText': 'Permiso requerido',\n\n // Not found state\n 'notFound.title': '404 No pudimos encontrar esa página',\n 'notFound.description':\n 'Intente agregar un archivo {{indexFile}} en la raíz del directorio de documentación de este repositorio.',\n 'notFound.readMore': 'Leer más',\n 'notFound.goBack': 'Volver',\n 'notFound.contactSupport': 'Contactar soporte',\n 'notFound.altText': 'Página no encontrada',\n\n // Error messages\n 'errors.entityMissingProperties':\n 'Entidad a la que le faltan las propiedades requeridas para la búsqueda en la tarjeta de puntuación',\n 'errors.missingAggregationId':\n 'El cuadro de mando está mal configurado; no se ha proporcionado la propiedad «ID de agregación» (o «ID de métrica»)',\n 'errors.invalidApiResponse':\n 'Formato de respuesta no válido de la API de la tarjeta de puntuación',\n 'errors.fetchError':\n 'Error al extraer las tarjetas de puntuación: {{error}}',\n 'errors.metricDataUnavailable': 'Datos de métricas no disponibles',\n 'errors.invalidThresholds': 'Umbrales no válidos',\n 'errors.missingPermission': 'Permiso faltante',\n 'errors.noDataFound': 'No se encontraron datos',\n 'errors.authenticationError': 'Error de autenticación',\n 'errors.missingPermissionMessage':\n 'Para ver las métricas de la tarjeta de puntuación, su 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 'errors.noMetricsFound':\n 'No se encontraron métricas para la ID de métrica especificada.',\n 'errors.multipleMetricsFound':\n 'Se encontraron múltiples métricas para la ID de métrica especificada. Se esperaba exactamente una.',\n\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 'metric.filecheck.title': 'Verificación de archivo: {{name}}',\n 'metric.filecheck.description':\n 'Verifica si el archivo {{name}} existe en el repositorio.',\n 'metric.lastUpdated': 'Última actualización: {{timestamp}}',\n 'metric.lastUpdatedNotAvailable': 'Última actualización: No disponible',\n 'metric.someEntitiesNotReportingValues':\n 'Algunas entidades no están reportando valores relacionados con esta métrica.',\n\n // Threshold translations\n 'thresholds.success': 'Éxito',\n 'thresholds.warning': 'Advertencia',\n 'thresholds.error': 'Error',\n 'thresholds.exist': 'Existe',\n 'thresholds.missing': 'Faltante',\n 'thresholds.noEntities': 'No hay entidades en el estado {{category}}',\n 'thresholds.entities_one': '{{count}} entidad',\n 'thresholds.entities_other': '{{count}} entidades',\n\n // Entities page translations\n 'entitiesPage.unknownMetric': 'Métrica desconocida',\n 'entitiesPage.noDataFound':\n 'Para ver tus datos aquí, comprueba que tus entidades estén reportando valores relacionados con esta métrica.',\n 'entitiesPage.missingPermission':\n 'Para ver las métricas de scorecard, tu administrador debe otorgarle el permiso requerido.',\n 'entitiesPage.metricProviderNotRegistered':\n 'Proveedor de métrica con ID {{metricId}} no registrado.',\n 'entitiesPage.entitiesTable.title': 'Entidades',\n 'entitiesPage.entitiesTable.unavailable': 'No disponible',\n 'entitiesPage.entitiesTable.titleWithCount': 'Entidades ({{count}})',\n 'entitiesPage.entitiesTable.header.status': 'Estado',\n 'entitiesPage.entitiesTable.header.value': 'Valor',\n 'entitiesPage.entitiesTable.header.entity': 'Entidad',\n 'entitiesPage.entitiesTable.header.owner': 'Propietario',\n 'entitiesPage.entitiesTable.header.kind': 'Tipo',\n 'entitiesPage.entitiesTable.header.lastUpdated': 'Última actualización',\n 'entitiesPage.entitiesTable.footer.allRows': 'Todas las filas',\n 'entitiesPage.entitiesTable.footer.rows_one': '{{count}} fila',\n 'entitiesPage.entitiesTable.footer.rows_other': '{{count}} filas',\n 'entitiesPage.entitiesTable.footer.of': 'de',\n },\n});\n\nexport default scorecardTranslationEs;\n"],"names":[],"mappings":";;;AAuBA,MAAM,yBAAyB,yBAA0B,CAAA;AAAA,EACvD,GAAK,EAAA,uBAAA;AAAA,EACL,QAAU,EAAA;AAAA;AAAA,IAER,kBAAoB,EAAA,kDAAA;AAAA,IACpB,wBACE,EAAA,+KAAA;AAAA,IACF,mBAAqB,EAAA,sBAAA;AAAA,IACrB,oBAAsB,EAAA,kCAAA;AAAA;AAAA,IAGtB,0BAA4B,EAAA,kBAAA;AAAA,IAC5B,gCACE,EAAA,0IAAA;AAAA,IACF,2BAA6B,EAAA,aAAA;AAAA,IAC7B,4BAA8B,EAAA,mBAAA;AAAA;AAAA,IAG9B,gBAAkB,EAAA,wCAAA;AAAA,IAClB,sBACE,EAAA,gHAAA;AAAA,IACF,mBAAqB,EAAA,aAAA;AAAA,IACrB,iBAAmB,EAAA,QAAA;AAAA,IACnB,yBAA2B,EAAA,mBAAA;AAAA,IAC3B,kBAAoB,EAAA,yBAAA;AAAA;AAAA,IAGpB,gCACE,EAAA,0GAAA;AAAA,IACF,6BACE,EAAA,0IAAA;AAAA,IACF,2BACE,EAAA,4EAAA;AAAA,IACF,mBACE,EAAA,2DAAA;AAAA,IACF,8BAAgC,EAAA,qCAAA;AAAA,IAChC,0BAA4B,EAAA,wBAAA;AAAA,IAC5B,0BAA4B,EAAA,kBAAA;AAAA,IAC5B,oBAAsB,EAAA,yBAAA;AAAA,IACtB,4BAA8B,EAAA,2BAAA;AAAA,IAC9B,iCACE,EAAA,gHAAA;AAAA,IACF,qCACE,EAAA,oDAAA;AAAA,IACF,2BACE,EAAA,uHAAA;AAAA,IACF,mCAAqC,EAAA,sCAAA;AAAA,IACrC,uBACE,EAAA,sEAAA;AAAA,IACF,6BACE,EAAA,6GAAA;AAAA;AA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"Nombre actuel de requ\xEAtes d'extraction ouvertes pour un r\xE9f\xE9rentiel GitHub donn\xE9.",
|
|
43
43
|
"metric.jira.open_issues.title": "Jira ouvre des tickets bloquants",
|
|
44
44
|
"metric.jira.open_issues.description": "Met en \xE9vidence le nombre de probl\xE8mes critiques et bloquants actuellement ouverts dans Jira.",
|
|
45
|
+
"metric.filecheck.title": "V\xE9rification de fichier : {{name}}",
|
|
46
|
+
"metric.filecheck.description": "V\xE9rifie si le fichier {{name}} existe dans le d\xE9p\xF4t.",
|
|
45
47
|
"metric.lastUpdated": "Derni\xE8re mise \xE0 jour: {{timestamp}}",
|
|
46
48
|
"metric.lastUpdatedNotAvailable": "Derni\xE8re mise \xE0 jour: Non disponible",
|
|
47
49
|
"metric.someEntitiesNotReportingValues": "Certaines entit\xE9s ne communiquent pas de valeurs li\xE9es \xE0 cette m\xE9trique.",
|
|
@@ -49,6 +51,8 @@ const scorecardTranslationFr = createTranslationMessages({
|
|
|
49
51
|
"thresholds.success": "Succ\xE8s",
|
|
50
52
|
"thresholds.warning": "Attention",
|
|
51
53
|
"thresholds.error": "Erreur",
|
|
54
|
+
"thresholds.exist": "Existant",
|
|
55
|
+
"thresholds.missing": "Manquant",
|
|
52
56
|
"thresholds.noEntities": "Aucune entit\xE9 dans l'\xE9tat {{category}}",
|
|
53
57
|
"thresholds.entities_one": "{{count}} entit\xE9",
|
|
54
58
|
"thresholds.entities_other": "{{count}} entit\xE9s",
|
|
@@ -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 // Empty state translations\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\n // Permission required translations\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\n // Not found state\n 'notFound.title': \"404 Nous n'avons pas trouvé cette page\",\n 'notFound.description':\n \"Essayez d'ajouter un fichier {{indexFile}} à la racine du répertoire docs de ce dépôt.\",\n 'notFound.readMore': 'En savoir plus',\n 'notFound.goBack': 'Retour',\n 'notFound.contactSupport': 'Contacter le support',\n 'notFound.altText': 'Page introuvable',\n\n // Error messages\n 'errors.entityMissingProperties':\n \"Entité manquant les propriétés requises pour la recherche dans la fiche d'évaluation\",\n 'errors.missingAggregationId':\n \"La fiche de suivi est mal configurée ; la propriété « ID d'agrégation » (ou « ID de métrique ») n'est pas fournie\",\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 'errors.noMetricsFound':\n \"Aucune métrique trouvée pour l'ID de métrique spécifié.\",\n 'errors.multipleMetricsFound':\n \"Plusieurs métriques trouvées pour l'ID de métrique spécifié. Une seule attendue.\",\n\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 'metric.lastUpdated': 'Dernière mise à jour: {{timestamp}}',\n 'metric.lastUpdatedNotAvailable': 'Dernière mise à jour: Non disponible',\n 'metric.someEntitiesNotReportingValues':\n 'Certaines entités ne communiquent pas de valeurs liées à cette métrique.',\n\n // Threshold translations\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 // Entities page translations\n 'entitiesPage.unknownMetric': 'Métrique inconnue',\n 'entitiesPage.noDataFound':\n 'Pour voir vos données ici, vérifiez que vos entités communiquent les valeurs liées à cet indicateur.',\n 'entitiesPage.missingPermission':\n 'Pour voir les métriques de scorecard, votre administrateur doit vous donner la permission requise.',\n 'entitiesPage.metricProviderNotRegistered':\n 'Fournisseur de métrique avec ID {{metricId}} non enregistré.',\n 'entitiesPage.entitiesTable.title': 'Entités',\n 'entitiesPage.entitiesTable.unavailable': 'Non disponible',\n 'entitiesPage.entitiesTable.titleWithCount': 'Entités ({{count}})',\n 'entitiesPage.entitiesTable.header.status': 'Statut',\n 'entitiesPage.entitiesTable.header.value': 'Valeur',\n 'entitiesPage.entitiesTable.header.entity': 'Entité',\n 'entitiesPage.entitiesTable.header.owner': 'Propriétaire',\n 'entitiesPage.entitiesTable.header.kind': 'Type',\n 'entitiesPage.entitiesTable.header.lastUpdated': 'Dernière mise à jour',\n 'entitiesPage.entitiesTable.footer.allRows': 'Toutes les lignes',\n 'entitiesPage.entitiesTable.footer.rows_one': '{{count}} ligne',\n 'entitiesPage.entitiesTable.footer.rows_other': '{{count}} lignes',\n 'entitiesPage.entitiesTable.footer.of': 'de',\n },\n});\n\nexport default scorecardTranslationFr;\n"],"names":[],"mappings":";;;AAuBA,MAAM,yBAAyB,yBAA0B,CAAA;AAAA,EACvD,GAAK,EAAA,uBAAA;AAAA,EACL,QAAU,EAAA;AAAA;AAAA,IAER,kBAAoB,EAAA,uDAAA;AAAA,IACpB,wBACE,EAAA,yMAAA;AAAA,IACF,mBAAqB,EAAA,uBAAA;AAAA,IACrB,oBAAsB,EAAA,wBAAA;AAAA;AAAA,IAGtB,0BAA4B,EAAA,0BAAA;AAAA,IAC5B,gCACE,EAAA,oHAAA;AAAA,IACF,2BAA6B,EAAA,gBAAA;AAAA,IAC7B,4BAA8B,EAAA,sBAAA;AAAA;AAAA,IAG9B,gBAAkB,EAAA,2CAAA;AAAA,IAClB,sBACE,EAAA,oGAAA;AAAA,IACF,mBAAqB,EAAA,gBAAA;AAAA,IACrB,iBAAmB,EAAA,QAAA;AAAA,IACnB,yBAA2B,EAAA,sBAAA;AAAA,IAC3B,kBAAoB,EAAA,kBAAA;AAAA;AAAA,IAGpB,gCACE,EAAA,kGAAA;AAAA,IACF,6BACE,EAAA,8IAAA;AAAA,IACF,2BACE,EAAA,uDAAA;AAAA,IACF,mBACE,EAAA,0EAAA;AAAA,IACF,8BAAgC,EAAA,uCAAA;AAAA,IAChC,0BAA4B,E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AA,iBAAA;AAAA,IAC9C,8CAAgD,EAAA,kBAAA;AAAA,IAChD,sCAAwC,EAAA;AAAA;AAE5C,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 // Empty state translations\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\n // Permission required translations\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\n // Not found state\n 'notFound.title': \"404 Nous n'avons pas trouvé cette page\",\n 'notFound.description':\n \"Essayez d'ajouter un fichier {{indexFile}} à la racine du répertoire docs de ce dépôt.\",\n 'notFound.readMore': 'En savoir plus',\n 'notFound.goBack': 'Retour',\n 'notFound.contactSupport': 'Contacter le support',\n 'notFound.altText': 'Page introuvable',\n\n // Error messages\n 'errors.entityMissingProperties':\n \"Entité manquant les propriétés requises pour la recherche dans la fiche d'évaluation\",\n 'errors.missingAggregationId':\n \"La fiche de suivi est mal configurée ; la propriété « ID d'agrégation » (ou « ID de métrique ») n'est pas fournie\",\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 'errors.noMetricsFound':\n \"Aucune métrique trouvée pour l'ID de métrique spécifié.\",\n 'errors.multipleMetricsFound':\n \"Plusieurs métriques trouvées pour l'ID de métrique spécifié. Une seule attendue.\",\n\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 'metric.filecheck.title': 'Vérification de fichier : {{name}}',\n 'metric.filecheck.description':\n 'Vérifie si le fichier {{name}} existe dans le dépôt.',\n 'metric.lastUpdated': 'Dernière mise à jour: {{timestamp}}',\n 'metric.lastUpdatedNotAvailable': 'Dernière mise à jour: Non disponible',\n 'metric.someEntitiesNotReportingValues':\n 'Certaines entités ne communiquent pas de valeurs liées à cette métrique.',\n\n // Threshold translations\n 'thresholds.success': 'Succès',\n 'thresholds.warning': 'Attention',\n 'thresholds.error': 'Erreur',\n 'thresholds.exist': 'Existant',\n 'thresholds.missing': 'Manquant',\n 'thresholds.noEntities': \"Aucune entité dans l'état {{category}}\",\n 'thresholds.entities_one': '{{count}} entité',\n 'thresholds.entities_other': '{{count}} entités',\n\n // Entities page translations\n 'entitiesPage.unknownMetric': 'Métrique inconnue',\n 'entitiesPage.noDataFound':\n 'Pour voir vos données ici, vérifiez que vos entités communiquent les valeurs liées à cet indicateur.',\n 'entitiesPage.missingPermission':\n 'Pour voir les métriques de scorecard, votre administrateur doit vous donner la permission requise.',\n 'entitiesPage.metricProviderNotRegistered':\n 'Fournisseur de métrique avec ID {{metricId}} non enregistré.',\n 'entitiesPage.entitiesTable.title': 'Entités',\n 'entitiesPage.entitiesTable.unavailable': 'Non disponible',\n 'entitiesPage.entitiesTable.titleWithCount': 'Entités ({{count}})',\n 'entitiesPage.entitiesTable.header.status': 'Statut',\n 'entitiesPage.entitiesTable.header.value': 'Valeur',\n 'entitiesPage.entitiesTable.header.entity': 'Entité',\n 'entitiesPage.entitiesTable.header.owner': 'Propriétaire',\n 'entitiesPage.entitiesTable.header.kind': 'Type',\n 'entitiesPage.entitiesTable.header.lastUpdated': 'Dernière mise à jour',\n 'entitiesPage.entitiesTable.footer.allRows': 'Toutes les lignes',\n 'entitiesPage.entitiesTable.footer.rows_one': '{{count}} ligne',\n 'entitiesPage.entitiesTable.footer.rows_other': '{{count}} lignes',\n 'entitiesPage.entitiesTable.footer.of': 'de',\n },\n});\n\nexport default scorecardTranslationFr;\n"],"names":[],"mappings":";;;AAuBA,MAAM,yBAAyB,yBAA0B,CAAA;AAAA,EACvD,GAAK,EAAA,uBAAA;AAAA,EACL,QAAU,EAAA;AAAA;AAAA,IAER,kBAAoB,EAAA,uDAAA;AAAA,IACpB,wBACE,EAAA,yMAAA;AAAA,IACF,mBAAqB,EAAA,uBAAA;AAAA,IACrB,oBAA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,EAAA,QAAA;AAAA,IACpB,kBAAoB,EAAA,UAAA;AAAA,IACpB,oBAAsB,EAAA,UAAA;AAAA,IACtB,uBAAyB,EAAA,8CAAA;AAAA,IACzB,yBAA2B,EAAA,qBAAA;AAAA,IAC3B,2BAA6B,EAAA,sBAAA;AAAA;AAAA,IAG7B,4BAA8B,EAAA,sBAAA;AAAA,IAC9B,0BACE,EAAA,qHAAA;AAAA,IACF,gCACE,EAAA,uGAAA;AAAA,IACF,0CACE,EAAA,oEAAA;AAAA,IACF,kCAAoC,EAAA,YAAA;AAAA,IACpC,wCAA0C,EAAA,gBAAA;AAAA,IAC1C,2CAA6C,EAAA,wBAAA;AAAA,IAC7C,0CAA4C,EAAA,QAAA;AAAA,IAC5C,yCAA2C,EAAA,QAAA;AAAA,IAC3C,0CAA4C,EAAA,WAAA;AAAA,IAC5C,yCAA2C,EAAA,iBAAA;AAAA,IAC3C,wCAA0C,EAAA,MAAA;AAAA,IAC1C,+CAAiD,EAAA,4BAAA;AAAA,IACjD,2CAA6C,EAAA,mBAAA;AAAA,IAC7C,4CAA8C,EAAA,iBAAA;AAAA,IAC9C,8CAAgD,EAAA,kBAAA;AAAA,IAChD,sCAAwC,EAAA;AAAA;AAE5C,CAAC;;;;"}
|
|
@@ -42,6 +42,8 @@ const scorecardTranslationIt = createTranslationMessages({
|
|
|
42
42
|
"metric.github.open_prs.description": "Conteggio attuale delle richieste pull aperte per uno specifico repository GitHub.",
|
|
43
43
|
"metric.jira.open_issues.title": "Ticket di blocco Jira aperti",
|
|
44
44
|
"metric.jira.open_issues.description": "Evidenzia il numero di problemi critici e di blocco attualmente aperti in Jira.",
|
|
45
|
+
"metric.filecheck.title": "Verifica file: {{name}}",
|
|
46
|
+
"metric.filecheck.description": "Verifica se il file {{name}} esiste nel repository.",
|
|
45
47
|
"metric.lastUpdated": "Ultimo aggiornamento: {{timestamp}}",
|
|
46
48
|
"metric.lastUpdatedNotAvailable": "Ultimo aggiornamento: Non disponibile",
|
|
47
49
|
"metric.someEntitiesNotReportingValues": "Alcune entit\xE0 non stanno riportando valori relativi a questa metrica.",
|
|
@@ -49,6 +51,8 @@ const scorecardTranslationIt = createTranslationMessages({
|
|
|
49
51
|
"thresholds.success": "Attivit\xE0 riuscita",
|
|
50
52
|
"thresholds.warning": "Avviso",
|
|
51
53
|
"thresholds.error": "Errore",
|
|
54
|
+
"thresholds.exist": "Esistente",
|
|
55
|
+
"thresholds.missing": "Mancante",
|
|
52
56
|
"thresholds.noEntities": "Nessuna entit\xE0 con stato {{category}}",
|
|
53
57
|
"thresholds.entities_one": "{{count}} entit\xE0",
|
|
54
58
|
"thresholds.entities_other": "{{count}} entit\xE0",
|
|
@@ -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 // Empty state translations\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\n // Permission required translations\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\n // Not found state\n 'notFound.title': '404 Pagina non trovata',\n 'notFound.description':\n 'Prova ad aggiungere un file {{indexFile}} nella root della directory docs di questo repository.',\n 'notFound.readMore': 'Scopri di più',\n 'notFound.goBack': 'Indietro',\n 'notFound.contactSupport': 'Contatta il supporto',\n 'notFound.altText': 'Pagina non trovata',\n\n // Error messages\n 'errors.entityMissingProperties':\n 'Entità priva delle proprietà richieste per la ricerca nella scheda punteggio',\n 'errors.missingAggregationId':\n 'La scheda di valutazione non è configurata correttamente; la proprietà ID aggregazione (o ID metrica) non è stata specificata',\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 'errors.noMetricsFound':\n \"Nessuna metrica trovata per l'ID di metrica specificato.\",\n 'errors.multipleMetricsFound':\n 'Multiple metrics found for the specified metric ID. Expected exactly one.',\n\n // Metric translations\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 'metric.lastUpdated': 'Ultimo aggiornamento: {{timestamp}}',\n 'metric.lastUpdatedNotAvailable': 'Ultimo aggiornamento: Non disponibile',\n 'metric.someEntitiesNotReportingValues':\n 'Alcune entità non stanno riportando valori relativi a questa metrica.',\n\n // Threshold translations\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 // Entities page translations\n 'entitiesPage.unknownMetric': 'Metrica sconosciuta',\n 'entitiesPage.noDataFound':\n 'Per visualizzare i tuoi dati qui, verifica che le tue entità stiano riportando valori relativi a questa metrica.',\n 'entitiesPage.missingPermission':\n \"Per visualizzare le metriche della scheda punteggio, il tuo amministratore deve concedere l'autorizzazione richiesta.\",\n 'entitiesPage.metricProviderNotRegistered':\n 'Provider di metrica con ID {{metricId}} non registrato.',\n 'entitiesPage.entitiesTable.title': 'Entità',\n 'entitiesPage.entitiesTable.unavailable': 'Non disponibile',\n 'entitiesPage.entitiesTable.titleWithCount': 'Entità ({{count}})',\n 'entitiesPage.entitiesTable.header.status': 'Stato',\n 'entitiesPage.entitiesTable.header.value': 'Valore',\n 'entitiesPage.entitiesTable.header.entity': 'Entità',\n 'entitiesPage.entitiesTable.header.owner': 'Proprietario',\n 'entitiesPage.entitiesTable.header.kind': 'Tipo',\n 'entitiesPage.entitiesTable.header.lastUpdated': 'Ultimo aggiornamento',\n 'entitiesPage.entitiesTable.footer.allRows': 'Tutte le righe',\n 'entitiesPage.entitiesTable.footer.rows_one': '{{count}} riga',\n 'entitiesPage.entitiesTable.footer.rows_other': '{{count}} righe',\n 'entitiesPage.entitiesTable.footer.of': 'di',\n },\n});\n\nexport default scorecardTranslationIt;\n"],"names":[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AAAA,IACtB,gCAAkC,EAAA,uCAAA;AAAA,IAClC,uCACE,EAAA,0EAAA;AAAA;AAAA,IAGF,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,qBAAA;AAAA;AAAA,IAG7B,4BAA8B,EAAA,qBAAA;AAAA,IAC9B,0BACE,EAAA,qHAAA;AAAA,IACF,gCACE,EAAA,uHAAA;AAAA,IACF,0CACE,EAAA,yDAAA;AAAA,IACF,kCAAoC,EAAA,WAAA;AAAA,IACpC,wCAA0C,EAAA,iBAAA;AAAA,IAC1C,2CAA6C,EAAA,uBAAA;AAAA,IAC7C,0CAA4C,EAAA,OAAA;AAAA,IAC5C,yCAA2C,EAAA,QAAA;AAAA,IAC3C,0CAA4C,EAAA,WAAA;AAAA,IAC5C,yCAA2C,EAAA,cAAA;AAAA,IAC3C,wCAA0C,EAAA,MAAA;AAAA,IAC1C,+CAAiD,EAAA,sBAAA;AAAA,IACjD,2CAA6C,EAAA,gBAAA;AAAA,IAC7C,4CAA8C,EAAA,gBAAA;AAAA,IAC9C,8CAAgD,EAAA,iBAAA;AAAA,IAChD,sCAAwC,EAAA;AAAA;AAE5C,CAAC;;;;"}
|
|
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 // Empty state translations\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\n // Permission required translations\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\n // Not found state\n 'notFound.title': '404 Pagina non trovata',\n 'notFound.description':\n 'Prova ad aggiungere un file {{indexFile}} nella root della directory docs di questo repository.',\n 'notFound.readMore': 'Scopri di più',\n 'notFound.goBack': 'Indietro',\n 'notFound.contactSupport': 'Contatta il supporto',\n 'notFound.altText': 'Pagina non trovata',\n\n // Error messages\n 'errors.entityMissingProperties':\n 'Entità priva delle proprietà richieste per la ricerca nella scheda punteggio',\n 'errors.missingAggregationId':\n 'La scheda di valutazione non è configurata correttamente; la proprietà ID aggregazione (o ID metrica) non è stata specificata',\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 'errors.noMetricsFound':\n \"Nessuna metrica trovata per l'ID di metrica specificato.\",\n 'errors.multipleMetricsFound':\n 'Multiple metrics found for the specified metric ID. Expected exactly one.',\n\n // Metric translations\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 'metric.filecheck.title': 'Verifica file: {{name}}',\n 'metric.filecheck.description':\n 'Verifica se il file {{name}} esiste nel repository.',\n 'metric.lastUpdated': 'Ultimo aggiornamento: {{timestamp}}',\n 'metric.lastUpdatedNotAvailable': 'Ultimo aggiornamento: Non disponibile',\n 'metric.someEntitiesNotReportingValues':\n 'Alcune entità non stanno riportando valori relativi a questa metrica.',\n\n // Threshold translations\n 'thresholds.success': 'Attività riuscita',\n 'thresholds.warning': 'Avviso',\n 'thresholds.error': 'Errore',\n 'thresholds.exist': 'Esistente',\n 'thresholds.missing': 'Mancante',\n 'thresholds.noEntities': 'Nessuna entità con stato {{category}}',\n 'thresholds.entities_one': '{{count}} entità',\n 'thresholds.entities_other': '{{count}} entità',\n\n // Entities page translations\n 'entitiesPage.unknownMetric': 'Metrica sconosciuta',\n 'entitiesPage.noDataFound':\n 'Per visualizzare i tuoi dati qui, verifica che le tue entità stiano riportando valori relativi a questa metrica.',\n 'entitiesPage.missingPermission':\n \"Per visualizzare le metriche della scheda punteggio, il tuo amministratore deve concedere l'autorizzazione richiesta.\",\n 'entitiesPage.metricProviderNotRegistered':\n 'Provider di metrica con ID {{metricId}} non registrato.',\n 'entitiesPage.entitiesTable.title': 'Entità',\n 'entitiesPage.entitiesTable.unavailable': 'Non disponibile',\n 'entitiesPage.entitiesTable.titleWithCount': 'Entità ({{count}})',\n 'entitiesPage.entitiesTable.header.status': 'Stato',\n 'entitiesPage.entitiesTable.header.value': 'Valore',\n 'entitiesPage.entitiesTable.header.entity': 'Entità',\n 'entitiesPage.entitiesTable.header.owner': 'Proprietario',\n 'entitiesPage.entitiesTable.header.kind': 'Tipo',\n 'entitiesPage.entitiesTable.header.lastUpdated': 'Ultimo aggiornamento',\n 'entitiesPage.entitiesTable.footer.allRows': 'Tutte le righe',\n 'entitiesPage.entitiesTable.footer.rows_one': '{{count}} riga',\n 'entitiesPage.entitiesTable.footer.rows_other': '{{count}} righe',\n 'entitiesPage.entitiesTable.footer.of': 'di',\n },\n});\n\nexport default scorecardTranslationIt;\n"],"names":[],"mappings":";;;AAuBA,MAAM,yBAAyB,yBAA0B,CAAA;AAAA,EACvD,GAAK,EAAA,uBAAA;AAAA,EACL,QAAU,EAAA;AAAA;AAAA,IAER,kBAAoB,EAAA,wDAAA;AAAA,IACpB,wBACE,EAAA,2KAAA;AAAA,IACF,mBAAqB,EAAA,8BAAA;AAAA,IACrB,oBAAsB,EAAA,0BAAA;AAAA;AAAA,IAGtB,0BAA4B,EAAA,yBAAA;AAAA,IAC5B,gCACE,EAAA,mHAAA;AAAA,IACF,2BAA6B,EAAA,uBAAA;AAAA,IAC7B,4BAA8B,EAAA,0BAAA;AAAA;AAAA,IAG9B,gBAAkB,EAAA,wBAAA;AAAA,IAClB,sBACE,EAAA,iGAAA;AAAA,IACF,mBAAqB,EAAA,kBAAA;AAAA,IACrB,iBAAmB,EAAA,UAAA;AAAA,IACnB,yBAA2B,EAAA,sBAAA;AAAA,IAC3B,kBAAoB,EAAA,oBAAA;AAAA;AAAA,IAGpB,gCACE,EAAA,oFAAA;AAAA,IACF,6BACE,EAAA,wIAAA;AAAA,IACF,2BACE,EAAA,gEAAA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,yCAA2C,EAAA,QAAA;AAAA,IAC3C,0CAA4C,EAAA,WAAA;AAAA,IAC5C,yCAA2C,EAAA,cAAA;AAAA,IAC3C,wCAA0C,EAAA,MAAA;AAAA,IAC1C,+CAAiD,EAAA,sBAAA;AAAA,IACjD,2CAA6C,EAAA,gBAAA;AAAA,IAC7C,4CAA8C,EAAA,gBAAA;AAAA,IAC9C,8CAAgD,EAAA,iBAAA;AAAA,IAChD,sCAAwC,EAAA;AAAA;AAE5C,CAAC;;;;"}
|
|
@@ -42,6 +42,8 @@ const scorecardTranslationJa = createTranslationMessages({
|
|
|
42
42
|
"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",
|
|
43
43
|
"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",
|
|
44
44
|
"metric.jira.open_issues.description": "Jira \u3067\u73FE\u5728\u30AA\u30FC\u30D7\u30F3\u72B6\u614B\u306B\u306A\u3063\u3066\u3044\u308B\u3001\u91CD\u5927\u304B\u3064\u9032\u884C\u3092\u59A8\u3052\u3066\u3044\u308B\u8AB2\u984C\u306E\u6570\u3092\u660E\u793A\u3057\u307E\u3059\u3002",
|
|
45
|
+
"metric.filecheck.title": "\u30D5\u30A1\u30A4\u30EB\u78BA\u8A8D: {{name}}",
|
|
46
|
+
"metric.filecheck.description": "\u30EA\u30DD\u30B8\u30C8\u30EA\u30FC\u306B {{name}} \u30D5\u30A1\u30A4\u30EB\u304C\u5B58\u5728\u3059\u308B\u304B\u3092\u78BA\u8A8D\u3057\u307E\u3059\u3002",
|
|
45
47
|
"metric.lastUpdated": "\u6700\u7D42\u66F4\u65B0\u65E5: {{timestamp}}",
|
|
46
48
|
"metric.lastUpdatedNotAvailable": "\u6700\u7D42\u66F4\u65B0\u65E5: \u5229\u7528\u4E0D\u53EF",
|
|
47
49
|
"metric.someEntitiesNotReportingValues": "\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u30FC\u304C\u3053\u306E\u6307\u6A19\u306B\u95A2\u9023\u3059\u308B\u5024\u3092\u5831\u544A\u3057\u3066\u3044\u307E\u305B\u3093\u3002",
|
|
@@ -49,6 +51,8 @@ const scorecardTranslationJa = createTranslationMessages({
|
|
|
49
51
|
"thresholds.success": "\u6210\u529F",
|
|
50
52
|
"thresholds.warning": "\u8B66\u544A",
|
|
51
53
|
"thresholds.error": "\u30A8\u30E9\u30FC",
|
|
54
|
+
"thresholds.exist": "\u5B58\u5728",
|
|
55
|
+
"thresholds.missing": "\u6B20\u843D",
|
|
52
56
|
"thresholds.noEntities": "{{category}} \u72B6\u614B\u306E\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u30FC\u304C\u3042\u308A\u307E\u305B\u3093",
|
|
53
57
|
"thresholds.entities_one": "{{count}} \u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u30FC",
|
|
54
58
|
"thresholds.entities_other": "{{count}} \u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u30FC",
|
|
@@ -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 // Empty state translations\n 'emptyState.title': 'スコアカードはまだ追加されていません',\n 'emptyState.description':\n 'スコアカードを使用すると、コンポーネントの健全性を一目で監視できます。まず、セットアップ手順に関するドキュメントを参照してください。',\n 'emptyState.button': 'ドキュメントの表示',\n 'emptyState.altText': 'スコアカードなし',\n\n // Permission required translations\n 'permissionRequired.title': '権限がありません',\n 'permissionRequired.description':\n 'スコアカードプラグインを表示するには、管理者に連絡して {{permission}} 権限を付与してもらうよう依頼してください。',\n 'permissionRequired.button': 'さらに表示する',\n 'permissionRequired.altText': '権限が必要',\n\n // Not found state\n 'notFound.title': '404 ページが見つかりません',\n 'notFound.description':\n 'このリポジトリの docs ディレクトリのルートに {{indexFile}} ファイルを追加してみてください。',\n 'notFound.readMore': '詳細を見る',\n 'notFound.goBack': '戻る',\n 'notFound.contactSupport': 'サポートに連絡',\n 'notFound.altText': 'ページが見つかりません',\n\n // Error messages\n 'errors.entityMissingProperties':\n 'スコアカードの検索に必要なプロパティーがエンティティーにありません',\n 'errors.missingAggregationId':\n 'スコアカードの構成に誤りがあります。集計ID(またはメトリックID)のプロパティが指定されていません',\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 'errors.noMetricsFound':\n '指定されたメトリクス ID に対するメトリクスが見つかりません。',\n 'errors.multipleMetricsFound':\n '指定されたメトリクス ID に対するメトリクスが複数見つかりました。1つのみが期待されています。',\n\n // Metric translations\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 'metric.lastUpdated': '最終更新日: {{timestamp}}',\n 'metric.lastUpdatedNotAvailable': '最終更新日: 利用不可',\n 'metric.someEntitiesNotReportingValues':\n 'エンティティーがこの指標に関連する値を報告していません。',\n\n // Threshold translations\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 // Entities page translations\n 'entitiesPage.unknownMetric': '不明なメトリクス',\n 'entitiesPage.noDataFound':\n 'ここでデータを確認するには、エンティティがこの指標に関連する値を報告していることを確認してください。',\n 'entitiesPage.missingPermission':\n 'スコアカードのメトリクスを表示するには、管理者に権限を付与してもらうよう依頼してください。',\n 'entitiesPage.metricProviderNotRegistered':\n 'ID {{metricId}} のメトリクスプロバイダーが登録されていません。',\n 'entitiesPage.entitiesTable.title': 'エンティティー',\n 'entitiesPage.entitiesTable.unavailable': '利用不可',\n 'entitiesPage.entitiesTable.titleWithCount': 'エンティティー ({{count}})',\n 'entitiesPage.entitiesTable.header.status': '状態',\n 'entitiesPage.entitiesTable.header.value': '値',\n 'entitiesPage.entitiesTable.header.entity': 'エンティティー',\n 'entitiesPage.entitiesTable.header.owner': '所有者',\n 'entitiesPage.entitiesTable.header.kind': '種類',\n 'entitiesPage.entitiesTable.header.lastUpdated': '最終更新日',\n 'entitiesPage.entitiesTable.footer.allRows': 'すべての行',\n 'entitiesPage.entitiesTable.footer.rows_one': '{{count}} 行',\n 'entitiesPage.entitiesTable.footer.rows_other': '{{count}} 行',\n 'entitiesPage.entitiesTable.footer.of': 'の',\n },\n});\n\nexport default scorecardTranslationJa;\n"],"names":[],"mappings":";;;AAuBA,MAAM,yBAAyB,yBAA0B,CAAA;AAAA,EACvD,GAAK,EAAA,uBAAA;AAAA,EACL,QAAU,EAAA;AAAA;AAAA,IAER,kBAAoB,EAAA,8GAAA;AAAA,IACpB,wBACE,EAAA,8YAAA;AAAA,IACF,mBAAqB,EAAA,wDAAA;AAAA,IACrB,oBAAsB,EAAA,kDAAA;AAAA;AAAA,IAGtB,0BAA4B,EAAA,kDAAA;AAAA,IAC5B,gCACE,EAAA,kTAAA;AAAA,IACF,2BAA6B,EAAA,4CAAA;AAAA,IAC7B,4BAA8B,EAAA,gCAAA;AAAA;AAAA,IAG9B,gBAAkB,EAAA,wEAAA;AAAA,IAClB,sBACE,EAAA,yOAAA;AAAA,IACF,mBAAqB,EAAA,gCAAA;AAAA,IACrB,iBAAmB,EAAA,cAAA;AAAA,IACnB,yBAA2B,EAAA,4CAAA;AAAA,IAC3B,kBAAoB,EAAA,oEAAA;AAAA;AAAA,IAGpB,gCACE,EAAA,wMAAA;AAAA,IACF,6BACE,EAAA,0RAAA;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,EA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ensed 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 // Empty state translations\n 'emptyState.title': 'スコアカードはまだ追加されていません',\n 'emptyState.description':\n 'スコアカードを使用すると、コンポーネントの健全性を一目で監視できます。まず、セットアップ手順に関するドキュメントを参照してください。',\n 'emptyState.button': 'ドキュメントの表示',\n 'emptyState.altText': 'スコアカードなし',\n\n // Permission required translations\n 'permissionRequired.title': '権限がありません',\n 'permissionRequired.description':\n 'スコアカードプラグインを表示するには、管理者に連絡して {{permission}} 権限を付与してもらうよう依頼してください。',\n 'permissionRequired.button': 'さらに表示する',\n 'permissionRequired.altText': '権限が必要',\n\n // Not found state\n 'notFound.title': '404 ページが見つかりません',\n 'notFound.description':\n 'このリポジトリの docs ディレクトリのルートに {{indexFile}} ファイルを追加してみてください。',\n 'notFound.readMore': '詳細を見る',\n 'notFound.goBack': '戻る',\n 'notFound.contactSupport': 'サポートに連絡',\n 'notFound.altText': 'ページが見つかりません',\n\n // Error messages\n 'errors.entityMissingProperties':\n 'スコアカードの検索に必要なプロパティーがエンティティーにありません',\n 'errors.missingAggregationId':\n 'スコアカードの構成に誤りがあります。集計ID(またはメトリックID)のプロパティが指定されていません',\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 'errors.noMetricsFound':\n '指定されたメトリクス ID に対するメトリクスが見つかりません。',\n 'errors.multipleMetricsFound':\n '指定されたメトリクス ID に対するメトリクスが複数見つかりました。1つのみが期待されています。',\n\n // Metric translations\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 'metric.filecheck.title': 'ファイル確認: {{name}}',\n 'metric.filecheck.description':\n 'リポジトリーに {{name}} ファイルが存在するかを確認します。',\n 'metric.lastUpdated': '最終更新日: {{timestamp}}',\n 'metric.lastUpdatedNotAvailable': '最終更新日: 利用不可',\n 'metric.someEntitiesNotReportingValues':\n 'エンティティーがこの指標に関連する値を報告していません。',\n\n // Threshold translations\n 'thresholds.success': '成功',\n 'thresholds.warning': '警告',\n 'thresholds.error': 'エラー',\n 'thresholds.exist': '存在',\n 'thresholds.missing': '欠落',\n 'thresholds.noEntities': '{{category}} 状態のエンティティーがありません',\n 'thresholds.entities_one': '{{count}} エンティティー',\n 'thresholds.entities_other': '{{count}} エンティティー',\n\n // Entities page translations\n 'entitiesPage.unknownMetric': '不明なメトリクス',\n 'entitiesPage.noDataFound':\n 'ここでデータを確認するには、エンティティがこの指標に関連する値を報告していることを確認してください。',\n 'entitiesPage.missingPermission':\n 'スコアカードのメトリクスを表示するには、管理者に権限を付与してもらうよう依頼してください。',\n 'entitiesPage.metricProviderNotRegistered':\n 'ID {{metricId}} のメトリクスプロバイダーが登録されていません。',\n 'entitiesPage.entitiesTable.title': 'エンティティー',\n 'entitiesPage.entitiesTable.unavailable': '利用不可',\n 'entitiesPage.entitiesTable.titleWithCount': 'エンティティー ({{count}})',\n 'entitiesPage.entitiesTable.header.status': '状態',\n 'entitiesPage.entitiesTable.header.value': '値',\n 'entitiesPage.entitiesTable.header.entity': 'エンティティー',\n 'entitiesPage.entitiesTable.header.owner': '所有者',\n 'entitiesPage.entitiesTable.header.kind': '種類',\n 'entitiesPage.entitiesTable.header.lastUpdated': '最終更新日',\n 'entitiesPage.entitiesTable.footer.allRows': 'すべての行',\n 'entitiesPage.entitiesTable.footer.rows_one': '{{count}} 行',\n 'entitiesPage.entitiesTable.footer.rows_other': '{{count}} 行',\n 'entitiesPage.entitiesTable.footer.of': 'の',\n },\n});\n\nexport default scorecardTranslationJa;\n"],"names":[],"mappings":";;;AAuBA,MAAM,yBAAyB,yBAA0B,CAAA;AAAA,EACvD,GAAK,EAAA,uBAAA;AAAA,EACL,QAAU,EAAA;AAAA;AAAA,IAER,kBAAoB,EAAA,8GAAA;AAAA,IACpB,wBACE,EAAA,8YAAA;AAAA,IACF,mBAAqB,EAAA,wDAAA;AAAA,IACrB,oBAAsB,EAAA,kDAAA;AAAA;AAAA,IAGtB,0BAA4B,EAAA,kDAAA;AAAA,IAC5B,gCACE,EAAA,kTAAA;AAAA,IACF,2BAA6B,EAAA,4CAAA;AAAA,IAC7B,4BAA8B,EAAA,gCAAA;AAAA;AAAA,IAG9B,gBAAkB,EAAA,wEAAA;AAAA,IAClB,sBACE,EAAA,yOAAA;AAAA,IACF,mBAAqB,EAAA,gCAAA;AAAA,IACrB,iBAAmB,EAAA,cAAA;AAAA,IACnB,yBAA2B,EAAA,4CAAA;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CAAoC,EAAA,4CAAA;AAAA,IACpC,wCAA0C,EAAA,0BAAA;AAAA,IAC1C,2CAA6C,EAAA,wDAAA;AAAA,IAC7C,0CAA4C,EAAA,cAAA;AAAA,IAC5C,yCAA2C,EAAA,QAAA;AAAA,IAC3C,0CAA4C,EAAA,4CAAA;AAAA,IAC5C,yCAA2C,EAAA,oBAAA;AAAA,IAC3C,wCAA0C,EAAA,cAAA;AAAA,IAC1C,+CAAiD,EAAA,gCAAA;AAAA,IACjD,2CAA6C,EAAA,gCAAA;AAAA,IAC7C,4CAA8C,EAAA,kBAAA;AAAA,IAC9C,8CAAgD,EAAA,kBAAA;AAAA,IAChD,sCAAwC,EAAA;AAAA;AAE5C,CAAC;;;;"}
|
|
@@ -53,6 +53,10 @@ const scorecardMessages = {
|
|
|
53
53
|
title: "Jira open blocking tickets",
|
|
54
54
|
description: "Highlights the number of critical, blocking issues that are currently open in Jira."
|
|
55
55
|
},
|
|
56
|
+
filecheck: {
|
|
57
|
+
title: "File check: {{name}}",
|
|
58
|
+
description: "Checks whether the {{name}} file exists in the repository."
|
|
59
|
+
},
|
|
56
60
|
lastUpdated: "Last updated: {{timestamp}}",
|
|
57
61
|
lastUpdatedNotAvailable: "Last updated: Not available",
|
|
58
62
|
someEntitiesNotReportingValues: "Some entities are not reporting values related to this metric."
|
|
@@ -62,6 +66,8 @@ const scorecardMessages = {
|
|
|
62
66
|
success: "Success",
|
|
63
67
|
warning: "Warning",
|
|
64
68
|
error: "Error",
|
|
69
|
+
exist: "Exist",
|
|
70
|
+
missing: "Missing",
|
|
65
71
|
noEntities: "No entities in {{category}} state",
|
|
66
72
|
entities_one: "{{count}} entity",
|
|
67
73
|
entities_other: "{{count}} entities"
|
|
@@ -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 // Not found state (404)\n notFound: {\n title: \"404 We couldn't find that page\",\n description:\n 'Try adding an {{indexFile}} file in the root of the docs directory of this repository.',\n readMore: 'Read more',\n goBack: 'Go back',\n contactSupport: 'Contact support',\n altText: 'Page not found',\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 missingAggregationId:\n 'Scorecard misconfigured, aggregation ID (or metric ID) property is not provided', // \"or metric ID\" will be removed in the future\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 noMetricsFound: 'No metrics found for the specified metric ID.',\n multipleMetricsFound:\n 'Multiple metrics found for the specified metric ID. Expected exactly one.',\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 lastUpdated: 'Last updated: {{timestamp}}',\n lastUpdatedNotAvailable: 'Last updated: Not available',\n someEntitiesNotReportingValues:\n 'Some entities are not reporting values related to this metric.',\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 // Entities page translations\n entitiesPage: {\n unknownMetric: 'Unknown metric',\n noDataFound:\n 'To see your data here, check that your entities are reporting values related to this metric.',\n missingPermission:\n 'To view the scorecard metrics, your administrator must grant you the required permission.',\n metricProviderNotRegistered:\n 'Metric provider with ID {{metricId}} is not registered.',\n entitiesTable: {\n title: 'Entities',\n unavailable: 'Unavailable',\n titleWithCount: 'Entities ({{count}})',\n header: {\n status: 'Status',\n value: 'Value',\n entity: 'Entity',\n owner: 'Owner',\n kind: 'Kind',\n lastUpdated: 'Last updated',\n },\n footer: {\n allRows: 'All rows',\n rows_one: '{{count}} row',\n rows_other: '{{count}} rows',\n of: 'of',\n },\n },\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,QAAU,EAAA;AAAA,IACR,KAAO,EAAA,gCAAA;AAAA,IACP,WACE,EAAA,wFA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AA;AAAA,IACP,UAAY,EAAA,mCAAA;AAAA,IACZ,YAAc,EAAA,kBAAA;AAAA,IACd,cAAgB,EAAA;AAAA,GAClB;AAAA;AAAA,EAGA,YAAc,EAAA;AAAA,IACZ,aAAe,EAAA,gBAAA;AAAA,IACf,WACE,EAAA,8FAAA;AAAA,IACF,iBACE,EAAA,2FAAA;AAAA,IACF,2BACE,EAAA,yDAAA;AAAA,IACF,aAAe,EAAA;AAAA,MACb,KAAO,EAAA,UAAA;AAAA,MACP,WAAa,EAAA,aAAA;AAAA,MACb,cAAgB,EAAA,sBAAA;AAAA,MAChB,MAAQ,EAAA;AAAA,QACN,MAAQ,EAAA,QAAA;AAAA,QACR,KAAO,EAAA,OAAA;AAAA,QACP,MAAQ,EAAA,QAAA;AAAA,QACR,KAAO,EAAA,OAAA;AAAA,QACP,IAAM,EAAA,MAAA;AAAA,QACN,WAAa,EAAA;AAAA,OACf;AAAA,MACA,MAAQ,EAAA;AAAA,QACN,OAAS,EAAA,UAAA;AAAA,QACT,QAAU,EAAA,eAAA;AAAA,QACV,UAAY,EAAA,gBAAA;AAAA,QACZ,EAAI,EAAA;AAAA;AACN;AACF;AAEJ;AAMO,MAAM,0BAA0B,oBAAqB,CAAA;AAAA,EAC1D,EAAI,EAAA,kBAAA;AAAA,EACJ,QAAU,EAAA;AACZ,CAAC;;;;"}
|
|
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 // Not found state (404)\n notFound: {\n title: \"404 We couldn't find that page\",\n description:\n 'Try adding an {{indexFile}} file in the root of the docs directory of this repository.',\n readMore: 'Read more',\n goBack: 'Go back',\n contactSupport: 'Contact support',\n altText: 'Page not found',\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 missingAggregationId:\n 'Scorecard misconfigured, aggregation ID (or metric ID) property is not provided', // \"or metric ID\" will be removed in the future\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 noMetricsFound: 'No metrics found for the specified metric ID.',\n multipleMetricsFound:\n 'Multiple metrics found for the specified metric ID. Expected exactly one.',\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 filecheck: {\n title: 'File check: {{name}}',\n description: 'Checks whether the {{name}} file exists in the repository.',\n },\n lastUpdated: 'Last updated: {{timestamp}}',\n lastUpdatedNotAvailable: 'Last updated: Not available',\n someEntitiesNotReportingValues:\n 'Some entities are not reporting values related to this metric.',\n },\n\n // Threshold translations\n thresholds: {\n success: 'Success',\n warning: 'Warning',\n error: 'Error',\n exist: 'Exist',\n missing: 'Missing',\n noEntities: 'No entities in {{category}} state',\n entities_one: '{{count}} entity',\n entities_other: '{{count}} entities',\n },\n\n // Entities page translations\n entitiesPage: {\n unknownMetric: 'Unknown metric',\n noDataFound:\n 'To see your data here, check that your entities are reporting values related to this metric.',\n missingPermission:\n 'To view the scorecard metrics, your administrator must grant you the required permission.',\n metricProviderNotRegistered:\n 'Metric provider with ID {{metricId}} is not registered.',\n entitiesTable: {\n title: 'Entities',\n unavailable: 'Unavailable',\n titleWithCount: 'Entities ({{count}})',\n header: {\n status: 'Status',\n value: 'Value',\n entity: 'Entity',\n owner: 'Owner',\n kind: 'Kind',\n lastUpdated: 'Last updated',\n },\n footer: {\n allRows: 'All rows',\n rows_one: '{{count}} row',\n rows_other: '{{count}} rows',\n of: 'of',\n },\n },\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,QAAU,EAAA;AAAA,IACR,KAAO,EAAA,gCAAA;AAAA,IACP,WACE,EAAA,wFAAA;AAAA,IACF,QAAU,EAAA,WAAA;AAAA,IACV,MAAQ,EAAA,SAAA;AAAA,IACR,cAAgB,EAAA,iBAAA;AAAA,IAChB,OAAS,EAAA;AAAA,GACX;AAAA;AAAA,EAGA,kBAAoB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IACT,UAAY,EAAA,mCAAA;AAAA,IACZ,YAAc,EAAA,kBAAA;AAAA,IACd,cAAgB,EAAA;AAAA,GAClB;AAAA;AAAA,EAGA,YAAc,EAAA;AAAA,IACZ,aAAe,EAAA,gBAAA;AAAA,IACf,WACE,EAAA,8FAAA;AAAA,IACF,iBACE,EAAA,2FAAA;AAAA,IACF,2BACE,EAAA,yDAAA;AAAA,IACF,aAAe,EAAA;AAAA,MACb,KAAO,EAAA,UAAA;AAAA,MACP,WAAa,EAAA,aAAA;AAAA,MACb,cAAgB,EAAA,sBAAA;AAAA,MAChB,MAAQ,EAAA;AAAA,QACN,MAAQ,EAAA,QAAA;AAAA,QACR,KAAO,EAAA,OAAA;AAAA,QACP,MAAQ,EAAA,QAAA;AAAA,QACR,KAAO,EAAA,OAAA;AAAA,QACP,IAAM,EAAA,MAAA;AAAA,QACN,WAAa,EAAA;AAAA,OACf;AAAA,MACA,MAAQ,EAAA;AAAA,QACN,OAAS,EAAA,UAAA;AAAA,QACT,QAAU,EAAA,eAAA;AAAA,QACV,UAAY,EAAA,gBAAA;AAAA,QACZ,EAAI,EAAA;AAAA;AACN;AACF;AAEJ;AAMO,MAAM,0BAA0B,oBAAqB,CAAA;AAAA,EAC1D,EAAI,EAAA,kBAAA;AAAA,EACJ,QAAU,EAAA;AACZ,CAAC;;;;"}
|
|
@@ -38,12 +38,16 @@ declare const scorecardTranslationRef: _backstage_frontend_plugin_api.Translatio
|
|
|
38
38
|
readonly "metric.github.open_prs.description": string;
|
|
39
39
|
readonly "metric.jira.open_issues.title": string;
|
|
40
40
|
readonly "metric.jira.open_issues.description": string;
|
|
41
|
+
readonly "metric.filecheck.title": string;
|
|
42
|
+
readonly "metric.filecheck.description": string;
|
|
41
43
|
readonly "metric.lastUpdated": string;
|
|
42
44
|
readonly "metric.lastUpdatedNotAvailable": string;
|
|
43
45
|
readonly "metric.someEntitiesNotReportingValues": string;
|
|
44
46
|
readonly "thresholds.success": string;
|
|
45
47
|
readonly "thresholds.warning": string;
|
|
46
48
|
readonly "thresholds.error": string;
|
|
49
|
+
readonly "thresholds.exist": string;
|
|
50
|
+
readonly "thresholds.missing": string;
|
|
47
51
|
readonly "thresholds.noEntities": string;
|
|
48
52
|
readonly "thresholds.entities_one": string;
|
|
49
53
|
readonly "thresholds.entities_other": string;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
function resolveMetricTranslation(t, metricId, field, fallback) {
|
|
2
|
+
const key = `metric.${metricId}.${field}`;
|
|
3
|
+
const translated = t(key, {});
|
|
4
|
+
if (translated !== key) return translated;
|
|
5
|
+
const dotIndex = metricId.indexOf(".");
|
|
6
|
+
if (dotIndex !== -1) {
|
|
7
|
+
const base = metricId.slice(0, dotIndex);
|
|
8
|
+
const name = metricId.slice(dotIndex + 1);
|
|
9
|
+
const templateKey = `metric.${base}.${field}`;
|
|
10
|
+
const templateTranslated = t(templateKey, { name });
|
|
11
|
+
if (templateTranslated !== templateKey) return templateTranslated;
|
|
12
|
+
}
|
|
13
|
+
return fallback ?? translated;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export { resolveMetricTranslation };
|
|
17
|
+
//# sourceMappingURL=translationUtils.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"translationUtils.esm.js","sources":["../../src/utils/translationUtils.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 { TranslationFunction } from '@backstage/core-plugin-api/alpha';\nimport { scorecardTranslationRef } from '../translations';\n\ntype ScorecardTranslationFunction = TranslationFunction<\n typeof scorecardTranslationRef.T\n>;\n\n/**\n * Resolves a metric's translated title or description using a cascading lookup:\n *\n * 1. Exact key: metric.<metricId>.<field> (e.g. metric.github.open_prs.title)\n * 2. Template key: metric.<provider>.<field> with name = <rest of metricId>\n * The first dot-separated segment is always the provider/namespace.\n * E.g. filecheck.codeowners -> metric.filecheck.title with name = codeowners\n * 3. Falls back to `fallback` when provided, otherwise returns the raw\n * translation key.\n */\nexport function resolveMetricTranslation(\n t: ScorecardTranslationFunction,\n metricId: string,\n field: 'title' | 'description',\n fallback?: string,\n): string {\n const key = `metric.${metricId}.${field}`;\n const translated = t(key as any, {});\n if (translated !== key) return translated;\n\n const dotIndex = metricId.indexOf('.');\n if (dotIndex !== -1) {\n const base = metricId.slice(0, dotIndex);\n const name = metricId.slice(dotIndex + 1);\n const templateKey = `metric.${base}.${field}`;\n const templateTranslated = t(templateKey as any, { name });\n if (templateTranslated !== templateKey) return templateTranslated;\n }\n\n return fallback ?? translated;\n}\n"],"names":[],"mappings":"AAiCO,SAAS,wBACd,CAAA,CAAA,EACA,QACA,EAAA,KAAA,EACA,QACQ,EAAA;AACR,EAAA,MAAM,GAAM,GAAA,CAAA,OAAA,EAAU,QAAQ,CAAA,CAAA,EAAI,KAAK,CAAA,CAAA;AACvC,EAAA,MAAM,UAAa,GAAA,CAAA,CAAE,GAAY,EAAA,EAAE,CAAA;AACnC,EAAI,IAAA,UAAA,KAAe,KAAY,OAAA,UAAA;AAE/B,EAAM,MAAA,QAAA,GAAW,QAAS,CAAA,OAAA,CAAQ,GAAG,CAAA;AACrC,EAAA,IAAI,aAAa,EAAI,EAAA;AACnB,IAAA,MAAM,IAAO,GAAA,QAAA,CAAS,KAAM,CAAA,CAAA,EAAG,QAAQ,CAAA;AACvC,IAAA,MAAM,IAAO,GAAA,QAAA,CAAS,KAAM,CAAA,QAAA,GAAW,CAAC,CAAA;AACxC,IAAA,MAAM,WAAc,GAAA,CAAA,OAAA,EAAU,IAAI,CAAA,CAAA,EAAI,KAAK,CAAA,CAAA;AAC3C,IAAA,MAAM,kBAAqB,GAAA,CAAA,CAAE,WAAoB,EAAA,EAAE,MAAM,CAAA;AACzD,IAAI,IAAA,kBAAA,KAAuB,aAAoB,OAAA,kBAAA;AAAA;AAGjD,EAAA,OAAO,QAAY,IAAA,UAAA;AACrB;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@red-hat-developer-hub/backstage-plugin-scorecard",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.6.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"main": "./dist/index.esm.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"@backstage/theme": "^0.7.2",
|
|
76
76
|
"@mui/icons-material": "5.18.0",
|
|
77
77
|
"@mui/material": "5.18.0",
|
|
78
|
-
"@red-hat-developer-hub/backstage-plugin-scorecard-common": "^2.
|
|
78
|
+
"@red-hat-developer-hub/backstage-plugin-scorecard-common": "^2.6.0",
|
|
79
79
|
"@tanstack/react-query": "^5.95.2",
|
|
80
80
|
"date-fns": "^4.1.0",
|
|
81
81
|
"react-use": "^17.2.4",
|