fix: move machine internet performance indicators to expandable row

This commit is contained in:
José Oliveira 2021-08-31 23:16:21 +01:00 committed by Josh Harvey
parent 515d02dd21
commit f78608f844
2 changed files with 31 additions and 34 deletions

View file

@ -1,5 +1,6 @@
import { Grid /*, Divider */ } from '@material-ui/core'
import { makeStyles } from '@material-ui/core/styles'
import BigNumber from 'bignumber.js'
import moment from 'moment'
import React from 'react'
@ -105,6 +106,33 @@ const MachineDetailsRow = ({ it: machine, onActionSuccess }) => {
machine={machine}
onActionSuccess={onActionSuccess}></MachineActions>
</Item>
<Item xs={2}>
<Label>Network speed</Label>
<span>
{machine.downloadSpeed
? new BigNumber(machine.downloadSpeed).toFixed(4).toString() +
' MB/s'
: 'unavailable'}
</span>
</Item>
<Item xs={2}>
<Label>Latency</Label>
<span>
{machine.responseTime
? new BigNumber(machine.responseTime).toFixed(3).toString() +
' ms'
: 'unavailable'}
</span>
</Item>
<Item xs={2}>
<Label>Packet Loss</Label>
<span>
{machine.packetLoss
? new BigNumber(machine.packetLoss).toFixed(3).toString() +
' %'
: 'unavailable'}
</span>
</Item>
</Container>
</Item>
</Container>