Skip to content

Commit

Permalink
fix(hawtio#303): Show total exchanges instead of completed
Browse files Browse the repository at this point in the history
  • Loading branch information
mmelko committed Oct 23, 2024
1 parent dee24f5 commit b242d6b
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,9 @@ const CamelNode: React.FunctionComponent<NodeProps<CamelNodeData>> = ({
return newLabel.substring(0, 17) + '...'
}

const totalExchanges: number =
parseInt(data.stats?.exchangesCompleted ?? '0') + parseInt(data.stats?.exchangesInflight ?? '0')

return (
<div
className={'camel-node-content' + (selected ? ' highlighted' : '')}
Expand All @@ -163,7 +166,7 @@ const CamelNode: React.FunctionComponent<NodeProps<CamelNodeData>> = ({
<div className='annotation'>{annotation?.element}</div>
<div className='icon'>{data.imageUrl}</div>
<div className='inflights'>{showInflightCounter && data.stats?.exchangesInflight}</div>
<div className='number'>{data.stats?.exchangesCompleted}</div>
<div className='number'>{totalExchanges}</div>
<div className='camel-node-label'>{truncate(data.label)}</div>
{data.cid && <div className='camel-node-id'> (ID: {data.cid})</div>}
{showStatistics && (
Expand All @@ -177,6 +180,10 @@ const CamelNode: React.FunctionComponent<NodeProps<CamelNodeData>> = ({
<Td>ID</Td>
<Td>{data.stats.id}</Td>
</Tr>
<Tr>
<Td>Total</Td>
<Td>{totalExchanges}</Td>
</Tr>
<Tr>
<Td>Completed</Td>
<Td>{data.stats?.exchangesCompleted}</Td>
Expand Down

0 comments on commit b242d6b

Please sign in to comment.