Allow to cancel build if any of the jobs can be cancelled
This commit is contained in:
parent
34d4f1624e
commit
758f26282a
|
@ -89,8 +89,8 @@ Build = Model.extend DurationCalculations,
|
||||||
).property('rawConfigKeys.length')
|
).property('rawConfigKeys.length')
|
||||||
|
|
||||||
canCancel: (->
|
canCancel: (->
|
||||||
!@get('isFinished') && @get('jobs').filter( (j) -> j.get('canCancel') ).get('length') > 0
|
@get('jobs').filter( (j) -> j.get('canCancel') ).get('length') > 0
|
||||||
).property('isFinished', 'jobs.@each.canCancel')
|
).property('jobs.@each.canCancel')
|
||||||
|
|
||||||
cancel: (->
|
cancel: (->
|
||||||
Ajax.post "/builds/#{@get('id')}/cancel"
|
Ajax.post "/builds/#{@get('id')}/cancel"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user