Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
60fd4188
Commit
60fd4188
authored
Apr 05, 2016
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Build notification null check
Cancels build notification interval on page change
parent
8b7ce2ad
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
7 deletions
+15
-7
app/assets/javascripts/merge_request_widget.js.coffee
app/assets/javascripts/merge_request_widget.js.coffee
+14
-1
app/views/projects/merge_requests/widget/_show.html.haml
app/views/projects/merge_requests/widget/_show.html.haml
+1
-6
No files found.
app/assets/javascripts/merge_request_widget.js.coffee
View file @
60fd4188
...
...
@@ -12,10 +12,19 @@ class @MergeRequestWidget
@
readyForCICheck
=
true
clearInterval
@
fetchBuildStatusInterval
@
clearEventListeners
()
@
addEventListeners
()
@
pollCIStatus
()
notifyPermissions
()
setOpts
:
(
@
opts
)
->
clearEventListeners
:
->
$
(
document
).
off
'page:change.merge_request'
addEventListeners
:
->
$
(
document
).
on
'page:change.merge_request'
,
=>
if
$
(
'body'
).
data
(
'page'
)
isnt
'projects:merge_requests:show'
clearInterval
@
fetchBuildStatusInterval
@
clearEventListeners
()
mergeInProgress
:
(
deleteSourceBranch
=
false
)
->
$
.
ajax
...
...
@@ -63,11 +72,15 @@ class @MergeRequestWidget
@
firstCICheck
=
false
@
opts
.
ci_status
=
data
.
status
<<<<<<<
a918e8bf277418048776a5d9c34a64b39f4e56f3
if
@
opts
.
ci_status
is
''
@
opts
.
ci_status
=
data
.
status
return
if
data
.
status
isnt
@
opts
.
ci_status
=======
if
data
.
status
isnt
@
opts
.
ci_status
and
data
.
status
?
>>>>>>>
Build
notification
null
check
@
showCIStatus
data
.
status
if
data
.
coverage
@
showCICoverage
data
.
coverage
...
...
app/views/projects/merge_requests/widget/_show.html.haml
View file @
60fd4188
...
...
@@ -8,7 +8,6 @@
=
render
'projects/merge_requests/widget/locked'
:javascript
var
merge_request_widget
;
var
opts
=
{
merge_check_url
:
"
#{
merge_check_namespace_project_merge_request_path
(
@project
.
namespace
,
@project
,
@merge_request
)
}
"
,
check_enable
:
#{
@merge_request
.
unchecked?
?
"true"
:
"false"
}
,
...
...
@@ -20,8 +19,4 @@
builds_path
:
"
#{
builds_namespace_project_merge_request_path
(
@project
.
namespace
,
@project
,
@merge_request
)
}
"
};
if
(
typeof
merge_request_widget
===
'
undefined
'
)
{
merge_request_widget
=
new
MergeRequestWidget
(
opts
);
}
else
{
merge_request_widget
.
setOpts
(
opts
);
}
new
MergeRequestWidget
(
opts
);
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment