Skip to content

Commit

Permalink
feat: add infra hover metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
Kav91 committed Feb 22, 2020
1 parent ec1c0bf commit 29ee8d4
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 1 deletion.
Expand Up @@ -28,7 +28,7 @@ export default class HoverContent extends React.PureComponent {
isLast ? '' : '|'
}`;
});
} else if (metric.value) {
} else if (metric.value || metric.value === 0) {
value = isNaN(metric.value)
? metric.value
: parseFloat(metric.value)
Expand Down
Expand Up @@ -85,6 +85,37 @@ export const buildNodeMetrics = data => {
unit: '',
name: ''
});
} else if (data.hostSummary) {
if (data.hostSummary.cpuUtilizationPercent)
metrics.push({
value: data.hostSummary.cpuUtilizationPercent,
unit: '%',
name: 'cpu'
});
if (data.hostSummary.memoryUsedPercent)
metrics.push({
value: data.hostSummary.memoryUsedPercent,
unit: '%',
name: 'mem'
});
if (data.hostSummary.diskUsedPercent)
metrics.push({
value: data.hostSummary.diskUsedPercent,
unit: '%',
name: 'disk'
});
if (data.hostSummary.networkTransmitRate)
metrics.push({
value: data.hostSummary.networkTransmitRate,
unit: 'bytes/s',
name: 'tx'
});
if (data.hostSummary.networkReceiveRate)
metrics.push({
value: data.hostSummary.networkReceiveRate,
unit: 'bytes/s',
name: 'rx'
});
} else if (data.browserSummary) {
// ajaxRequestThroughput: 49
// ajaxResponseTimeAverage: 0.156681
Expand Down
1 change: 1 addition & 0 deletions nerdlets/observability-maps-nerdlet/lib/utils.js
Expand Up @@ -530,6 +530,7 @@ export const InfraEntityBatchQuery = guids => {
networkReceiveRate
servicesCount
networkTransmitRate
networkReceiveRate
}
name
}
Expand Down

0 comments on commit 29ee8d4

Please sign in to comment.