Commit 8ec1dcf2 authored by Yorick Peterse's avatar Yorick Peterse

Revert "Merge branch 'fix-build-notification-on-merge-page-change' into 'master'

This reverts commit d1ba0986.
parent 0dc34317
...@@ -9,6 +9,7 @@ v 8.7.4 ...@@ -9,6 +9,7 @@ v 8.7.4
- Running rake gitlab:db:drop_tables now drops tables with cascade !4020 - Running rake gitlab:db:drop_tables now drops tables with cascade !4020
- Running rake gitlab:db:drop_tables uses "IF EXISTS" as a precaution !4100 - Running rake gitlab:db:drop_tables uses "IF EXISTS" as a precaution !4100
- Use a case-insensitive comparison in sanitizing URI schemes - Use a case-insensitive comparison in sanitizing URI schemes
- Links for Redmine issue references are generated correctly again (Benedikt Huss)
v 8.7.3 v 8.7.3
- Emails, Gitlab::Email::Message, Gitlab::Diff, and Premailer::Adapter::Nokogiri are now instrumented - Emails, Gitlab::Email::Message, Gitlab::Diff, and Premailer::Adapter::Nokogiri are now instrumented
......
...@@ -9,12 +9,11 @@ class @MergeRequestWidget ...@@ -9,12 +9,11 @@ class @MergeRequestWidget
constructor: (@opts) -> constructor: (@opts) ->
$('#modal_merge_info').modal(show: false) $('#modal_merge_info').modal(show: false)
@firstCICheck = true @firstCICheck = true
@readyForCICheck = false @readyForCICheck = true
clearInterval @fetchBuildStatusInterval clearInterval @fetchBuildStatusInterval
@clearEventListeners() @clearEventListeners()
@addEventListeners() @addEventListeners()
@getCIStatus(false)
@pollCIStatus() @pollCIStatus()
notifyPermissions() notifyPermissions()
...@@ -72,7 +71,7 @@ class @MergeRequestWidget ...@@ -72,7 +71,7 @@ class @MergeRequestWidget
if data.status is '' if data.status is ''
return return
if @firstCICheck || data.status isnt @opts.ci_status and data.status? if @firstCiCheck || data.status isnt @opts.ci_status and data.status?
@opts.ci_status = data.status @opts.ci_status = data.status
@showCIStatus data.status @showCIStatus data.status
if data.coverage if data.coverage
...@@ -80,7 +79,7 @@ class @MergeRequestWidget ...@@ -80,7 +79,7 @@ class @MergeRequestWidget
# The first check should only update the UI, a notification # The first check should only update the UI, a notification
# should only be displayed on status changes # should only be displayed on status changes
if showNotification and not @firstCICheck if showNotification and not @firstCiCheck
status = @ciLabelForStatus(data.status) status = @ciLabelForStatus(data.status)
if status is "preparing" if status is "preparing"
...@@ -103,7 +102,7 @@ class @MergeRequestWidget ...@@ -103,7 +102,7 @@ class @MergeRequestWidget
@close() @close()
Turbolinks.visit _this.opts.builds_path Turbolinks.visit _this.opts.builds_path
) )
@firstCICheck = false @firstCiCheck = false
showCIStatus: (state) -> showCIStatus: (state) ->
$('.ci_widget').hide() $('.ci_widget').hide()
......
...@@ -41,4 +41,9 @@ ...@@ -41,4 +41,9 @@
.ci_widget.ci-error{style: "display:none"} .ci_widget.ci-error{style: "display:none"}
= icon("times-circle") = icon("times-circle")
Could not connect to the CI server. Please check your settings and try again. Could not connect to the CI server. Please check your settings and try again.
\ No newline at end of file
:javascript
$(function() {
merge_request_widget.getCIStatus(false);
});
...@@ -47,9 +47,3 @@ describe 'MergeRequestWidget', -> ...@@ -47,9 +47,3 @@ describe 'MergeRequestWidget', ->
spy = spyOn(@class, 'showCICoverage').and.stub() spy = spyOn(@class, 'showCICoverage').and.stub()
@class.getCIStatus(false) @class.getCIStatus(false)
expect(spy).not.toHaveBeenCalled() expect(spy).not.toHaveBeenCalled()
it 'should not display a notification on the first check after the widget has been created', ->
spy = spyOn(window, 'notify')
@class = new MergeRequestWidget(@opts)
@class.getCIStatus(true)
expect(spy).not.toHaveBeenCalled()
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment