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
Boxiang Sun
gitlab-ce
Commits
91880e13
Commit
91880e13
authored
Jan 20, 2016
by
Jacob Schatz
Committed by
Phil Hughes
Mar 18, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
initial ajax build
parent
fde975fa
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
8 deletions
+22
-8
app/assets/javascripts/merge_request_widget.js.coffee
app/assets/javascripts/merge_request_widget.js.coffee
+18
-6
app/controllers/projects/merge_requests_controller.rb
app/controllers/projects/merge_requests_controller.rb
+2
-1
app/views/projects/merge_requests/widget/_show.html.haml
app/views/projects/merge_requests/widget/_show.html.haml
+2
-1
No files found.
app/assets/javascripts/merge_request_widget.js.coffee
View file @
91880e13
...
...
@@ -9,6 +9,7 @@ class @MergeRequestWidget
#
constructor
:
(
@
opts
)
->
modal
=
$
(
'#modal_merge_info'
).
modal
(
show
:
false
)
@
getBuildStatus
()
mergeInProgress
:
(
deleteSourceBranch
=
false
)
->
$
.
ajax
...
...
@@ -30,8 +31,19 @@ class @MergeRequestWidget
$
.
get
@
opts
.
url_to_automerge_check
,
(
data
)
->
$
(
'.mr-state-widget'
).
replaceWith
(
data
)
getBuildStatus
:
->
urlToCiCheck
=
@
opts
.
url_to_ci_check
ciEnabled
=
@
opts
.
ci_enable
console
.
log
(
ciEnabled
)
setInterval
(
->
if
ciEnabled
$
.
getJSON
urlToCiCheck
,
(
data
)
->
console
.
log
(
"data"
,
data
);
return
return
),
5000
getCiStatus
:
->
if
@
opts
.
ci_enable
$
.
get
@
opts
.
url_to_ci_check
,
(
data
)
=>
this
.
showCiState
data
.
status
if
data
.
coverage
...
...
app/controllers/projects/merge_requests_controller.rb
View file @
91880e13
...
...
@@ -228,7 +228,8 @@ class Projects::MergeRequestsController < Projects::ApplicationController
response
=
{
status:
status
,
coverage:
coverage
coverage:
coverage
,
ci_status:
@merge_request
.
ci_commit
.
status
}
render
json:
response
...
...
app/views/projects/merge_requests/widget/_show.html.haml
View file @
91880e13
...
...
@@ -15,6 +15,7 @@
check_enable
:
#{
@merge_request
.
unchecked?
?
"true"
:
"false"
}
,
url_to_ci_check
:
"
#{
ci_status_namespace_project_merge_request_path
(
@project
.
namespace
,
@project
,
@merge_request
)
}
"
,
ci_enable
:
#{
@project
.
ci_service
?
"true"
:
"false"
}
,
current_status
:
"
#{
@merge_request
.
gitlab_merge_status
}
"
,
current_status
:
"
#{
@merge_request
.
gitlab_merge_status
}
"
});
var
cici
=
"
#{
@project
}
"
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