Skip to content

Commit

Permalink
ui/nodes: Clean the code in NodeListTable
Browse files Browse the repository at this point in the history
Refs: #2775
  • Loading branch information
ChengYanJin committed Oct 16, 2020
1 parent db796a1 commit bcc52f0
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions ui/src/components/NodeListTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -326,12 +326,8 @@ const NodeListTable = (props) => {
accessor: 'health',
cellStyle: { textAlign: 'center', width: '50px' },
Cell: (cellProps) => {
return (
<CircleStatus
className="fa fa-circle fa-2x"
status={cellProps.value}
/>
);
const { health } = cellProps.value;
return <CircleStatus status={health} />;
},
},
{
Expand All @@ -342,7 +338,7 @@ const NodeListTable = (props) => {
const { statusColor, computedStatus } = cellProps.value;
return computedStatus.map((status) => {
return (
<StatusText textColor={statusColor}>
<StatusText key={status} textColor={statusColor}>
{intl.translate(`${status}`)}
</StatusText>
);
Expand Down

0 comments on commit bcc52f0

Please sign in to comment.