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
Tatuya Kamada
gitlab-ce
Commits
8842f552
Commit
8842f552
authored
Dec 07, 2016
by
Kamil Trzcinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Code review
parent
93c72e0f
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
18 additions
and
21 deletions
+18
-21
app/models/ci/stage.rb
app/models/ci/stage.rb
+3
-1
app/views/projects/commit/_pipeline.html.haml
app/views/projects/commit/_pipeline.html.haml
+2
-3
app/views/projects/pipelines/_graph.html.haml
app/views/projects/pipelines/_graph.html.haml
+2
-2
app/views/projects/pipelines/_with_tabs.html.haml
app/views/projects/pipelines/_with_tabs.html.haml
+2
-3
app/views/projects/stage/_graph.html.haml
app/views/projects/stage/_graph.html.haml
+6
-5
spec/lib/gitlab/ci/status/factory_spec.rb
spec/lib/gitlab/ci/status/factory_spec.rb
+1
-5
spec/lib/gitlab/ci/status/pipeline/factory_spec.rb
spec/lib/gitlab/ci/status/pipeline/factory_spec.rb
+2
-2
No files found.
app/models/ci/stage.rb
View file @
8842f552
...
@@ -9,7 +9,9 @@ module Ci
...
@@ -9,7 +9,9 @@ module Ci
delegate
:project
,
to: :pipeline
delegate
:project
,
to: :pipeline
def
initialize
(
pipeline
,
name
:,
status:
nil
)
def
initialize
(
pipeline
,
name
:,
status:
nil
)
@pipeline
,
@name
,
@status
=
pipeline
,
name
,
status
@pipeline
=
pipeline
@name
=
name
@status
=
status
end
end
def
to_param
def
to_param
...
...
app/views/projects/commit/_pipeline.html.haml
View file @
8842f552
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
=
time_interval_in_words
pipeline
.
duration
=
time_interval_in_words
pipeline
.
duration
.row-content-block.build-content.middle-block.pipeline-graph.hidden
.row-content-block.build-content.middle-block.pipeline-graph.hidden
=
render
"projects/pipelines/graph"
,
subject:
pipeline
=
render
"projects/pipelines/graph"
,
subject:
pipeline
,
as: :pipeline
-
if
pipeline
.
yaml_errors
.
present?
-
if
pipeline
.
yaml_errors
.
present?
.bs-callout.bs-callout-danger
.bs-callout.bs-callout-danger
...
@@ -50,5 +50,4 @@
...
@@ -50,5 +50,4 @@
-
if
pipeline
.
project
.
build_coverage_enabled?
-
if
pipeline
.
project
.
build_coverage_enabled?
%th
Coverage
%th
Coverage
%th
%th
-
pipeline
.
stages
.
each
do
|
stage
|
=
render
partial:
"projects/stage/stage"
,
collection:
pipeline
.
stages
,
as: :stage
=
render
"projects/stage/stage"
,
subject:
stage
app/views/projects/pipelines/_graph.html.haml
View file @
8842f552
-
pipeline
=
local_assigns
.
fetch
(
:pipeline
)
.pipeline-visualization
.pipeline-visualization
%ul
.stage-column-list
%ul
.stage-column-list
-
subject
.
stages
.
each
do
|
stage
|
=
render
partial:
"projects/stage/graph"
,
collection:
pipeline
.
stages
,
as: :stage
=
render
"projects/stage/graph"
,
subject:
stage
app/views/projects/pipelines/_with_tabs.html.haml
View file @
8842f552
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
.tab-content
.tab-content
#js-tab-pipeline
.tab-pane
#js-tab-pipeline
.tab-pane
.build-content.middle-block.pipeline-graph
.build-content.middle-block.pipeline-graph
=
render
"projects/pipelines/graph"
,
subject:
pipeline
=
render
"projects/pipelines/graph"
,
subject:
pipeline
,
as: :pipeline
#js-tab-builds
.tab-pane
#js-tab-builds
.tab-pane
-
if
pipeline
.
yaml_errors
.
present?
-
if
pipeline
.
yaml_errors
.
present?
...
@@ -39,5 +39,4 @@
...
@@ -39,5 +39,4 @@
-
if
pipeline
.
project
.
build_coverage_enabled?
-
if
pipeline
.
project
.
build_coverage_enabled?
%th
Coverage
%th
Coverage
%th
%th
-
pipeline
.
stages
.
each
do
|
stage
|
=
render
partial:
"projects/stage/stage"
,
collection:
pipeline
.
stages
,
as: :stage
=
render
"projects/stage/stage"
,
subject:
stage
app/views/projects/stage/_graph.html.haml
View file @
8842f552
-
stage
=
local_assigns
.
fetch
(
:stage
)
-
statuses
=
stage
.
statuses
.
latest
-
status_groups
=
statuses
.
sort_by
(
&
:name
).
group_by
(
&
:group_name
)
%li
.stage-column
%li
.stage-column
.stage-name
.stage-name
%a
{
name:
s
ubject
.
name
}
%a
{
name:
s
tage
.
name
}
-
if
s
ubject
.
name
-
if
s
tage
.
name
=
s
ubject
.
name
.
titleize
=
s
tage
.
name
.
titleize
.builds-container
.builds-container
%ul
%ul
-
statuses
=
subject
.
statuses
.
latest
-
status_groups
=
statuses
.
sort_by
(
&
:name
).
group_by
(
&
:group_name
)
-
status_groups
.
each
do
|
group_name
,
grouped_statuses
|
-
status_groups
.
each
do
|
group_name
,
grouped_statuses
|
-
if
grouped_statuses
.
one?
-
if
grouped_statuses
.
one?
-
status
=
grouped_statuses
.
first
-
status
=
grouped_statuses
.
first
...
...
spec/lib/gitlab/ci/status/factory_spec.rb
View file @
8842f552
require
'spec_helper'
require
'spec_helper'
describe
Gitlab
::
Ci
::
Status
::
Factory
do
describe
Gitlab
::
Ci
::
Status
::
Factory
do
let
(
:object
)
{
double
(
status: :created
)
}
subject
do
subject
do
described_class
.
new
(
object
)
described_class
.
new
(
object
)
end
end
let
(
:status
)
do
let
(
:status
)
{
subject
.
fabricate!
}
subject
.
fabricate!
end
context
'when object has a core status'
do
context
'when object has a core status'
do
HasStatus
::
AVAILABLE_STATUSES
.
each
do
|
core_status
|
HasStatus
::
AVAILABLE_STATUSES
.
each
do
|
core_status
|
...
...
spec/lib/gitlab/ci/status/pipeline/factory_spec.rb
View file @
8842f552
...
@@ -21,7 +21,7 @@ describe Gitlab::Ci::Status::Pipeline::Factory do
...
@@ -21,7 +21,7 @@ describe Gitlab::Ci::Status::Pipeline::Factory do
Gitlab
::
Ci
::
Status
.
const_get
(
core_status
.
capitalize
))
Gitlab
::
Ci
::
Status
.
const_get
(
core_status
.
capitalize
))
end
end
it
'extends core status with common
stag
e methods'
do
it
'extends core status with common
pipelin
e methods'
do
expect
(
status
).
to
have_details
expect
(
status
).
to
have_details
expect
(
status
).
not_to
have_action
expect
(
status
).
not_to
have_action
expect
(
status
.
details_path
)
expect
(
status
.
details_path
)
...
@@ -45,7 +45,7 @@ describe Gitlab::Ci::Status::Pipeline::Factory do
...
@@ -45,7 +45,7 @@ describe Gitlab::Ci::Status::Pipeline::Factory do
.
to
be_a
Gitlab
::
Ci
::
Status
::
Pipeline
::
SuccessWithWarnings
.
to
be_a
Gitlab
::
Ci
::
Status
::
Pipeline
::
SuccessWithWarnings
end
end
it
'extends core status with common
stag
e methods'
do
it
'extends core status with common
pipelin
e methods'
do
expect
(
status
).
to
have_details
expect
(
status
).
to
have_details
end
end
end
end
...
...
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