Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/www/base/src/app/common/directives/buildsummary/buildsummary.directive.coffee b/www/base/src/app/common/directives/buildsummary/buildsummary.directive.coffee
- index c91373c..d26d66a 100644
- --- a/www/base/src/app/common/directives/buildsummary/buildsummary.directive.coffee
- +++ b/www/base/src/app/common/directives/buildsummary/buildsummary.directive.coffee
- @@ -11,6 +11,8 @@ class Buildsummary extends Directive('common')
- class _buildsummary extends Controller('common')
- constructor: ($scope, buildbotService, resultsService, $urlMatcherFactory, $location) ->
- + data = new buildbotService()
- +
- baseurl = $location.absUrl().split("#")[0]
- buildrequestURLMatcher = $urlMatcherFactory.compile(
- "#{baseurl}#buildrequests/{buildrequestid:[0-9]+}")
- @@ -50,19 +52,22 @@ class _buildsummary extends Controller('common')
- $scope.isBuildURL = (url) ->
- return buildURLMatcher.exec(url) != null
- + $scope.$on("$destroy", -> data.close())
- $scope.$watch 'buildid', (buildid) ->
- $scope.buldid = buildid
- - buildbotService.one('builds', $scope.buildid)
- - .bind($scope).then (build) ->
- - buildbotService.one('builders', build.builderid).bind($scope)
- - build.all('steps').bind $scope,
- - onchild: (step) ->
- + data.getBuild($scope.buildid)
- + .then (build) ->
- + $scope.build = build
- + data.getBuilder(build.builderid).then (builder) ->
- + $scope.builder = builder
- + data.getStepsForBuild().then (steps) ->
- + $scope.steps = steps
- + $scope.steps.onchild (step) ->
- $scope.$watch (-> step.complete), ->
- step.fulldisplay = step.complete == 0 || step.results > 0
- if step.complete
- step.duration = step.complete_at - step.started_at
- - logs = buildbotService.one("steps", step.stepid).all("logs")
- - logs.bind $scope,
- - dest: step
- + data.getLogsForStep(step.stepid).then (logs) ->
- + step.logs = logs
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement