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
feaf0180
Commit
feaf0180
authored
Dec 08, 2016
by
Kamil Trzcinski
Committed by
Grzegorz Bizon
Dec 12, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove ci_status_with_icon helper and replace it with partial [ci skip]
parent
a83a80ed
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
17 additions
and
34 deletions
+17
-34
app/helpers/ci_status_helper.rb
app/helpers/ci_status_helper.rb
+1
-19
app/views/admin/runners/show.html.haml
app/views/admin/runners/show.html.haml
+1
-1
app/views/ci/status/_icon_with_label.html.haml
app/views/ci/status/_icon_with_label.html.haml
+10
-0
app/views/projects/builds/_header.html.haml
app/views/projects/builds/_header.html.haml
+1
-1
app/views/projects/ci/builds/_build.html.haml
app/views/projects/ci/builds/_build.html.haml
+1
-4
app/views/projects/ci/pipelines/_pipeline.html.haml
app/views/projects/ci/pipelines/_pipeline.html.haml
+1
-4
app/views/projects/generic_commit_statuses/_generic_commit_status.html.haml
.../generic_commit_statuses/_generic_commit_status.html.haml
+1
-4
app/views/projects/pipelines/_info.html.haml
app/views/projects/pipelines/_info.html.haml
+1
-1
No files found.
app/helpers/ci_status_helper.rb
View file @
feaf0180
...
@@ -4,25 +4,7 @@ module CiStatusHelper
...
@@ -4,25 +4,7 @@ module CiStatusHelper
builds_namespace_project_commit_path
(
project
.
namespace
,
project
,
pipeline
.
sha
)
builds_namespace_project_commit_path
(
project
.
namespace
,
project
,
pipeline
.
sha
)
end
end
def
ci_status_with_icon
(
status
,
target
=
nil
)
# Is used by Commit and Merge Request Widget
content
=
ci_icon_for_status
(
status
)
+
ci_text_for_status
(
status
)
klass
=
"ci-status ci-
#{
status
}
"
if
target
link_to
content
,
target
,
class:
klass
else
content_tag
:span
,
content
,
class:
klass
end
end
def
ci_text_for_status
(
status
)
if
detailed_status?
(
status
)
status
.
text
else
status
end
end
def
ci_label_for_status
(
status
)
def
ci_label_for_status
(
status
)
if
detailed_status?
(
status
)
if
detailed_status?
(
status
)
return
status
.
label
return
status
.
label
...
...
app/views/admin/runners/show.html.haml
View file @
feaf0180
...
@@ -91,7 +91,7 @@
...
@@ -91,7 +91,7 @@
%strong
##{build.id}
%strong
##{build.id}
%td
.status
%td
.status
=
ci_status_with_icon
(
build
.
status
)
=
render
"ci/status/icon_with_label"
,
subject:
build
%td
.status
%td
.status
-
if
project
-
if
project
...
...
app/views/ci/status/_icon_with_label.html.haml
0 → 100644
View file @
feaf0180
-
details_path
=
subject
.
details_path
if
subject
.
has_details?
(
current_user
)
-
klass
=
"ci-status ci-
#{
subject
.
status
}
"
-
if
details_path
=
link_to
details_path
,
class:
klass
do
=
custom_icon
(
status
.
icon
)
=
status
.
text
-
else
%span
{
class:
klass
}
=
custom_icon
(
status
.
icon
)
=
status
.
text
app/views/projects/builds/_header.html.haml
View file @
feaf0180
.content-block.build-header
.content-block.build-header
.header-content
.header-content
=
ci_status_with_icon
(
@build
.
status
)
=
render
"ci/status/icon_with_label"
,
subject:
build
Build
Build
%strong
##{@build.id}
%strong
##{@build.id}
in pipeline
in pipeline
...
...
app/views/projects/ci/builds/_build.html.haml
View file @
feaf0180
...
@@ -9,10 +9,7 @@
...
@@ -9,10 +9,7 @@
%tr
.build.commit
{
class:
(
'retried'
if
retried
)}
%tr
.build.commit
{
class:
(
'retried'
if
retried
)}
%td
.status
%td
.status
-
if
can?
(
current_user
,
:read_build
,
build
)
=
render
"ci/status/icon_with_label"
,
subject:
build
=
ci_status_with_icon
(
build
.
status
,
namespace_project_build_url
(
build
.
project
.
namespace
,
build
.
project
,
build
))
-
else
=
ci_status_with_icon
(
build
.
status
)
%td
.branch-commit
%td
.branch-commit
-
if
can?
(
current_user
,
:read_build
,
build
)
-
if
can?
(
current_user
,
:read_build
,
build
)
...
...
app/views/projects/ci/pipelines/_pipeline.html.haml
View file @
feaf0180
-
status
=
pipeline
.
status
-
status
=
pipeline
.
status
-
detailed_status
=
pipeline
.
detailed_status
-
show_commit
=
local_assigns
.
fetch
(
:show_commit
,
true
)
-
show_commit
=
local_assigns
.
fetch
(
:show_commit
,
true
)
-
show_branch
=
local_assigns
.
fetch
(
:show_branch
,
true
)
-
show_branch
=
local_assigns
.
fetch
(
:show_branch
,
true
)
%tr
.commit
%tr
.commit
%td
.commit-link
%td
.commit-link
=
link_to
namespace_project_pipeline_path
(
pipeline
.
project
.
namespace
,
pipeline
.
project
,
pipeline
.
id
),
class:
"ci-status ci-
#{
detailed_status
}
"
do
=
render
"ci/status/icon_with_label"
,
subject:
pipeline
=
ci_icon_for_status
(
detailed_status
)
=
ci_text_for_status
(
detailed_status
)
%td
%td
=
link_to
namespace_project_pipeline_path
(
pipeline
.
project
.
namespace
,
pipeline
.
project
,
pipeline
.
id
)
do
=
link_to
namespace_project_pipeline_path
(
pipeline
.
project
.
namespace
,
pipeline
.
project
,
pipeline
.
id
)
do
...
...
app/views/projects/generic_commit_statuses/_generic_commit_status.html.haml
View file @
feaf0180
...
@@ -8,10 +8,7 @@
...
@@ -8,10 +8,7 @@
%tr
.generic_commit_status
{
class:
(
'retried'
if
retried
)}
%tr
.generic_commit_status
{
class:
(
'retried'
if
retried
)}
%td
.status
%td
.status
-
if
can?
(
current_user
,
:read_commit_status
,
generic_commit_status
)
&&
generic_commit_status
.
target_url
=
render
"ci/status/icon_with_label"
,
subject:
generic_commit_status
=
ci_status_with_icon
(
generic_commit_status
.
status
,
generic_commit_status
.
target_url
)
-
else
=
ci_status_with_icon
(
generic_commit_status
.
status
)
%td
.generic_commit_status-link
%td
.generic_commit_status-link
-
if
can?
(
current_user
,
:read_commit_status
,
generic_commit_status
)
&&
generic_commit_status
.
target_url
-
if
can?
(
current_user
,
:read_commit_status
,
generic_commit_status
)
&&
generic_commit_status
.
target_url
...
...
app/views/projects/pipelines/_info.html.haml
View file @
feaf0180
.page-content-header
.page-content-header
.header-main-content
.header-main-content
=
ci_status_with_icon
(
@pipeline
.
detailed_status
)
=
render
"ci/status/icon_with_label"
,
subject:
@pipeline
%strong
Pipeline ##{@commit.pipelines.last.id}
%strong
Pipeline ##{@commit.pipelines.last.id}
triggered
#{
time_ago_with_tooltip
(
@commit
.
authored_date
)
}
by
triggered
#{
time_ago_with_tooltip
(
@commit
.
authored_date
)
}
by
=
author_avatar
(
@commit
,
size:
24
)
=
author_avatar
(
@commit
,
size:
24
)
...
...
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