Skip to content

Commit

Permalink
feat(app): Add firmware version to robot settings page (#1633)
Browse files Browse the repository at this point in the history
  • Loading branch information
mcous authored Jun 7, 2018
1 parent 886f2e9 commit 9a32383
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/src/components/RobotSettings/InformationCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ type Props = OwnProps & StateProps & DispatchProps
const TITLE = 'Information'
const NAME_LABEL = 'Robot Name'
const SERVER_VERSION_LABEL = 'Server version'
const FIRMWARE_VERSION_LABEL = 'Firmware version'

export default connect(makeMapStateToProps, mapDispatchToProps)(InformationCard)

Expand All @@ -47,6 +48,7 @@ function InformationCard (props: Props) {

const realName = (health && health.name) || name
const version = (health && health.api_version) || 'Unknown'
const firmwareVersion = (health && health.fw_version) || 'Unknown'
const updateText = availableUpdate
? 'Update'
: 'Updated'
Expand All @@ -66,6 +68,10 @@ function InformationCard (props: Props) {
label={SERVER_VERSION_LABEL}
value={version}
/>
<LabeledValue
label={FIRMWARE_VERSION_LABEL}
value={firmwareVersion}
/>
<OutlineButton
Component={Link}
to={updateUrl}
Expand Down

0 comments on commit 9a32383

Please sign in to comment.