Skip to content

Commit

Permalink
Merge pull request #1354 from bipuladh/bz-975
Browse files Browse the repository at this point in the history
Fixes storage client resource name in list page
  • Loading branch information
openshift-merge-bot[bot] authored May 3, 2024
2 parents b8ba46a + e3691a0 commit c6dfe50
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/odf/components/storage-consumers/client-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -83,7 +82,7 @@ const ClientsList: React.FC<ClientListProps> = (props) => {
() => [
{
title: t('Name'),
sort: 'metadata.name',
sort: 'status.client.name',
transforms: [sortable],
props: {
className: tableColumns[0].className,
Expand All @@ -92,6 +91,7 @@ const ClientsList: React.FC<ClientListProps> = (props) => {
},
{
title: t('Cluster ID'),
sort: 'status.client.clusterId',
props: {
className: tableColumns[1].className,
},
Expand Down Expand Up @@ -253,10 +253,10 @@ const StorageClientRow: React.FC<
return (
<>
<TableData {...tableColumns[0]} activeColumnIDs={activeColumnIDs}>
{getName(obj)}
{obj?.status?.client?.name}
</TableData>
<TableData {...tableColumns[1]} activeColumnIDs={activeColumnIDs}>
{getName(obj).split('storageconsumer-')[1]}
{obj?.status?.client?.clusterId}
</TableData>
<TableData {...tableColumns[2]} activeColumnIDs={activeColumnIDs}>
{getOpenshiftVersion(obj)}
Expand Down
3 changes: 3 additions & 0 deletions packages/shared/src/types/storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,9 @@ type StorageConsumerStatus = {
type ClientStatus = {
platformVersion: string;
operatorVersion: string;
clusterId: string;
clusterName: string;
name: string;
};

export type StorageConsumerKind = K8sResourceCommon & {
Expand Down

0 comments on commit c6dfe50

Please sign in to comment.