BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
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
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
8 deletions
+22
-8
merge_request_widget.js.coffee
app/assets/javascripts/merge_request_widget.js.coffee
+18
-6
merge_requests_controller.rb
app/controllers/projects/merge_requests_controller.rb
+2
-1
_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,13 +31,24 @@ 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
this
.
showCiCoverage
data
.
coverage
,
'json'
$
.
get
@
opts
.
url_to_ci_check
,
(
data
)
=>
this
.
showCiState
data
.
status
if
data
.
coverage
this
.
showCiCoverage
data
.
coverage
,
'json'
showCiState
:
(
state
)
->
$
(
'.ci_widget'
).
hide
()
...
...
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