diff --git a/packages/odf/components/storage-consumers/client-list.tsx b/packages/odf/components/storage-consumers/client-list.tsx index 866838f8b..23427c393 100644 --- a/packages/odf/components/storage-consumers/client-list.tsx +++ b/packages/odf/components/storage-consumers/client-list.tsx @@ -3,7 +3,6 @@ import { Kebab } from '@odf/shared'; import { ODF_OPERATOR } from '@odf/shared/constants/common'; import { getTimeDifferenceInSeconds } from '@odf/shared/details-page/datetime'; import { useFetchCsv } from '@odf/shared/hooks'; -import { getName } from '@odf/shared/selectors/k8s'; import { StorageConsumerKind } from '@odf/shared/types'; import { useCustomTranslation } from '@odf/shared/useCustomTranslationHook'; import { getOprVersionFromCSV } from '@odf/shared/utils'; @@ -83,7 +82,7 @@ const ClientsList: React.FC = (props) => { () => [ { title: t('Name'), - sort: 'metadata.name', + sort: 'status.client.name', transforms: [sortable], props: { className: tableColumns[0].className, @@ -92,6 +91,7 @@ const ClientsList: React.FC = (props) => { }, { title: t('Cluster ID'), + sort: 'status.client.clusterId', props: { className: tableColumns[1].className, }, @@ -253,10 +253,10 @@ const StorageClientRow: React.FC< return ( <> - {getName(obj)} + {obj?.status?.client?.name} - {getName(obj).split('storageconsumer-')[1]} + {obj?.status?.client?.clusterId} {getOpenshiftVersion(obj)} diff --git a/packages/shared/src/types/storage.ts b/packages/shared/src/types/storage.ts index 51f2403cb..00ec0d185 100644 --- a/packages/shared/src/types/storage.ts +++ b/packages/shared/src/types/storage.ts @@ -177,6 +177,9 @@ type StorageConsumerStatus = { type ClientStatus = { platformVersion: string; operatorVersion: string; + clusterId: string; + clusterName: string; + name: string; }; export type StorageConsumerKind = K8sResourceCommon & {