Problems: show item value in tooltip, fix #1145

This commit is contained in:
Alexander Zobnin
2021-02-04 13:35:23 +03:00
parent 52b8317a91
commit fdaadaf83e

View File

@@ -216,11 +216,13 @@ interface ProblemItemProps {
function ProblemItem(props: ProblemItemProps) {
const { item, showName } = props;
const itemName = utils.expandItemName(item.name, item.key_);
const tooltipContent = () => <>{itemName}<br/>{item.lastvalue}</>;
return (
<div className="problem-item">
<FAIcon icon="thermometer-three-quarters" />
{showName && <span className="problem-item-name">{item.name}: </span>}
<Tooltip placement="top-start" content={itemName}>
<Tooltip placement="top-start" content={tooltipContent}>
<span className="problem-item-value">{item.lastvalue}</span>
</Tooltip>
</div>