Skip to content

Commit

Permalink
fix: Fix memory format in nodes list
Browse files Browse the repository at this point in the history
Signed-off-by: leoliu <leoliu@yunify.com>
  • Loading branch information
leoliu committed Jul 19, 2020
1 parent 7c7d51d commit d250ecb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/components/Modals/InviteMember/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export default class InviteMemberModal extends React.Component {
fetchData = (params = {}) => {
const { workspace, namespace, devops } = this.props
this.userStore.fetchList({
name: this.state.keyword,
name: this.state.name,
workspace: namespace || devops ? workspace : undefined,
...params,
})
Expand Down
6 changes: 3 additions & 3 deletions src/pages/clusters/containers/Nodes/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import React from 'react'
import { isEmpty, get } from 'lodash'
import { Tooltip, Icon } from '@pitrix/lego-ui'

import { cpuFormat } from 'utils'
import { cpuFormat, memoryFormat } from 'utils'
import { ICON_TYPES, NODE_STATUS } from 'utils/constants'
import { getNodeStatus } from 'utils/node'
import { getValueByUnit } from 'utils/monitoring'
Expand Down Expand Up @@ -371,7 +371,7 @@ export default class Nodes extends React.Component {
<div className="tooltip-title">{t('Resource Usage')}</div>
<p>
{t('Memory Requests')}:{' '}
{getValueByUnit(
{memoryFormat(
get(record, 'annotations["node.kubesphere.io/memory-requests"]'),
'Gi'
)}{' '}
Expand All @@ -384,7 +384,7 @@ export default class Nodes extends React.Component {
</p>
<p>
{t('Memory Limits')}:{' '}
{getValueByUnit(
{memoryFormat(
get(record, 'annotations["node.kubesphere.io/memory-limits"]'),
'Gi'
)}{' '}
Expand Down

0 comments on commit d250ecb

Please sign in to comment.