mirror of
https://github.com/openstf/stf
synced 2025-10-06 03:50:04 +02:00
Only install if enabled.
This commit is contained in:
parent
2e80900537
commit
db11a59125
3 changed files with 25 additions and 19 deletions
|
@ -1,2 +1,2 @@
|
|||
div(ng-controller='ActivitiesCtrl')
|
||||
h1 Activities
|
||||
h3 Activities
|
||||
|
|
|
@ -2,6 +2,8 @@ module.exports = function UploadCtrl($scope, $rootScope, SettingsService, gettex
|
|||
|
||||
$scope.upload = null
|
||||
$scope.installation = null
|
||||
$scope.installEnabled = true
|
||||
$scope.launchEnabled = true
|
||||
|
||||
$scope.clear = function () {
|
||||
$scope.upload = null
|
||||
|
@ -27,6 +29,7 @@ module.exports = function UploadCtrl($scope, $rootScope, SettingsService, gettex
|
|||
$scope.upload = uploadResult
|
||||
})
|
||||
if (uploadResult.success) {
|
||||
if ($scope.installEnabled) {
|
||||
var install = $rootScope.control.install(uploadResult.body)
|
||||
return install.promise
|
||||
.progressed(function (installResult) {
|
||||
|
@ -43,6 +46,7 @@ module.exports = function UploadCtrl($scope, $rootScope, SettingsService, gettex
|
|||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
input(type='checkbox', ng-model='launchEnabled', ng-disabled='true')
|
||||
span Launch
|
||||
label.checkbox-inline.pull-right
|
||||
input(type='checkbox', ng-model='installEnabled', ng-disabled='true')
|
||||
input(type='checkbox', ng-model='installEnabled')
|
||||
span Install
|
||||
|
||||
.widget-content.padded
|
||||
|
@ -32,6 +32,8 @@
|
|||
//treecontrol.tree-classic(tree-model='treeData', options='treeOptions')
|
||||
span employee: {{node.name}} age {{node.age}}
|
||||
|
||||
pre(ng-if='upload.error') Error: {{ upload.error }}
|
||||
|
||||
.upload-status(ng-if='upload && !upload.settled')
|
||||
|
||||
div(ng-switch='upload.lastData')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue