diff --git a/plugins/kubernetes-react/report-alpha.api.md b/plugins/kubernetes-react/report-alpha.api.md index 85d50bef6d..e1131d103e 100644 --- a/plugins/kubernetes-react/report-alpha.api.md +++ b/plugins/kubernetes-react/report-alpha.api.md @@ -13,16 +13,20 @@ export const kubernetesReactTranslationRef: TranslationRef< readonly 'events.eventTooltip': '{{eventType}} event'; readonly 'events.firstEvent': 'First event {{timeAgo}} (count: {{count}})'; readonly 'namespace.label': 'namespace:'; + readonly 'namespace.labelWithValue': 'namespace: {{namespace}}'; readonly 'cluster.label': 'Cluster'; readonly 'cluster.pods': 'pods'; + readonly 'cluster.pods_one': '{{count}} pod'; + readonly 'cluster.pods_other': '{{count}} pods'; readonly 'cluster.podsWithErrors': 'pods with errors'; + readonly 'cluster.podsWithErrors_one': '{{count}} pod with errors'; + readonly 'cluster.podsWithErrors_other': '{{count}} pods with errors'; readonly 'cluster.noPodsWithErrors': 'No pods with errors'; - readonly 'cluster.podWithErrors_one': '{{count}} pod with errors'; - readonly 'cluster.podWithErrors_other': '{{count}} pods with errors'; readonly 'errorPanel.message': 'There was a problem retrieving some Kubernetes resources for the entity: {{entityName}}. This could mean that the Error Reporting card is not completely accurate.'; readonly 'errorPanel.title': 'There was a problem retrieving Kubernetes objects'; readonly 'errorPanel.errorsLabel': 'Errors'; readonly 'errorPanel.clusterLabel': 'Cluster'; + readonly 'errorPanel.clusterLabelValue': 'Cluster: {{cluster}}'; readonly 'errorPanel.fetchError': 'Error communicating with Kubernetes: {{errorType}}, message: {{message}}'; readonly 'errorPanel.resourceError': "Error fetching Kubernetes resource: '{{resourcePath}}', error: {{errorType}}, status code: {{statusCode}}"; readonly 'pods.pods_one': '{{count}} pod'; @@ -56,8 +60,11 @@ export const kubernetesReactTranslationRef: TranslationRef< readonly 'podDrawer.resourceUtilization': 'Resource utilization'; readonly 'hpa.minReplicas': 'min replicas'; readonly 'hpa.maxReplicas': 'max replicas'; + readonly 'hpa.replicasSummary': 'min replicas {{min}} / max replicas {{max}}'; readonly 'hpa.currentCpuUsage': 'current CPU usage:'; + readonly 'hpa.currentCpuUsageLabel': 'current CPU usage: {{value}}%'; readonly 'hpa.targetCpuUsage': 'target CPU usage:'; + readonly 'hpa.targetCpuUsageLabel': 'target CPU usage: {{value}}%'; readonly 'errorReporting.columns.name': 'name'; readonly 'errorReporting.columns.kind': 'kind'; readonly 'errorReporting.columns.messages': 'messages'; diff --git a/plugins/kubernetes-react/src/components/CustomResources/ArgoRollouts/Rollout.tsx b/plugins/kubernetes-react/src/components/CustomResources/ArgoRollouts/Rollout.tsx index 60f5c646f1..93334c2b35 100644 --- a/plugins/kubernetes-react/src/components/CustomResources/ArgoRollouts/Rollout.tsx +++ b/plugins/kubernetes-react/src/components/CustomResources/ArgoRollouts/Rollout.tsx @@ -129,19 +129,23 @@ const RolloutSummary = ({ {t('hpa.replicasSummary', { - min: hpa.spec?.minReplicas ?? '?', - max: hpa.spec?.maxReplicas ?? '?', + min: String(hpa.spec?.minReplicas ?? '?'), + max: String(hpa.spec?.maxReplicas ?? '?'), })} - {t('hpa.currentCpuUsageLabel', { value: cpuUtil ?? '?' })} + {t('hpa.currentCpuUsageLabel', { + value: String(cpuUtil ?? '?'), + })} - {t('hpa.targetCpuUsageLabel', { value: specCpuUtil ?? '?' })} + {t('hpa.targetCpuUsageLabel', { + value: String(specCpuUtil ?? '?'), + })} @@ -163,7 +167,7 @@ const RolloutSummary = ({ {numberOfPodsWithErrors > 0 ? ( - {t('cluster.podWithErrors', { count: numberOfPodsWithErrors })} + {t('cluster.podsWithErrors', { count: numberOfPodsWithErrors })} ) : ( {t('cluster.noPodsWithErrors')} diff --git a/plugins/kubernetes-react/src/components/DaemonSetsAccordions/DaemonSetsAccordions.tsx b/plugins/kubernetes-react/src/components/DaemonSetsAccordions/DaemonSetsAccordions.tsx index 99a436755e..b2f5645444 100644 --- a/plugins/kubernetes-react/src/components/DaemonSetsAccordions/DaemonSetsAccordions.tsx +++ b/plugins/kubernetes-react/src/components/DaemonSetsAccordions/DaemonSetsAccordions.tsx @@ -82,7 +82,7 @@ const DaemonSetSummary = ({ {numberOfPodsWithErrors > 0 ? ( - {t('cluster.podWithErrors', { count: numberOfPodsWithErrors })} + {t('cluster.podsWithErrors', { count: numberOfPodsWithErrors })} ) : ( {t('cluster.noPodsWithErrors')} diff --git a/plugins/kubernetes-react/src/components/DeploymentsAccordions/DeploymentsAccordions.tsx b/plugins/kubernetes-react/src/components/DeploymentsAccordions/DeploymentsAccordions.tsx index 306bc6d9cc..961d07b761 100644 --- a/plugins/kubernetes-react/src/components/DeploymentsAccordions/DeploymentsAccordions.tsx +++ b/plugins/kubernetes-react/src/components/DeploymentsAccordions/DeploymentsAccordions.tsx @@ -101,19 +101,23 @@ const DeploymentSummary = ({ {t('hpa.replicasSummary', { - min: hpa.spec?.minReplicas ?? '?', - max: hpa.spec?.maxReplicas ?? '?', + min: String(hpa.spec?.minReplicas ?? '?'), + max: String(hpa.spec?.maxReplicas ?? '?'), })} - {t('hpa.currentCpuUsageLabel', { value: cpuUtil ?? '?' })} + {t('hpa.currentCpuUsageLabel', { + value: String(cpuUtil ?? '?'), + })} - {t('hpa.targetCpuUsageLabel', { value: specCpuUtil ?? '?' })} + {t('hpa.targetCpuUsageLabel', { + value: String(specCpuUtil ?? '?'), + })} @@ -135,7 +139,7 @@ const DeploymentSummary = ({ {numberOfPodsWithErrors > 0 ? ( - {t('cluster.podWithErrors', { count: numberOfPodsWithErrors })} + {t('cluster.podsWithErrors', { count: numberOfPodsWithErrors })} ) : ( {t('cluster.noPodsWithErrors')} diff --git a/plugins/kubernetes-react/src/components/StatefulSetsAccordions/StatefulSetsAccordions.tsx b/plugins/kubernetes-react/src/components/StatefulSetsAccordions/StatefulSetsAccordions.tsx index 389ecce08d..e1a33474f2 100644 --- a/plugins/kubernetes-react/src/components/StatefulSetsAccordions/StatefulSetsAccordions.tsx +++ b/plugins/kubernetes-react/src/components/StatefulSetsAccordions/StatefulSetsAccordions.tsx @@ -130,7 +130,7 @@ const StatefulSetSummary = ({ {numberOfPodsWithErrors > 0 ? ( - {t('cluster.podWithErrors', { count: numberOfPodsWithErrors })} + {t('cluster.podsWithErrors', { count: numberOfPodsWithErrors })} ) : ( {t('cluster.noPodsWithErrors')}