1
0
Fork 0
mirror of https://github.com/openstf/stf synced 2025-10-04 10:19:30 +02:00

Reverse port forwarding UI actually works now.

This commit is contained in:
Simo Kinnunen 2014-10-14 22:57:44 +09:00
parent 99864fb223
commit cecf08a244
10 changed files with 158 additions and 134 deletions

View file

@ -106,6 +106,7 @@ module.exports = function(options) {
, provider: message.provider
, present: true
, owner: null
, reverseForwards: []
}
})
})
@ -240,6 +241,15 @@ module.exports = function(options) {
}
})
})
.on(wire.ReverseForwardsEvent, function(channel, message) {
socket.emit('device.change', {
important: false
, data: {
serial: message.serial
, reverseForwards: message.forwards
}
})
})
.handler()
// Global messages
@ -676,7 +686,6 @@ module.exports = function(options) {
if (!data.targetHost || data.targetHost === 'localhost') {
data.targetHost = socket.request.ip
}
socket.emit('forward.create', data)
joinChannel(responseChannel)
push.send([
channel
@ -687,7 +696,6 @@ module.exports = function(options) {
])
})
.on('forward.remove', function(channel, responseChannel, data) {
socket.emit('forward.remove', data)
joinChannel(responseChannel)
push.send([
channel