Skip to content

Commit

Permalink
[Fleet] Display metrics tooltip on Agent details page (elastic#152153)
Browse files Browse the repository at this point in the history
  • Loading branch information
gitstart authored and wwang500 committed Feb 27, 2023
1 parent 3292a81 commit 8b10f10
Showing 1 changed file with 38 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,47 @@ export const AgentDetailsOverviewSection: React.FunctionComponent<{
<EuiFlexGroup direction="column" gutterSize="m">
{[
{
title: i18n.translate('xpack.fleet.agentDetails.cpuLabel', {
defaultMessage: 'CPU',
}),
title: (
<EuiToolTip
content={
<FormattedMessage
id="xpack.fleet.agentDetails.cpuTooltip"
defaultMessage="Average CPU usage in the last 5 minutes"
/>
}
>
<span>
<FormattedMessage
id="xpack.fleet.agentDetails.cpuTitle"
defaultMessage="CPU"
/>
&nbsp;
<EuiIcon type="iInCircle" />
</span>
</EuiToolTip>
),
description: formatAgentCPU(agent.metrics, agentPolicy),
},
{
title: i18n.translate('xpack.fleet.agentDetails.memoryLabel', {
defaultMessage: 'Memory',
}),
title: (
<EuiToolTip
content={
<FormattedMessage
id="xpack.fleet.agentDetails.memoryTooltip"
defaultMessage="Average memory usage in the last 5 minutes"
/>
}
>
<span>
<FormattedMessage
id="xpack.fleet.agentDetails.memoryTitle"
defaultMessage="Memory"
/>
&nbsp;
<EuiIcon type="iInCircle" />
</span>
</EuiToolTip>
),
description: formatAgentMemory(agent.metrics, agentPolicy),
},
].map(({ title, description }) => {
Expand Down

0 comments on commit 8b10f10

Please sign in to comment.