Skip to content

Commit

Permalink
Review rework
Browse files Browse the repository at this point in the history
- Rename 'is-stopped' to 'is_stopping'
- Change 'Stop on going...' style

Signed-off-by: Sebastien Fusilier <sebastien.fusilier@intel.com>
  • Loading branch information
Sebastien Fusilier committed Jun 10, 2015
1 parent b0245a3 commit df4a634
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions www/base/src/app/builders/build/build.controller.coffee
Expand Up @@ -6,26 +6,27 @@ class Build extends Controller
buildnumber = _.parseInt($stateParams.build)

$scope.last_build = true
$scope.is_stopped = false
$scope.is_stopping = false

$scope.$watch 'build.complete', (n, o) ->
if n == true
glTopbarContextualActionsService.setContextualActions []

else if n == false and not $scope.is_stopped
else if n == false and not $scope.is_stopping
glTopbarContextualActionsService.setContextualActions [
caption: "Stop"
extra_class: "btn-danger"
action: ->
$scope.is_stopped = true
$scope.is_stopping = true
buildbotService.one("builds", $scope.build.buildid).control("stop")
]

$scope.$watch 'is_stopped', (n, o) ->
$scope.$watch 'is_stopping', (n, o) ->
if n == true
glTopbarContextualActionsService.setContextualActions [
caption: "Stop on going..."
extra_class: "btn-warning"
icon: "spinner"
extra_class: "spin"
]

buildbotService.bindHierarchy($scope, $stateParams, ['builders', 'builds'])
Expand Down

0 comments on commit df4a634

Please sign in to comment.