diff --git a/src/pages/projects/components/Cards/HPA/index.jsx b/src/pages/projects/components/Cards/HPA/index.jsx index 05d3d4993d4..c55461c0fc1 100644 --- a/src/pages/projects/components/Cards/HPA/index.jsx +++ b/src/pages/projects/components/Cards/HPA/index.jsx @@ -28,6 +28,7 @@ import { Button, Icon, Dropdown, Menu, Notify } from '@kube-design/components' import { Card } from 'components/Base' import { getSuitableUnit, getValueByUnit } from 'utils/monitoring' +import { coreUnitTS } from 'utils' import styles from './index.scss' @@ -57,7 +58,8 @@ export default class HPACard extends React.Component { getValue = (data, unitType) => { const unit = getSuitableUnit(data, unitType) const result = getValueByUnit(data, unit) - return unit ? `${result} ${unit}` : result + const unitText = coreUnitTS(result, unit) + return `${result} ${unitText}` } getHPAData = () => { @@ -125,7 +127,7 @@ export default class HPACard extends React.Component { handleCancel = () => { const { detail, onDeleted } = this.props this.store.delete(detail).then(() => { - Notify.success({ content: `${t('CANCELED_SUCCESSFULLY')}` }) + Notify.success({ content: `${t('CANCEL_SUCCESSFUL')}` }) onDeleted() }) } @@ -133,20 +135,27 @@ export default class HPACard extends React.Component { renderOperations() { const menus = this.getOperations() const contenet = ( -
+