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
35ec08a6
Commit
35ec08a6
authored
Mar 24, 2015
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change merge request button color based on CI status
parent
3a602c84
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
18 deletions
+12
-18
merge_request.js.coffee
app/assets/javascripts/merge_request.js.coffee
+9
-0
merge_requests.scss
app/assets/stylesheets/pages/merge_requests.scss
+3
-18
No files found.
app/assets/javascripts/merge_request.js.coffee
View file @
35ec08a6
...
...
@@ -113,8 +113,14 @@ class @MergeRequest
allowed_states
=
[
"failed"
,
"canceled"
,
"running"
,
"pending"
,
"success"
]
if
state
in
allowed_states
$
(
'.ci_widget.ci-'
+
state
).
show
()
switch
state
when
"failed"
,
"canceled"
@
setMergeButtonClass
(
'btn-danger'
)
when
"running"
,
"pending"
@
setMergeButtonClass
(
'btn-warning'
)
else
$
(
'.ci_widget.ci-error'
).
show
()
@
setMergeButtonClass
(
'btn-danger'
)
showCiCoverage
:
(
coverage
)
->
cov_html
=
$
(
'<span>'
)
...
...
@@ -144,6 +150,9 @@ class @MergeRequest
this
.
$
(
'.merge-in-progress'
).
hide
()
this
.
$
(
'.automerge_widget.already_cannot_be_merged'
).
show
()
setMergeButtonClass
:
(
css_class
)
->
$
(
'.accept_merge_request'
).
removeClass
(
"btn-create"
).
addClass
(
css_class
)
mergeInProgress
:
->
$
.
ajax
type
:
'GET'
...
...
app/assets/stylesheets/pages/merge_requests.scss
View file @
35ec08a6
...
...
@@ -137,30 +137,15 @@
background-color
:
#F1FAF1
;
}
&
.ci-pending
{
color
:
#548
;
border-color
:
#548
;
background-color
:
#F4F1FA
;
}
&
.ci-pending
,
&
.ci-running
{
color
:
$gl-warning
;
border-color
:
$gl-warning
;
background-color
:
#FAF5F1
;
}
&
.ci-failed
{
color
:
$gl-danger
;
border-color
:
$gl-danger
;
background-color
:
#FAF1F1
;
}
&
.ci-canceled
{
color
:
$gl-warning
;
border-color
:
$gl-danger
;
background-color
:
#FAF5F1
;
}
&
.ci-failed
,
&
.ci-canceled
,
&
.ci-error
{
color
:
$gl-danger
;
border-color
:
$gl-danger
;
...
...
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