1
0
Fork 0
mirror of https://github.com/openstf/stf synced 2025-10-05 02:29:26 +02:00

Rename "roles" to "units". Put units in their own folders.

This commit is contained in:
Simo Kinnunen 2014-08-26 14:34:34 +09:00
parent 7d9d64ddcb
commit 3a9b193f68
63 changed files with 105 additions and 105 deletions

View file

@ -0,0 +1,25 @@
var syrup = require('syrup')
var logger = require('../../../util/logger')
module.exports = syrup.serial()
.dependency(require('./service'))
.dependency(require('./http'))
.define(function(options, service, http) {
var log = logger.createLogger('device:plugins:display')
function fetch() {
log.info('Fetching display info')
return service.getDisplay(0)
.catch(function() {
log.info('Falling back to HTTP API')
return http.getDisplay(0)
})
.then(function(display) {
display.url = http.getDisplayUrl(display.id)
return display
})
}
return fetch()
})