Skip to content

Commit

Permalink
Merge pull request #1510 from alfonsomthd/hide-used-capacity
Browse files Browse the repository at this point in the history
Provider mode: Storage Client list: remove 'Used Capacity' column
  • Loading branch information
openshift-merge-bot[bot] authored Aug 2, 2024
2 parents 22d6d8a + 2bbac5c commit 90cdcd1
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 25 deletions.
1 change: 0 additions & 1 deletion locales/en/plugin__odf-console.json
Original file line number Diff line number Diff line change
Expand Up @@ -1094,7 +1094,6 @@
"To connect a storage client to the Data Foundation provider cluster, click <2>Generate client onboarding token</2> and use the token to deploy the client cluster.": "To connect a storage client to the Data Foundation provider cluster, click <2>Generate client onboarding token</2> and use the token to deploy the client cluster.",
"Cluster name (ID)": "Cluster name (ID)",
"Storage quota": "Storage quota",
"Used capacity is the amount of storage consumed by the client.": "Used capacity is the amount of storage consumed by the client.",
"Openshift version": "Openshift version",
"Data Foundation version": "Data Foundation version",
"Last heartbeat": "Last heartbeat",
Expand Down
23 changes: 0 additions & 23 deletions packages/odf/components/storage-consumers/client-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,6 @@ const tableColumns = [
className: '',
id: 'storageQuota',
},
{
className: '',
id: 'usedCapacity',
},
{
className: '',
id: 'openshiftVersion',
Expand Down Expand Up @@ -176,15 +172,6 @@ const ClientsList: React.FC<ClientListProps> = (props) => {
column.sort = 'status.storageQuotaInGiB';
column.props.info = { popover: <StorageQuotaPopoverContent /> };
break;
case 'usedCapacity':
column.title = t('Used capacity');
column.sort = 'status.usedCapacityInGiB';
column.props.info = {
popover: t(
'Used capacity is the amount of storage consumed by the client.'
),
};
break;
case 'openshiftVersion':
column.title = t('Openshift version');
column.sort = 'status.client.platformVersion';
Expand Down Expand Up @@ -322,13 +309,6 @@ const StorageClientRow: React.FC<
QuotaSizeUnitOptions[QuotaSize.Gi]
).string
: t('Unlimited');
const humanizedUsedCapacity =
obj?.spec?.storageQuotaInGiB && obj?.status?.usedCapacityInGiB != null
? humanizeBinaryBytes(
obj?.status?.usedCapacityInGiB,
QuotaSizeUnitOptions[QuotaSize.Gi]
).string
: '-';

React.useEffect(() => {
const setter = () => {
Expand Down Expand Up @@ -361,9 +341,6 @@ const StorageClientRow: React.FC<
case 'storageQuota':
data = humanizedStorageQuota;
break;
case 'usedCapacity':
data = humanizedUsedCapacity;
break;
case 'openshiftVersion':
data = getOpenshiftVersion(obj) || '-';
break;
Expand Down
1 change: 0 additions & 1 deletion packages/shared/src/types/storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,6 @@ type StorageConsumerStatus = {
cephResources?: CephResourcesSpec[];
lastHeartbeat?: string; // Assuming metav1.Time is a string
client?: ClientStatus;
usedCapacityInGiB: number;
};

type ClientStatus = {
Expand Down

0 comments on commit 90cdcd1

Please sign in to comment.