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
Jérome Perrin
gitlab-ce
Commits
cb6f0351
Commit
cb6f0351
authored
Apr 13, 2016
by
Kamil Trzcinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve pipeline view
parent
c351b9f5
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
4 deletions
+21
-4
app/controllers/projects/pipelines_controller.rb
app/controllers/projects/pipelines_controller.rb
+5
-0
app/views/projects/commit/_ci_commit.html.haml
app/views/projects/commit/_ci_commit.html.haml
+1
-2
app/views/projects/commit/_commit_box.html.haml
app/views/projects/commit/_commit_box.html.haml
+9
-2
app/views/projects/pipelines/show.html.haml
app/views/projects/pipelines/show.html.haml
+6
-0
No files found.
app/controllers/projects/pipelines_controller.rb
View file @
cb6f0351
class
Projects::PipelinesController
<
Projects
::
ApplicationController
class
Projects::PipelinesController
<
Projects
::
ApplicationController
before_action
:pipeline
,
except:
[
:index
,
:new
,
:create
]
before_action
:pipeline
,
except:
[
:index
,
:new
,
:create
]
before_action
:commit
,
only:
[
:show
]
before_action
:authorize_read_pipeline!
before_action
:authorize_read_pipeline!
before_action
:authorize_create_pipeline!
,
only:
[
:new
,
:create
]
before_action
:authorize_create_pipeline!
,
only:
[
:new
,
:create
]
before_action
:authorize_update_pipeline!
,
only:
[
:retry
,
:cancel
]
before_action
:authorize_update_pipeline!
,
only:
[
:retry
,
:cancel
]
...
@@ -85,4 +86,8 @@ class Projects::PipelinesController < Projects::ApplicationController
...
@@ -85,4 +86,8 @@ class Projects::PipelinesController < Projects::ApplicationController
def
pipeline
def
pipeline
@pipeline
||=
project
.
ci_commits
.
find_by!
(
id:
params
[
:id
])
@pipeline
||=
project
.
ci_commits
.
find_by!
(
id:
params
[
:id
])
end
end
def
commit
@commit
||=
@pipeline
.
commit_data
end
end
end
app/views/projects/commit/_ci_commit.html.haml
View file @
cb6f0351
...
@@ -14,8 +14,7 @@
...
@@ -14,8 +14,7 @@
=
pluralize
ci_commit
.
statuses
.
count
(
:id
),
"build"
=
pluralize
ci_commit
.
statuses
.
count
(
:id
),
"build"
-
if
ci_commit
.
ref
-
if
ci_commit
.
ref
for
for
%span
.label.label-info
=
link_to
ci_commit
.
ref
,
namespace_project_commits_path
(
@project
.
namespace
,
@project
,
ci_commit
.
ref
),
class:
"monospace"
=
ci_commit
.
ref
-
if
defined?
(
link_to_commit
)
&&
link_to_commit
-
if
defined?
(
link_to_commit
)
&&
link_to_commit
for commit
for commit
=
link_to
ci_commit
.
short_sha
,
namespace_project_commit_path
(
@project
.
namespace
,
@project
,
ci_commit
.
sha
),
class:
"monospace"
=
link_to
ci_commit
.
short_sha
,
namespace_project_commit_path
(
@project
.
namespace
,
@project
,
ci_commit
.
sha
),
class:
"monospace"
...
...
app/views/projects/commit/_commit_box.html.haml
View file @
cb6f0351
.pull-right
.pull-right
%div
%div
-
if
@notes_count
>
0
-
if
defined?
(
@notes_count
)
&&
@notes_count
>
0
%span
.btn.disabled.btn-grouped
%span
.btn.disabled.btn-grouped
%i
.fa.fa-comment
%i
.fa.fa-comment
=
@notes_count
=
@notes_count
...
@@ -42,7 +42,14 @@
...
@@ -42,7 +42,14 @@
-
@commit
.
parents
.
each
do
|
parent
|
-
@commit
.
parents
.
each
do
|
parent
|
=
link_to
parent
.
short_id
,
namespace_project_commit_path
(
@project
.
namespace
,
@project
,
parent
),
class:
"monospace"
=
link_to
parent
.
short_id
,
namespace_project_commit_path
(
@project
.
namespace
,
@project
,
parent
),
class:
"monospace"
-
if
@commit
.
status
-
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
.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
)
...
...
app/views/projects/pipelines/show.html.haml
View file @
cb6f0351
-
page_title
"Pipeline"
-
page_title
"Pipeline"
=
render
"header_title"
=
render
"header_title"
.prepend-top-default
-
if
@commit
=
render
"projects/commit/commit_box"
,
pipeline:
@pipeline
%div
.block-connector
=
render
"projects/commit/ci_commit"
,
ci_commit:
@pipeline
=
render
"projects/commit/ci_commit"
,
ci_commit:
@pipeline
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