feat: machine model dictionary and prettifier

This commit is contained in:
Sérgio Salgado 2021-04-21 14:12:45 +01:00 committed by Josh Harvey
parent 222d99e307
commit 065761fb63
2 changed files with 9 additions and 1 deletions

View file

@ -17,6 +17,7 @@ import { ReactComponent as ShutdownReversedIcon } from 'src/styling/icons/button
import { ReactComponent as ShutdownIcon } from 'src/styling/icons/button/shut down/zodiac.svg'
import { ReactComponent as UnpairReversedIcon } from 'src/styling/icons/button/unpair/white.svg'
import { ReactComponent as UnpairIcon } from 'src/styling/icons/button/unpair/zodiac.svg'
import { modelPrettifier } from 'src/utils/machine'
import { labelStyles, machineDetailsStyles } from './MachineDetailsCard.styles'
@ -208,7 +209,7 @@ const MachineDetailsRow = ({ it: machine, onActionSuccess }) => {
<Container className={classes.row}>
<Item xs={2}>
<Label>Machine Model</Label>
<span>{machine.model}</span>
<span>{modelPrettifier[machine.model]}</span>
</Item>
<Item xs={4}>
<Label>Paired at</Label>

View file

@ -0,0 +1,7 @@
const modelPrettifier = {
douro1: 'Douro',
sintra: 'Sintra',
gaia: 'Gaia'
}
export { modelPrettifier }