mirror of
https://github.com/openstf/stf
synced 2025-10-06 12:00:08 +02:00
Tell the UI why the device became unusable.
This commit is contained in:
parent
d8dec38cad
commit
0ec8082ac1
3 changed files with 10 additions and 4 deletions
|
@ -130,6 +130,7 @@ module.exports = function(options) {
|
|||
, ready: false
|
||||
, lastHeartbeatAt: null
|
||||
, using: false
|
||||
, likelyLeaveReason: 'device_absent'
|
||||
}
|
||||
})
|
||||
})
|
||||
|
@ -139,6 +140,7 @@ module.exports = function(options) {
|
|||
, data: datautil.applyOwner({
|
||||
serial: message.serial
|
||||
, owner: message.owner
|
||||
, likelyLeaveReason: 'owner_change'
|
||||
}
|
||||
, user
|
||||
)
|
||||
|
@ -150,12 +152,14 @@ module.exports = function(options) {
|
|||
, data: datautil.applyOwner({
|
||||
serial: message.serial
|
||||
, owner: null
|
||||
, likelyLeaveReason: message.reason
|
||||
}
|
||||
, user
|
||||
)
|
||||
})
|
||||
})
|
||||
.on(wire.DeviceStatusMessage, function(channel, message) {
|
||||
message.likelyLeaveReason = 'status_change'
|
||||
socket.emit('device.change', {
|
||||
important: true
|
||||
, data: message
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue