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
7657d202
Commit
7657d202
authored
May 16, 2016
by
Kamil Trzcinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve design of commit_box with status of builds and pipelines
parent
bf4dc758
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
29 deletions
+37
-29
app/views/projects/commit/_builds.html.haml
app/views/projects/commit/_builds.html.haml
+1
-1
app/views/projects/commit/_ci_commit.html.haml
app/views/projects/commit/_ci_commit.html.haml
+15
-14
app/views/projects/commit/_commit_box.html.haml
app/views/projects/commit/_commit_box.html.haml
+21
-14
No files found.
app/views/projects/commit/_builds.html.haml
View file @
7657d202
-
@ci_commits
.
each
do
|
ci_commit
|
=
render
"ci_commit"
,
ci_commit:
ci_commit
=
render
"ci_commit"
,
ci_commit:
ci_commit
,
pipeline_details:
true
app/views/projects/commit/_ci_commit.html.haml
View file @
7657d202
...
...
@@ -7,20 +7,21 @@
-
if
ci_commit
.
builds
.
running_or_pending
.
any?
=
link_to
"Cancel running"
,
cancel_namespace_project_pipeline_path
(
@project
.
namespace
,
@project
,
ci_commit
.
id
),
data:
{
confirm:
'Are you sure?'
},
class:
'btn btn-grouped btn-danger'
,
method: :post
.oneline
Pipeline
=
link_to
"#
#{
ci_commit
.
id
}
"
,
namespace_project_pipeline_path
(
@project
.
namespace
,
@project
,
ci_commit
.
id
),
class:
"monospace"
with
=
pluralize
ci_commit
.
statuses
.
count
(
:id
),
"build"
-
if
ci_commit
.
ref
for
=
link_to
ci_commit
.
ref
,
namespace_project_commits_path
(
@project
.
namespace
,
@project
,
ci_commit
.
ref
),
class:
"monospace"
-
if
defined?
(
link_to_commit
)
&&
link_to_commit
for commit
=
link_to
ci_commit
.
short_sha
,
namespace_project_commit_path
(
@project
.
namespace
,
@project
,
ci_commit
.
sha
),
class:
"monospace"
-
if
ci_commit
.
duration
in
=
time_interval_in_words
ci_commit
.
duration
-
if
defined?
(
pipeline_details
)
&&
pipeline_details
.oneline
Pipeline
=
link_to
"#
#{
ci_commit
.
id
}
"
,
namespace_project_pipeline_path
(
@project
.
namespace
,
@project
,
ci_commit
.
id
),
class:
"monospace"
with
=
pluralize
ci_commit
.
statuses
.
count
(
:id
),
"build"
-
if
ci_commit
.
ref
for
=
link_to
ci_commit
.
ref
,
namespace_project_commits_path
(
@project
.
namespace
,
@project
,
ci_commit
.
ref
),
class:
"monospace"
-
if
defined?
(
link_to_commit
)
&&
link_to_commit
for commit
=
link_to
ci_commit
.
short_sha
,
namespace_project_commit_path
(
@project
.
namespace
,
@project
,
ci_commit
.
sha
),
class:
"monospace"
-
if
ci_commit
.
duration
in
=
time_interval_in_words
ci_commit
.
duration
-
if
ci_commit
.
yaml_errors
.
present?
.bs-callout.bs-callout-danger
...
...
app/views/projects/commit/_commit_box.html.haml
View file @
7657d202
...
...
@@ -23,20 +23,6 @@
%p
.commit-info-row
-
if
defined?
(
pipeline
)
&&
pipeline
.pull-right
=
link_to
namespace_project_pipeline_path
(
@project
.
namespace
,
@project
,
pipeline
),
class:
"ci-status ci-
#{
pipeline
.
status
}
"
do
=
ci_icon_for_status
(
pipeline
.
status
)
Pipeline:
=
ci_label_for_status
(
pipeline
.
status
)
-
elsif
@commit
.
status
.pull-right
=
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
)
Build:
=
ci_label_for_status
(
@commit
.
status
)
%span
.light
Authored by
%strong
=
commit_author_link
(
@commit
,
avatar:
true
,
size:
24
)
...
...
@@ -60,6 +46,27 @@
%span
.commit-info.branches
%i
.fa.fa-spinner.fa-spin
-
if
defined?
(
pipeline
)
&&
pipeline
.commit-info-row
Pipeline
=
link_to
namespace_project_pipeline_path
(
@project
.
namespace
,
@project
,
pipeline
),
class:
"ci-status-link ci-status-icon-
#{
pipeline
.
status
}
"
do
=
ci_icon_for_status
(
pipeline
.
status
)
=
ci_label_for_status
(
pipeline
.
status
)
-
if
pipeline
.
duration
in
=
time_interval_in_words
3600
-
elsif
@commit
.
status
.commit-info-row
Builds for
=
pluralize
(
@commit
.
ci_commits
.
count
,
'pipeline'
)
=
link_to
builds_namespace_project_commit_path
(
@project
.
namespace
,
@project
,
@commit
.
id
),
class:
"ci-status-link ci-status-icon-
#{
@commit
.
status
}
"
do
=
ci_icon_for_status
(
@commit
.
status
)
=
ci_label_for_status
(
@commit
.
status
)
-
if
@commit
.
ci_commits
.
duration
in
=
time_interval_in_words
@commit
.
ci_commits
.
duration
.commit-box.content-block
%h3
.commit-title
=
markdown
escape_once
(
@commit
.
title
),
pipeline: :single_line
...
...
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