Remove repeated build listing

This commit is contained in:
Jacob Schatz 2016-03-03 19:40:51 -05:00 committed by Phil Hughes
parent b2f2df3b38
commit fcc0f7c68e
2 changed files with 4 additions and 5 deletions

View File

@ -11,9 +11,6 @@ class @MergeRequestWidget
modal = $('#modal_merge_info').modal(show: false) modal = $('#modal_merge_info').modal(show: false)
@getBuildStatus() @getBuildStatus()
# clear the build poller # clear the build poller
$(document)
.off 'page:fetch'
.on 'page:fetch', (e) => clearInterval(@fetchBuildStatusInterval)
mergeInProgress: (deleteSourceBranch = false)-> mergeInProgress: (deleteSourceBranch = false)->
$.ajax $.ajax
@ -65,7 +62,7 @@ class @MergeRequestWidget
_this.ciLabelForStatus(data.status)), _this.ciLabelForStatus(data.status)),
_this.opts.gitlab_icon) _this.opts.gitlab_icon)
setTimeout (-> setTimeout (->
window.location.reload() Turbolinks.visit(location.href)
return return
), 2000 ), 2000
_this.opts.current_status = data.status _this.opts.current_status = data.status

View File

@ -27,4 +27,6 @@
opts.ci_message = "Build {{status}} for #{@merge_request.last_commit.sha}"; opts.ci_message = "Build {{status}} for #{@merge_request.last_commit.sha}";
:javascript :javascript
merge_request_widget = new MergeRequestWidget(opts); if(typeof merge_request_widget === 'undefined') {
merge_request_widget = new MergeRequestWidget(opts);
}