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
Léo-Paul Géneau
gitlab-ce
Commits
bf4dc758
Commit
bf4dc758
authored
May 16, 2016
by
Kamil Trzcinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve the pipelines design
parent
003526e2
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
21 additions
and
17 deletions
+21
-17
app/assets/stylesheets/pages/pipelines.scss
app/assets/stylesheets/pages/pipelines.scss
+5
-0
app/controllers/projects/pipelines_controller.rb
app/controllers/projects/pipelines_controller.rb
+1
-1
app/models/commit_status.rb
app/models/commit_status.rb
+1
-0
app/views/projects/ci/commits/_commit.html.haml
app/views/projects/ci/commits/_commit.html.haml
+3
-3
app/views/projects/commit/_ci_stage.html.haml
app/views/projects/commit/_ci_stage.html.haml
+3
-5
app/views/projects/commit/_commit_box.html.haml
app/views/projects/commit/_commit_box.html.haml
+2
-2
app/views/projects/pipelines/index.html.haml
app/views/projects/pipelines/index.html.haml
+4
-4
app/views/projects/pipelines/new.html.haml
app/views/projects/pipelines/new.html.haml
+2
-2
No files found.
app/assets/stylesheets/pages/pipelines.scss
0 → 100644
View file @
bf4dc758
.pipeline-stage
{
white-space
:
nowrap
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
}
app/controllers/projects/pipelines_controller.rb
View file @
bf4dc758
...
@@ -25,7 +25,7 @@ class Projects::PipelinesController < Projects::ApplicationController
...
@@ -25,7 +25,7 @@ class Projects::PipelinesController < Projects::ApplicationController
flash
[
:alert
]
=
e
.
message
flash
[
:alert
]
=
e
.
message
render
'new'
render
'new'
rescue
rescue
flash
[
:alert
]
=
'
Undefined error
'
flash
[
:alert
]
=
'
The pipeline could not be created. Please try again.
'
render
'new'
render
'new'
end
end
end
end
...
...
app/models/commit_status.rb
View file @
bf4dc758
...
@@ -14,6 +14,7 @@ class CommitStatus < ActiveRecord::Base
...
@@ -14,6 +14,7 @@ class CommitStatus < ActiveRecord::Base
alias_attribute
:author
,
:user
alias_attribute
:author
,
:user
scope
:latest
,
->
{
where
(
id:
unscope
(
:select
).
select
(
'max(id)'
).
group
(
:name
,
:commit_id
))
}
scope
:latest
,
->
{
where
(
id:
unscope
(
:select
).
select
(
'max(id)'
).
group
(
:name
,
:commit_id
))
}
scope
:retried
,
->
{
where
.
not
(
id:
latest
)
}
scope
:ordered
,
->
{
order
(
:name
)
}
scope
:ordered
,
->
{
order
(
:name
)
}
scope
:ignored
,
->
{
where
(
allow_failure:
true
,
status:
[
:failed
,
:canceled
])
}
scope
:ignored
,
->
{
where
(
allow_failure:
true
,
status:
[
:failed
,
:canceled
])
}
...
...
app/views/projects/ci/commits/_commit.html.haml
View file @
bf4dc758
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
-
if
commit
.
triggered?
-
if
commit
.
triggered?
%span
.label.label-primary
triggered
%span
.label.label-primary
triggered
-
if
commit
.
yaml_errors
.
present?
-
if
commit
.
yaml_errors
.
present?
%span
.label.label-danger.has-tooltip
(
title=
"#{commit.yaml_errors}"
)
yaml invalid
%span
.label.label-danger.has-tooltip
{
title:
"#{commit.yaml_errors}"
}
yaml invalid
-
if
commit
.
builds
.
any?
(
&
:stuck?
)
-
if
commit
.
builds
.
any?
(
&
:stuck?
)
%span
.label.label-warning
stuck
%span
.label.label-warning
stuck
...
@@ -36,7 +36,7 @@
...
@@ -36,7 +36,7 @@
%td
%td
-
if
status
=
stages_status
[
stage
]
-
if
status
=
stages_status
[
stage
]
-
tooltip
=
"
#{
stage
.
titleize
}
:
#{
status
}
"
-
tooltip
=
"
#{
stage
.
titleize
}
:
#{
status
}
"
%span
.has-tooltip
(
title=
"#{tooltip}"
)
{
class:
"ci-status-icon-#{status}"
}
%span
.has-tooltip
{
title:
"#{tooltip}"
,
class:
"ci-status-icon-#{status}"
}
=
ci_icon_for_status
(
status
)
=
ci_icon_for_status
(
status
)
%td
%td
...
@@ -74,4 +74,4 @@
...
@@ -74,4 +74,4 @@
-
if
commit
.
active?
-
if
commit
.
active?
=
link_to
cancel_namespace_project_pipeline_path
(
@project
.
namespace
,
@project
,
commit
.
id
),
class:
'btn btn-remove has-tooltip'
,
title:
"Cancel"
,
method: :post
do
=
link_to
cancel_namespace_project_pipeline_path
(
@project
.
namespace
,
@project
,
commit
.
id
),
class:
'btn btn-remove has-tooltip'
,
title:
"Cancel"
,
method: :post
do
=
icon
(
"remove"
,
class:
"cred"
)
=
icon
(
"remove"
)
app/views/projects/commit/_ci_stage.html.haml
View file @
bf4dc758
-
latest
=
statuses
.
latest
-
retried
=
statuses
.
where
.
not
(
id:
latest
)
%tr
%tr
%th
{
colspan:
10
}
%th
{
colspan:
10
}
%strong
%strong
-
status
=
latest
.
status
-
status
=
statuses
.
latest
.
status
%span
{
class:
"ci-status-link ci-status-icon-#{status}"
}
%span
{
class:
"ci-status-link ci-status-icon-#{status}"
}
=
ci_icon_for_status
(
status
)
=
ci_icon_for_status
(
status
)
-
if
stage
-
if
stage
=
stage
.
titleize
.
pluralize
=
stage
.
titleize
.
pluralize
=
render
latest
.
ordered
,
coverage:
@project
.
build_coverage_enabled?
,
tage:
false
,
ref:
false
,
allow_retry:
true
=
render
statuses
.
latest
.
ordered
,
coverage:
@project
.
build_coverage_enabled?
,
s
tage:
false
,
ref:
false
,
allow_retry:
true
=
render
retried
.
ordered
,
coverage:
@project
.
build_coverage_enabled?
,
stage:
false
,
ref:
false
,
retried:
true
=
render
statuses
.
retried
.
ordered
,
coverage:
@project
.
build_coverage_enabled?
,
stage:
false
,
ref:
false
,
retried:
true
%tr
%tr
%td
{
colspan:
10
}
%td
{
colspan:
10
}
app/views/projects/commit/_commit_box.html.haml
View file @
bf4dc758
...
@@ -27,14 +27,14 @@
...
@@ -27,14 +27,14 @@
.pull-right
.pull-right
=
link_to
namespace_project_pipeline_path
(
@project
.
namespace
,
@project
,
pipeline
),
class:
"ci-status ci-
#{
pipeline
.
status
}
"
do
=
link_to
namespace_project_pipeline_path
(
@project
.
namespace
,
@project
,
pipeline
),
class:
"ci-status ci-
#{
pipeline
.
status
}
"
do
=
ci_icon_for_status
(
pipeline
.
status
)
=
ci_icon_for_status
(
pipeline
.
status
)
p
ipeline:
P
ipeline:
=
ci_label_for_status
(
pipeline
.
status
)
=
ci_label_for_status
(
pipeline
.
status
)
-
elsif
@commit
.
status
-
elsif
@commit
.
status
.pull-right
.pull-right
=
link_to
builds_namespace_project_commit_path
(
@project
.
namespace
,
@project
,
@commit
.
id
),
class:
"ci-status ci-
#{
@commit
.
status
}
"
do
=
link_to
builds_namespace_project_commit_path
(
@project
.
namespace
,
@project
,
@commit
.
id
),
class:
"ci-status ci-
#{
@commit
.
status
}
"
do
=
ci_icon_for_status
(
@commit
.
status
)
=
ci_icon_for_status
(
@commit
.
status
)
b
uild:
B
uild:
=
ci_label_for_status
(
@commit
.
status
)
=
ci_label_for_status
(
@commit
.
status
)
%span
.light
Authored by
%span
.light
Authored by
...
...
app/views/projects/pipelines/index.html.haml
View file @
bf4dc758
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
-
if
can?
current_user
,
:create_pipeline
,
@project
-
if
can?
current_user
,
:create_pipeline
,
@project
=
link_to
new_namespace_project_pipeline_path
(
@project
.
namespace
,
@project
),
class:
'btn btn-create'
do
=
link_to
new_namespace_project_pipeline_path
(
@project
.
namespace
,
@project
),
class:
'btn btn-create'
do
=
icon
(
'plus'
)
=
icon
(
'plus'
)
New
New
pipeline
-
unless
@repository
.
gitlab_ci_yml
-
unless
@repository
.
gitlab_ci_yml
=
link_to
'Get started with Pipelines'
,
help_page_path
(
'ci/quick_start'
,
'README'
),
class:
'btn btn-info'
=
link_to
'Get started with Pipelines'
,
help_page_path
(
'ci/quick_start'
,
'README'
),
class:
'btn btn-info'
...
@@ -36,7 +36,7 @@
...
@@ -36,7 +36,7 @@
=
icon
(
'wrench'
)
=
icon
(
'wrench'
)
%span
CI Lint
%span
CI Lint
.
gray
-content-block
.
row
-content-block
-
if
@scope
==
'running'
-
if
@scope
==
'running'
Running pipelines for this project
Running pipelines for this project
-
elsif
@scope
.
nil?
-
elsif
@scope
.
nil?
...
@@ -57,8 +57,8 @@
...
@@ -57,8 +57,8 @@
%th
Commit
%th
Commit
-
stages
.
each
do
|
stage
|
-
stages
.
each
do
|
stage
|
%th
%th
%span
.
has-tooltip
(
title=
"#{stage.titleize}"
)
%span
.
pipeline-stage.has-tooltip
{
title:
"#{stage.titleize}"
}
=
truncate
(
stage
.
titleize
.
pluralize
,
length:
8
)
=
stage
.
titleize
.
pluralize
%th
%th
%th
%th
=
render
@pipelines
,
commit_sha:
true
,
stage:
true
,
allow_retry:
true
,
stages:
stages
=
render
@pipelines
,
commit_sha:
true
,
stage:
true
,
allow_retry:
true
,
stages:
stages
...
...
app/views/projects/pipelines/new.html.haml
View file @
bf4dc758
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
New Pipeline
New Pipeline
%hr
%hr
=
form_tag
namespace_project_pipelines_path
,
method: :post
,
id:
"new-pipeline-form"
,
class:
"form-horizontal js-
create-branch
-form js-requires-input"
do
=
form_tag
namespace_project_pipelines_path
,
method: :post
,
id:
"new-pipeline-form"
,
class:
"form-horizontal js-
new-pipeline
-form js-requires-input"
do
.form-group
.form-group
=
label_tag
:ref
,
'Create for'
,
class:
'control-label'
=
label_tag
:ref
,
'Create for'
,
class:
'control-label'
.col-sm-10
.col-sm-10
...
@@ -22,4 +22,4 @@
...
@@ -22,4 +22,4 @@
:javascript
:javascript
var
availableRefs
=
#{
@project
.
repository
.
ref_names
.
to_json
}
;
var
availableRefs
=
#{
@project
.
repository
.
ref_names
.
to_json
}
;
new
NewBranchForm
(
$
(
'
.js-
create-branch
-form
'
),
availableRefs
)
new
NewBranchForm
(
$
(
'
.js-
new-pipeline
-form
'
),
availableRefs
)
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