mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-17 23:53:25 +02:00
add remoteDebugUrl into database so that it is accessible from api
This commit is contained in:
@@ -151,6 +151,8 @@ dbapi.saveDeviceInitialState = function(serial, device) {
|
||||
, statusChangedAt: r.now()
|
||||
, ready: false
|
||||
, reverseForwards: []
|
||||
, remoteConnect: false
|
||||
, remoteDebugUrl: null
|
||||
}
|
||||
return db.run(r.table('devices').get(serial).update(data))
|
||||
.then(function(stats) {
|
||||
@@ -163,6 +165,20 @@ dbapi.saveDeviceInitialState = function(serial, device) {
|
||||
})
|
||||
}
|
||||
|
||||
dbapi.setDeviceConnectUrl = function(serial, url) {
|
||||
return db.run(r.table('devices').get(serial).update({
|
||||
remoteDebugUrl: url
|
||||
, remoteConnect: true
|
||||
}))
|
||||
}
|
||||
|
||||
dbapi.unsetDeviceConnectUrl = function(serial, url) {
|
||||
return db.run(r.table('devices').get(serial).update({
|
||||
remoteDebugUrl: null
|
||||
, remoteConnect: false
|
||||
}))
|
||||
}
|
||||
|
||||
dbapi.saveDeviceStatus = function(serial, status) {
|
||||
return db.run(r.table('devices').get(serial).update({
|
||||
status: status
|
||||
|
||||
Reference in New Issue
Block a user