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
593a1b3b
Unverified
Commit
593a1b3b
authored
Oct 07, 2014
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Style merge request CI widget to match MR/Issue box
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
70004f4e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
50 additions
and
17 deletions
+50
-17
merge_request.js.coffee
app/assets/javascripts/merge_request.js.coffee
+0
-8
merge_requests.scss
app/assets/stylesheets/sections/merge_requests.scss
+43
-1
_mr_ci.html.haml
app/views/projects/merge_requests/show/_mr_ci.html.haml
+2
-3
_state_widget.html.haml
...iews/projects/merge_requests/show/_state_widget.html.haml
+5
-5
No files found.
app/assets/javascripts/merge_request.js.coffee
View file @
593a1b3b
...
...
@@ -119,14 +119,6 @@ class MergeRequest
else
$
(
'.ci_widget.ci-error'
).
show
()
switch
state
when
"success"
$
(
'.mr-state-widget'
).
addClass
(
"panel-success"
)
when
"failed"
$
(
'.mr-state-widget'
).
addClass
(
"panel-danger"
)
when
"running"
,
"pending"
$
(
'.mr-state-widget'
).
addClass
(
"panel-warning"
)
showCiCoverage
:
(
coverage
)
->
cov_html
=
$
(
'<span>'
)
cov_html
.
addClass
(
'ci-coverage'
)
...
...
app/assets/stylesheets/sections/merge_requests.scss
View file @
593a1b3b
...
...
@@ -104,7 +104,44 @@
}
.mr-state-widget
{
.panel-body
{
background
:
#f9f9f9
;
margin-bottom
:
20px
;
@include
box-shadow
(
0
1px
1px
rgba
(
0
,
0
,
0
,
0
.09
));
.ci_widget
{
padding
:
10px
15px
;
font-size
:
15px
;
border-bottom
:
1px
dashed
#AAA
;
&
.ci-success
{
color
:
$bg_success
;
border-color
:
$border_success
;
}
&
.ci-pending
{
color
:
#548
;
border-color
:
#548
;
}
&
.ci-running
{
color
:
$bg_warning
;
border-color
:
$border_warning
;
}
&
.ci-failed
{
color
:
$bg_danger
;
border-color
:
$border_danger
;
}
&
.ci-error
{
color
:
$bg_danger
;
border-color
:
$border_danger
;
}
}
.mr-widget-body
{
padding
:
10px
15px
;
h4
{
margin-top
:
0px
;
}
...
...
@@ -114,6 +151,11 @@
}
}
.mr-widget-footer
{
padding
:
10px
15px
;
border-top
:
1px
solid
#EEE
;
}
.ci-coverage
{
float
:
right
;
}
...
...
app/views/projects/merge_requests/show/_mr_ci.html.haml
View file @
593a1b3b
...
...
@@ -20,9 +20,8 @@
=
link_to
"Build page"
,
ci_build_details_path
(
@merge_request
)
.ci_widget
%strong
%i
.fa.fa-spinner
Checking for CI status for
#{
@merge_request
.
last_commit_short_sha
}
%i
.fa.fa-spinner
Checking for CI status for
#{
@merge_request
.
last_commit_short_sha
}
.ci_widget.ci-error
{
style:
"display:none"
}
%i
.fa.fa-times
...
...
app/views/projects/merge_requests/show/_state_widget.html.haml
View file @
593a1b3b
.
panel.mr-state-widget.panel-defaul
t
.
mr-state-widge
t
-
if
@merge_request
.
source_project
.
ci_service
&&
@commits
.
any?
.
panel
-heading
.
mr-widget
-heading
=
render
"projects/merge_requests/show/mr_ci"
.
panel
-body
.
mr-widget
-body
-
if
@merge_request
.
open?
-
if
@merge_request
.
source_branch_exists?
&&
@merge_request
.
target_branch_exists?
=
render
"projects/merge_requests/show/mr_accept"
...
...
@@ -31,8 +31,8 @@
%br
Try to use different branches or push new code.
-
if
!
@closes_issues
.
empty
?
&&
@merge_request
.
open?
.
panel
-footer
-
if
@closes_issues
.
present
?
&&
@merge_request
.
open?
.
mr-widget
-footer
%span
%i
.fa.fa-check
Accepting this merge request will close
#{
@closes_issues
.
size
==
1
?
'issue'
:
'issues'
}
...
...
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