Skip to content

Commit

Permalink
Correct storage unit (#523)
Browse files Browse the repository at this point in the history
  • Loading branch information
yang1666204 authored Aug 22, 2024
1 parent 1839be5 commit dde6300
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions ui/src/pages/Cluster/Detail/Overview/BasicInfo.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { COLOR_MAP, MODE_MAP } from '@/constants';
import { floorToTwoDecimalPlaces } from '@/utils/helper';
import { intl } from '@/utils/intl';
import { Card, Descriptions, Switch, Tag, Typography } from 'antd';
import { useState } from 'react';
Expand Down Expand Up @@ -32,7 +33,7 @@ export default function BasicInfo({
},
{
label: 'Memory',
value: resource.memory,
value: floorToTwoDecimalPlaces(resource.memory / (1 << 30)) + 'Gi',
},
{
label: intl.formatMessage({
Expand All @@ -46,7 +47,9 @@ export default function BasicInfo({
id: 'Dashboard.Detail.Overview.BasicInfo.DatafileStorageSize',
defaultMessage: 'Datafile 存储大小',
}),
value: storage.dataStorage.size,
value:
floorToTwoDecimalPlaces(storage.dataStorage.size / (1 << 30)) +
'Gi',
},
{
label: intl.formatMessage({
Expand All @@ -60,7 +63,9 @@ export default function BasicInfo({
id: 'Dashboard.Detail.Overview.BasicInfo.RedologSize',
defaultMessage: 'RedoLog 大小',
}),
value: storage.redoLogStorage.size,
value:
floorToTwoDecimalPlaces(storage.redoLogStorage.size / (1 << 30)) +
'Gi',
},
{
label: intl.formatMessage({
Expand All @@ -74,7 +79,9 @@ export default function BasicInfo({
id: 'Dashboard.Detail.Overview.BasicInfo.SystemLogStorageSize',
defaultMessage: '系统日志存储大小',
}),
value: storage.sysLogStorage.size,
value:
floorToTwoDecimalPlaces(storage.sysLogStorage.size / (1 << 30)) +
'Gi',
},
]
: [];
Expand Down

0 comments on commit dde6300

Please sign in to comment.