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

Give UploadCtrl access to the app manifest.

This commit is contained in:
Simo Kinnunen 2014-04-03 15:47:24 +09:00
parent 46591b24c8
commit 3799b51ad3
2 changed files with 4 additions and 1 deletions

View file

@ -130,6 +130,7 @@ module.exports = function ControlServiceFactory(
} }
} }
socket.emit('device.install', channel, tx.channel, params) socket.emit('device.install', channel, tx.channel, params)
tx.manifest = manifest
return tx return tx
}) })
} }

View file

@ -7,17 +7,19 @@ module.exports = function UploadCtrl($scope, $rootScope) {
} }
$rootScope.install = function ($files) { $rootScope.install = function ($files) {
return $rootScope.control.install($files) return $rootScope.control.install($files)
.then(function (tx) { .then(function (tx) {
var manifest = tx.manifest
return tx.promise return tx.promise
.progressed(function (result) { .progressed(function (result) {
$scope.$apply(function () { $scope.$apply(function () {
result.manifest = manifest
$scope.installation = result $scope.installation = result
}) })
}) })
.then(function (result) { .then(function (result) {
$scope.$apply(function () { $scope.$apply(function () {
result.manifest = manifest
$scope.installation = result $scope.installation = result
}) })
}) })