diff --git a/locales/en/plugin__networking-console-plugin.json b/locales/en/plugin__networking-console-plugin.json index e62169eb..95a18eb6 100644 --- a/locales/en/plugin__networking-console-plugin.json +++ b/locales/en/plugin__networking-console-plugin.json @@ -98,6 +98,7 @@ "Copied to clipboard": "Copied to clipboard", "Copy": "Copy", "Copy to clipboard": "Copy to clipboard", + "CPU": "CPU", "CrashLoopBackOff": "CrashLoopBackOff", "CrashLoopBackOff indicates that the application within the container is failing to start properly.": "CrashLoopBackOff indicates that the application within the container is failing to start properly.", "Create": "Create", @@ -114,6 +115,7 @@ "Create Service": "Create Service", "Create UserDefinedNetwork": "Create UserDefinedNetwork", "Create Virtual Machine Network": "Create Virtual Machine Network", + "Created": "Created", "Created at": "Created at", "Current selections": "Current selections", "Custom route": "Custom route", @@ -201,6 +203,7 @@ "Invalid IP address or subnet format": "Invalid IP address or subnet format", "Invalid subnet format": "Invalid subnet format", "Invalid YAML cannot be persisted": "Invalid YAML cannot be persisted", + "IP address": "IP address", "IP address management": "IP address management", "IP Addresses accepting traffic for service": "IP Addresses accepting traffic for service", "IP block exceptions are not supported and would cause the entire IP block section to be ignored.": "IP block exceptions are not supported and would cause the entire IP block section to be ignored.", @@ -231,6 +234,7 @@ "matchExpressions is a list of label selector requirements. The requirements are ANDed.": "matchExpressions is a list of label selector requirements. The requirements are ANDed.", "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is \"key\", the operator is \"In\", and the values array contains only \"value\". The requirements are ANDed.": "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is \"key\", the operator is \"In\", and the values array contains only \"value\". The requirements are ANDed.", "Maximum Transmission Unit (MTU)": "Maximum Transmission Unit (MTU)", + "Memory": "Memory", "Message": "Message", "Metrics": "Metrics", "Missing installed operators": "Missing installed operators", @@ -281,6 +285,7 @@ "No results found for \"{{inputValue}}\"": "No results found for \"{{inputValue}}\"", "No route status": "No route status", "No selector": "No selector", + "Node": "Node", "Node network mapping": "Node network mapping", "Node port": "Node port", "NodeNetworkConfigurationPolicy": "NodeNetworkConfigurationPolicy", @@ -325,6 +330,7 @@ "Protocol": "Protocol", "Public hostname for the Route. If not specified, a hostname is generated.": "Public hostname for the Route. If not specified, a hostname is generated.", "Re-encrypt": "Re-encrypt", + "Ready": "Ready", "Reason": "Reason", "Receiving Traffic": "Receiving Traffic", "Redirect": "Redirect", @@ -338,6 +344,7 @@ "Remove port": "Remove port", "Remove subnets?": "Remove subnets?", "Resource name": "Resource name", + "Restarts": "Restarts", "Restricted Access": "Restricted Access", "Reveal": "Reveal", "Review selected Namespace(s)": "Review selected Namespace(s)", diff --git a/locales/es/plugin__networking-console-plugin.json b/locales/es/plugin__networking-console-plugin.json index ee89f0c0..dfc4f8f2 100644 --- a/locales/es/plugin__networking-console-plugin.json +++ b/locales/es/plugin__networking-console-plugin.json @@ -101,6 +101,7 @@ "Copied to clipboard": "Copiado al portapapeles", "Copy": "Copy", "Copy to clipboard": "Copiar al portapapeles", + "CPU": "", "CrashLoopBackOff": "CrashLoopBackOff", "CrashLoopBackOff indicates that the application within the container is failing to start properly.": "CrashLoopBackOff indica que la aplicación dentro del contenedor no se inicia correctamente.", "Create": "Crear", @@ -117,6 +118,7 @@ "Create Service": "Crear servicio", "Create UserDefinedNetwork": "Create UserDefinedNetwork", "Create Virtual Machine Network": "Create Virtual Machine Network", + "Created": "", "Created at": "Creado en", "Current selections": "Selecciones actuales", "Custom route": "Ruta personalizada", @@ -204,6 +206,7 @@ "Invalid IP address or subnet format": "Dirección IP o formato de subred no válidos", "Invalid subnet format": "Formato de subred no válido", "Invalid YAML cannot be persisted": "YAML no válido no se puede conservar", + "IP address": "", "IP address management": "Gestión de direcciones IP", "IP Addresses accepting traffic for service": "Direcciones IP que aceptan tráfico para el servicio", "IP block exceptions are not supported and would cause the entire IP block section to be ignored.": "Las excepciones de bloqueo de IP no son compatibles y provocarían que se ignore toda la sección del bloqueo de IP.", @@ -234,6 +237,7 @@ "matchExpressions is a list of label selector requirements. The requirements are ANDed.": "matchExpressions is a list of label selector requirements. The requirements are ANDed.", "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is \"key\", the operator is \"In\", and the values array contains only \"value\". The requirements are ANDed.": "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is \"key\", the operator is \"In\", and the values array contains only \"value\". The requirements are ANDed.", "Maximum Transmission Unit (MTU)": "Maximum Transmission Unit (MTU)", + "Memory": "", "Message": "Mensaje", "Metrics": "Métricas", "Missing installed operators": "Operadores instalados faltantes", @@ -284,6 +288,7 @@ "No results found for \"{{inputValue}}\"": "No se encontraron resultados para “{{inputValue}}”", "No route status": "Sin estado de ruta", "No selector": "Sin selector", + "Node": "", "Node network mapping": "Node network mapping", "Node port": "Puerto de nodo", "NodeNetworkConfigurationPolicy": "NodeNetworkConfigurationPolicy", @@ -328,6 +333,7 @@ "Protocol": "Protocolo", "Public hostname for the Route. If not specified, a hostname is generated.": "Nombre de host público para la ruta. Si no se especifica, se genera un nombre de host.", "Re-encrypt": "Volver a cifrar", + "Ready": "", "Reason": "Razón", "Receiving Traffic": "Recepción de tráfico", "Redirect": "Redirigir", @@ -341,6 +347,7 @@ "Remove port": "Quitar puerto", "Remove subnets?": "Remove subnets?", "Resource name": "Nombre del recurso", + "Restarts": "", "Restricted Access": "Acceso restringido", "Reveal": "Mostrar", "Review selected Namespace(s)": "Review selected Namespace(s)", diff --git a/locales/fr/plugin__networking-console-plugin.json b/locales/fr/plugin__networking-console-plugin.json index a10ea1ad..34940156 100644 --- a/locales/fr/plugin__networking-console-plugin.json +++ b/locales/fr/plugin__networking-console-plugin.json @@ -101,6 +101,7 @@ "Copied to clipboard": "Copié dans le Presse-papiers", "Copy": "Copy", "Copy to clipboard": "Copier dans le Presse-papiers", + "CPU": "", "CrashLoopBackOff": "CrashLoopBackOff", "CrashLoopBackOff indicates that the application within the container is failing to start properly.": "CrashLoopBackOff indique que l’application dans le conteneur ne parvient pas à démarrer correctement.", "Create": "Créer", @@ -117,6 +118,7 @@ "Create Service": "Créer un service", "Create UserDefinedNetwork": "Create UserDefinedNetwork", "Create Virtual Machine Network": "Create Virtual Machine Network", + "Created": "", "Created at": "Heure de création", "Current selections": "Sélections actuelles", "Custom route": "Itinéraire personnalisé", @@ -204,6 +206,7 @@ "Invalid IP address or subnet format": "Adresse IP ou format de sous-réseau non valide", "Invalid subnet format": "Format de sous-réseau non valide", "Invalid YAML cannot be persisted": "Un code YAML non valide ne peut pas être rendu persistant", + "IP address": "", "IP address management": "Gestion des adresses IP", "IP Addresses accepting traffic for service": "Adresses IP acceptant le trafic pour le service", "IP block exceptions are not supported and would cause the entire IP block section to be ignored.": "Les exceptions de bloc IP ne sont pas prises en charge, car elles auraient pour effet d’ignorer la totalité de la section Bloc IP.", @@ -234,6 +237,7 @@ "matchExpressions is a list of label selector requirements. The requirements are ANDed.": "matchExpressions is a list of label selector requirements. The requirements are ANDed.", "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is \"key\", the operator is \"In\", and the values array contains only \"value\". The requirements are ANDed.": "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is \"key\", the operator is \"In\", and the values array contains only \"value\". The requirements are ANDed.", "Maximum Transmission Unit (MTU)": "Maximum Transmission Unit (MTU)", + "Memory": "", "Message": "Message", "Metrics": "Métriques", "Missing installed operators": "Opérateurs installés manquants", @@ -284,6 +288,7 @@ "No results found for \"{{inputValue}}\"": "Aucun résultat trouvé pour \"{{inputValue}}\"", "No route status": "Aucun statut d’itinéraire", "No selector": "Aucun sélecteur", + "Node": "", "Node network mapping": "Node network mapping", "Node port": "Port du nœud", "NodeNetworkConfigurationPolicy": "NodeNetworkConfigurationPolicy", @@ -328,6 +333,7 @@ "Protocol": "Protocole", "Public hostname for the Route. If not specified, a hostname is generated.": "Nom d’hôte public de l’itinéraire. En l’absence de spécification, un nom d’hôte est généré.", "Re-encrypt": "Rechiffrer", + "Ready": "", "Reason": "Motif", "Receiving Traffic": "Réception du trafic", "Redirect": "Rediriger", @@ -341,6 +347,7 @@ "Remove port": "Supprimer le port", "Remove subnets?": "Remove subnets?", "Resource name": "Nom de la ressource", + "Restarts": "", "Restricted Access": "Accès restreint", "Reveal": "Afficher", "Review selected Namespace(s)": "Review selected Namespace(s)", diff --git a/locales/ja/plugin__networking-console-plugin.json b/locales/ja/plugin__networking-console-plugin.json index 82f03514..f7401570 100644 --- a/locales/ja/plugin__networking-console-plugin.json +++ b/locales/ja/plugin__networking-console-plugin.json @@ -95,6 +95,7 @@ "Copied to clipboard": "クリップボードにコピー済み", "Copy": "Copy", "Copy to clipboard": "クリップボードにコピー", + "CPU": "", "CrashLoopBackOff": "CrashLoopBackOff", "CrashLoopBackOff indicates that the application within the container is failing to start properly.": "CrashLoopBackOff は、コンテナー内のアプリケーションが正しく起動できないことを示します。", "Create": "作成", @@ -111,6 +112,7 @@ "Create Service": "Service の作成", "Create UserDefinedNetwork": "Create UserDefinedNetwork", "Create Virtual Machine Network": "Create Virtual Machine Network", + "Created": "", "Created at": "作成日時", "Current selections": "現在の選択内容", "Custom route": "カスタムルート", @@ -198,6 +200,7 @@ "Invalid IP address or subnet format": "無効な IP アドレスまたはサブネット形式", "Invalid subnet format": "無効なサブネット形式", "Invalid YAML cannot be persisted": "無効な YAML を永続化できません", + "IP address": "", "IP address management": "IP アドレス管理", "IP Addresses accepting traffic for service": "サービス用のトラフィックを受け入れる IP アドレス", "IP block exceptions are not supported and would cause the entire IP block section to be ignored.": "IP ブロックの例外はサポートされず、これにより IP ブロックセクション全体が無視されます。", @@ -228,6 +231,7 @@ "matchExpressions is a list of label selector requirements. The requirements are ANDed.": "matchExpressions is a list of label selector requirements. The requirements are ANDed.", "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is \"key\", the operator is \"In\", and the values array contains only \"value\". The requirements are ANDed.": "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is \"key\", the operator is \"In\", and the values array contains only \"value\". The requirements are ANDed.", "Maximum Transmission Unit (MTU)": "Maximum Transmission Unit (MTU)", + "Memory": "", "Message": "メッセージ", "Metrics": "メトリクス", "Missing installed operators": "インストール済みの Operator がありません", @@ -278,6 +282,7 @@ "No results found for \"{{inputValue}}\"": "\"{{inputValue}}\" の結果が見つかりません", "No route status": "ルートステータスなし", "No selector": "セレクターなし", + "Node": "", "Node network mapping": "Node network mapping", "Node port": "ノードポート", "NodeNetworkConfigurationPolicy": "NodeNetworkConfigurationPolicy", @@ -322,6 +327,7 @@ "Protocol": "プロトコル", "Public hostname for the Route. If not specified, a hostname is generated.": "Route のパブリックホスト名。指定されない場合は、ホスト名が生成されます。", "Re-encrypt": "Re-encrypt", + "Ready": "", "Reason": "理由", "Receiving Traffic": "トラフィック受信中", "Redirect": "リダイレクト", @@ -335,6 +341,7 @@ "Remove port": "ポートの削除", "Remove subnets?": "Remove subnets?", "Resource name": "リソース名", + "Restarts": "", "Restricted Access": "制限されたアクセス", "Reveal": "公開", "Review selected Namespace(s)": "Review selected Namespace(s)", diff --git a/locales/ko/plugin__networking-console-plugin.json b/locales/ko/plugin__networking-console-plugin.json index 821d2ad1..9bed0686 100644 --- a/locales/ko/plugin__networking-console-plugin.json +++ b/locales/ko/plugin__networking-console-plugin.json @@ -95,6 +95,7 @@ "Copied to clipboard": "클립 보드에 복사됨", "Copy": "Copy", "Copy to clipboard": "클립 보드에 복사", + "CPU": "", "CrashLoopBackOff": "CrashLoopBackOff", "CrashLoopBackOff indicates that the application within the container is failing to start properly.": "CrashLoopBackOff는 컨테이너 내의 애플리케이션이 제대로 시작되지 않고 있음을 나타냅니다.", "Create": "만들기", @@ -111,6 +112,7 @@ "Create Service": "서비스 생성", "Create UserDefinedNetwork": "Create UserDefinedNetwork", "Create Virtual Machine Network": "Create Virtual Machine Network", + "Created": "", "Created at": "작성일", "Current selections": "현재 선택 사항", "Custom route": "사용자 지정 경로", @@ -198,6 +200,7 @@ "Invalid IP address or subnet format": "잘못된 IP 주소 또는 서브넷 형식", "Invalid subnet format": "잘못된 서브넷 형식", "Invalid YAML cannot be persisted": "잘못된 YAML을 유지할 수 없습니다.", + "IP address": "", "IP address management": "IP 주소 관리", "IP Addresses accepting traffic for service": "서비스 트래픽을 허용하는 IP 주소", "IP block exceptions are not supported and would cause the entire IP block section to be ignored.": "IP 블록 예외는 지원되지 않으므로 전체 IP 블록 섹션이 무시됩니다.", @@ -228,6 +231,7 @@ "matchExpressions is a list of label selector requirements. The requirements are ANDed.": "matchExpressions is a list of label selector requirements. The requirements are ANDed.", "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is \"key\", the operator is \"In\", and the values array contains only \"value\". The requirements are ANDed.": "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is \"key\", the operator is \"In\", and the values array contains only \"value\". The requirements are ANDed.", "Maximum Transmission Unit (MTU)": "Maximum Transmission Unit (MTU)", + "Memory": "", "Message": "메시지", "Metrics": "메트릭", "Missing installed operators": "설치된 Operator가 누락됨", @@ -278,6 +282,7 @@ "No results found for \"{{inputValue}}\"": "\"{{inputValue}}\"에 대한 결과를 찾을 수 없음", "No route status": "라우팅 상태 없음", "No selector": "선택기 없음", + "Node": "", "Node network mapping": "Node network mapping", "Node port": "노드 포트", "NodeNetworkConfigurationPolicy": "NodeNetworkConfigurationPolicy", @@ -322,6 +327,7 @@ "Protocol": "프로토콜", "Public hostname for the Route. If not specified, a hostname is generated.": "경로의 공개 호스트 이름입니다. 지정되지 않은 경우 호스트 이름이 생성됩니다.", "Re-encrypt": "Re-encrypt", + "Ready": "", "Reason": "이유", "Receiving Traffic": "트래픽 수신", "Redirect": "리디렉션", @@ -335,6 +341,7 @@ "Remove port": "포트 제거", "Remove subnets?": "Remove subnets?", "Resource name": "리소스 이름", + "Restarts": "", "Restricted Access": "제한된 액세스", "Reveal": "공개", "Review selected Namespace(s)": "Review selected Namespace(s)", diff --git a/locales/zh/plugin__networking-console-plugin.json b/locales/zh/plugin__networking-console-plugin.json index d4a76297..f59a9770 100644 --- a/locales/zh/plugin__networking-console-plugin.json +++ b/locales/zh/plugin__networking-console-plugin.json @@ -95,6 +95,7 @@ "Copied to clipboard": "复制到剪贴板", "Copy": "Copy", "Copy to clipboard": "复制到剪贴板", + "CPU": "", "CrashLoopBackOff": "CrashLoopBackOff", "CrashLoopBackOff indicates that the application within the container is failing to start properly.": "CrashLoopBackOff 表示容器内的应用程序无法正确启动。", "Create": "创建", @@ -111,6 +112,7 @@ "Create Service": "创建服务", "Create UserDefinedNetwork": "Create UserDefinedNetwork", "Create Virtual Machine Network": "Create Virtual Machine Network", + "Created": "", "Created at": "创建于", "Current selections": "当前选择", "Custom route": "自定义路线", @@ -198,6 +200,7 @@ "Invalid IP address or subnet format": "无效的 IP 地址或子网格式", "Invalid subnet format": "无效的子网格式", "Invalid YAML cannot be persisted": "无效的 YAML 无法保留", + "IP address": "", "IP address management": "IP 地址管理", "IP Addresses accepting traffic for service": "服务接受的流量的 IP 地址", "IP block exceptions are not supported and would cause the entire IP block section to be ignored.": "不支持 IP 块例外,并可能导致忽略整个 IP 块部分。", @@ -228,6 +231,7 @@ "matchExpressions is a list of label selector requirements. The requirements are ANDed.": "matchExpressions is a list of label selector requirements. The requirements are ANDed.", "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is \"key\", the operator is \"In\", and the values array contains only \"value\". The requirements are ANDed.": "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is \"key\", the operator is \"In\", and the values array contains only \"value\". The requirements are ANDed.", "Maximum Transmission Unit (MTU)": "Maximum Transmission Unit (MTU)", + "Memory": "", "Message": "消息", "Metrics": "指标", "Missing installed operators": "缺少安装的 Operator", @@ -278,6 +282,7 @@ "No results found for \"{{inputValue}}\"": "没有为 \"{{inputValue}}\" 找到结果", "No route status": "没有路由状态", "No selector": "没有选择器", + "Node": "", "Node network mapping": "Node network mapping", "Node port": "节点端口", "NodeNetworkConfigurationPolicy": "NodeNetworkConfigurationPolicy", @@ -322,6 +327,7 @@ "Protocol": "协议", "Public hostname for the Route. If not specified, a hostname is generated.": "路由的公共主机名。如果没有指定,则会生成一个主机名。", "Re-encrypt": "Re-encrypt", + "Ready": "", "Reason": "原因", "Receiving Traffic": "接收流量", "Redirect": "重定向", @@ -335,6 +341,7 @@ "Remove port": "删除端口", "Remove subnets?": "Remove subnets?", "Resource name": "资源名称", + "Restarts": "", "Restricted Access": "限制的访问", "Reveal": "揭示", "Review selected Namespace(s)": "Review selected Namespace(s)", diff --git a/src/views/services/details/tabs/pods/hooks/usePodColumns.tsx b/src/views/services/details/tabs/pods/hooks/usePodColumns.tsx index 903d4ce3..9d654404 100644 --- a/src/views/services/details/tabs/pods/hooks/usePodColumns.tsx +++ b/src/views/services/details/tabs/pods/hooks/usePodColumns.tsx @@ -28,103 +28,111 @@ export const podColumnInfo = Object.freeze({ cpu: { classes: classNames({ 'pf-v6-u-w-10-on-2xl': showMetrics }), id: 'cpu', - title: 'CPU', }, created: { classes: classNames('pf-v6-u-w-10-on-2xl'), id: 'created', - title: 'Created', }, ipaddress: { classes: '', id: 'ipaddress', - title: 'IP address', }, labels: { classes: '', id: 'labels', - title: 'Labels', }, memory: { classes: classNames({ 'pf-v6-u-w-10-on-2xl': showMetrics }), id: 'memory', - title: 'Memory', }, name: { classes: '', id: 'name', - title: 'Name', }, namespace: { classes: '', id: 'namespace', - title: 'Namespace', }, node: { classes: '', id: 'node', - title: 'Node', }, owner: { classes: '', id: 'owner', - title: 'Owner', }, ready: { classes: classNames('pf-m-nowrap', 'pf-v6-u-w-10-on-lg', 'pf-v6-u-w-8-on-xl'), id: 'ready', - title: 'Ready', }, restarts: { classes: classNames('pf-m-nowrap', 'pf-v6-u-w-8-on-2xl'), id: 'restarts', - title: 'Restarts', }, status: { classes: '', id: 'status', - title: 'Status', }, traffic: { classes: '', id: 'trafficStatus', - title: 'Receiving Traffic', }, }); +type NetworkingTFunction = ReturnType['t']; + +export const getPodColumnInfo = (t: NetworkingTFunction) => + Object.freeze({ + cpu: { ...podColumnInfo.cpu, title: t('CPU') }, + created: { ...podColumnInfo.created, title: t('Created') }, + ipaddress: { ...podColumnInfo.ipaddress, title: t('IP address') }, + labels: { ...podColumnInfo.labels, title: t('Labels') }, + memory: { ...podColumnInfo.memory, title: t('Memory') }, + name: { ...podColumnInfo.name, title: t('Name') }, + namespace: { ...podColumnInfo.namespace, title: t('Namespace') }, + node: { ...podColumnInfo.node, title: t('Node') }, + owner: { ...podColumnInfo.owner, title: t('Owner') }, + ready: { ...podColumnInfo.ready, title: t('Ready') }, + restarts: { ...podColumnInfo.restarts, title: t('Restarts') }, + status: { ...podColumnInfo.status, title: t('Status') }, + traffic: { ...podColumnInfo.traffic, title: t('Receiving Traffic') }, + }); + const usePodColumns = ( cpuUsageData: PrometheusResponse, memoryUsageData: PrometheusResponse, ): { id: string; title: string }[] => { const { t } = useNetworkingTranslation(); + const podColumnInfoWithTitles = useMemo(() => getPodColumnInfo(t), [t]); + const columns: TableColumn[] = useMemo( () => [ { - id: podColumnInfo.name.id, - props: { className: podColumnInfo.name.classes }, + id: podColumnInfoWithTitles.name.id, + props: { className: podColumnInfoWithTitles.name.classes }, sort: 'metadata.name', - title: t(podColumnInfo.name.title), + title: podColumnInfoWithTitles.name.title, transforms: [sortable], }, { - id: podColumnInfo.namespace.id, - props: { className: podColumnInfo.namespace.classes }, + id: podColumnInfoWithTitles.namespace.id, + props: { className: podColumnInfoWithTitles.namespace.classes }, sort: 'metadata.namespace', - title: t(podColumnInfo.namespace.title), + title: podColumnInfoWithTitles.namespace.title, transforms: [sortable], }, { - id: podColumnInfo.status.id, - props: { className: podColumnInfo.status.classes }, + id: podColumnInfoWithTitles.status.id, + props: { className: podColumnInfoWithTitles.status.classes }, sort: (data, direction) => data.sort(sortResourceByValue(direction, podPhase)), - title: t(podColumnInfo.status.title), + title: podColumnInfoWithTitles.status.title, transforms: [sortable], }, { - id: podColumnInfo.ready.id, - props: { className: podColumnInfo.ready.classes }, + id: podColumnInfoWithTitles.ready.id, + props: { className: podColumnInfoWithTitles.ready.classes }, sort: (data, direction) => data.sort( sortResourceByValue( @@ -132,91 +140,91 @@ const usePodColumns = ( (obj) => podReadiness(obj).readyCount, ), ), - title: t(podColumnInfo.ready.title), + title: podColumnInfoWithTitles.ready.title, transforms: [sortable], }, { - id: podColumnInfo.restarts.id, - props: { className: podColumnInfo.restarts.classes }, + id: podColumnInfoWithTitles.restarts.id, + props: { className: podColumnInfoWithTitles.restarts.classes }, sort: (data, direction) => data.sort(sortResourceByValue(direction, podRestarts)), - title: t(podColumnInfo.restarts.title), + title: podColumnInfoWithTitles.restarts.title, transforms: [sortable], }, { - id: podColumnInfo.owner.id, - props: { className: podColumnInfo.owner.classes }, + id: podColumnInfoWithTitles.owner.id, + props: { className: podColumnInfoWithTitles.owner.classes }, sort: 'metadata.ownerReferences[0].name', - title: t(podColumnInfo.owner.title), + title: podColumnInfoWithTitles.owner.title, transforms: [sortable], }, { - id: podColumnInfo.memory.id, - props: { className: podColumnInfo.memory.classes }, + id: podColumnInfoWithTitles.memory.id, + props: { className: podColumnInfoWithTitles.memory.classes }, sort: (data, direction) => data.sort( sortResourceByValue(direction, (obj) => getPodMemoryUsage(memoryUsageData, obj), ), ), - title: t(podColumnInfo.memory.title), + title: podColumnInfoWithTitles.memory.title, transforms: [sortable], }, { - id: podColumnInfo.cpu.id, - props: { className: podColumnInfo.cpu.classes }, + id: podColumnInfoWithTitles.cpu.id, + props: { className: podColumnInfoWithTitles.cpu.classes }, sort: (data, direction) => data.sort( sortResourceByValue(direction, (obj) => getPodCPUUsage(cpuUsageData, obj), ), ), - title: t(podColumnInfo.cpu.title), + title: podColumnInfoWithTitles.cpu.title, transforms: [sortable], }, { - id: podColumnInfo.created.id, - props: { className: podColumnInfo.created.classes }, + id: podColumnInfoWithTitles.created.id, + props: { className: podColumnInfoWithTitles.created.classes }, sort: 'metadata.creationTimestamp', - title: t(podColumnInfo.created.title), + title: podColumnInfoWithTitles.created.title, transforms: [sortable], }, { additional: true, - id: podColumnInfo.node.id, - props: { className: podColumnInfo.node.classes }, + id: podColumnInfoWithTitles.node.id, + props: { className: podColumnInfoWithTitles.node.classes }, sort: 'spec.nodeName', - title: t(podColumnInfo.node.title), + title: podColumnInfoWithTitles.node.title, transforms: [sortable], }, { additional: true, - id: podColumnInfo.labels.id, - props: { className: podColumnInfo.labels.classes }, + id: podColumnInfoWithTitles.labels.id, + props: { className: podColumnInfoWithTitles.labels.classes }, sort: 'metadata.labels', - title: t(podColumnInfo.labels.title), + title: podColumnInfoWithTitles.labels.title, transforms: [sortable], }, { additional: true, - id: podColumnInfo.ipaddress.id, - props: { className: podColumnInfo.ipaddress.classes }, + id: podColumnInfoWithTitles.ipaddress.id, + props: { className: podColumnInfoWithTitles.ipaddress.classes }, sort: 'status.podIP', - title: t(podColumnInfo.ipaddress.title), + title: podColumnInfoWithTitles.ipaddress.title, transforms: [sortable], }, { additional: true, - id: podColumnInfo.traffic.id, - props: { className: podColumnInfo.traffic.classes }, - title: t(podColumnInfo.traffic.title), + id: podColumnInfoWithTitles.traffic.id, + props: { className: podColumnInfoWithTitles.traffic.classes }, + title: podColumnInfoWithTitles.traffic.title, }, { id: '', title: '', }, ], - [cpuUsageData, memoryUsageData, t], + [cpuUsageData, memoryUsageData, podColumnInfoWithTitles], ); const [activeColumns] = useActiveColumns({