Skip to content

Commit

Permalink
stop: implement the UI part
Browse files Browse the repository at this point in the history
This commit adds a stop button in top
of the build page.

Change-Id: I9d95f5cab2e54f250dd0fa1dcb25da8a2ff269c8
Signed-off-by: Ion Alberdi <ialberdi@intel.com>
  • Loading branch information
Ion Alberdi committed May 11, 2015
1 parent 90832e9 commit fd625ce
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion www/base/src/app/builders/build/build.controller.coffee
@@ -1,11 +1,18 @@
class Build extends Controller
constructor: ($rootScope, $scope, $location, buildbotService, $stateParams, recentStorage, glBreadcrumbService,
constructor: ($rootScope, $scope, $location, buildbotService, $stateParams, recentStorage, glBreadcrumbService, glTopbarContextualActionsService,
$state) ->

builderid = _.parseInt($stateParams.builder)
buildnumber = _.parseInt($stateParams.build)

$scope.last_build = true
$scope.$watch 'build.complete', (n, o) ->
if n == false
glTopbarContextualActionsService.setContextualActions [
caption: "Stop"
extra_class: "btn-danger"
action: -> buildbotService.one("builds", $scope.build.buildid).control("stop")
]
buildbotService.bindHierarchy($scope, $stateParams, ['builders', 'builds'])
.then ([builder, build]) ->
if not build.number? and buildnumber > 1
Expand Down
Expand Up @@ -169,7 +169,7 @@ class BuildbotService extends Factory
return mqService.on( path + "/" + event, onEvent)


elem.control = (method, params) ->
elem.control = (method, params={}) ->
# do jsonrpc2.0 like POST
id = jsonrpc2_id++
req =
Expand Down

0 comments on commit fd625ce

Please sign in to comment.