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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
2b517453
Commit
2b517453
authored
Feb 26, 2019
by
Scott Hampton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed other deprecated status helpers
Updating a couple other places that were still using deprecated status.
parent
506ac78d
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
11 additions
and
51 deletions
+11
-51
app/helpers/ci_status_helper.rb
app/helpers/ci_status_helper.rb
+0
-37
app/views/ci/status/_icon.html.haml
app/views/ci/status/_icon.html.haml
+5
-8
app/views/projects/commits/_commit.html.haml
app/views/projects/commits/_commit.html.haml
+2
-2
app/views/projects/issues/_merge_requests.html.haml
app/views/projects/issues/_merge_requests.html.haml
+1
-1
app/views/projects/issues/_related_branches.html.haml
app/views/projects/issues/_related_branches.html.haml
+1
-1
app/views/projects/merge_requests/_merge_request.html.haml
app/views/projects/merge_requests/_merge_request.html.haml
+1
-1
app/views/shared/projects/_project.html.haml
app/views/shared/projects/_project.html.haml
+1
-1
No files found.
app/helpers/ci_status_helper.rb
View file @
2b517453
...
@@ -100,43 +100,6 @@ module CiStatusHelper
...
@@ -100,43 +100,6 @@ module CiStatusHelper
"pipeline-status/
#{
pipeline_status
.
sha
}
-
#{
pipeline_status
.
status
}
"
"pipeline-status/
#{
pipeline_status
.
sha
}
-
#{
pipeline_status
.
status
}
"
end
end
def
render_project_pipeline_status
(
pipeline_status
,
tooltip_placement:
'left'
)
project
=
pipeline_status
.
project
path
=
pipelines_project_commit_path
(
project
,
pipeline_status
.
sha
,
ref:
pipeline_status
.
ref
)
render_status_with_link
(
'commit'
,
pipeline_status
.
status
,
path
,
tooltip_placement:
tooltip_placement
)
end
def
render_commit_status
(
commit
,
ref:
nil
,
tooltip_placement:
'left'
)
project
=
commit
.
project
path
=
pipelines_project_commit_path
(
project
,
commit
,
ref:
ref
)
render_status_with_link
(
'commit'
,
commit
.
status
(
ref
),
path
,
tooltip_placement:
tooltip_placement
,
icon_size:
24
)
end
def
render_status_with_link
(
type
,
status
,
path
=
nil
,
tooltip_placement:
'left'
,
cssclass:
''
,
container:
'body'
,
icon_size:
16
)
klass
=
"ci-status-link ci-status-icon-
#{
status
.
dasherize
}
#{
cssclass
}
"
title
=
"
#{
type
.
titleize
}
:
#{
ci_label_for_status
(
status
)
}
"
data
=
{
toggle:
'tooltip'
,
placement:
tooltip_placement
,
container:
container
}
if
path
link_to
ci_icon_for_status
(
status
,
size:
icon_size
),
path
,
class:
klass
,
title:
title
,
data:
data
else
content_tag
:span
,
ci_icon_for_status
(
status
,
size:
icon_size
),
class:
klass
,
title:
title
,
data:
data
end
end
def
detailed_status?
(
status
)
def
detailed_status?
(
status
)
status
.
respond_to?
(
:text
)
&&
status
.
respond_to?
(
:text
)
&&
status
.
respond_to?
(
:label
)
&&
status
.
respond_to?
(
:label
)
&&
...
...
app/views/ci/status/_icon.html.haml
View file @
2b517453
-
status
=
local_assigns
.
fetch
(
:status
)
-
status
=
local_assigns
.
fetch
(
:status
)
-
size
=
local_assigns
.
fetch
(
:size
,
16
)
-
size
=
local_assigns
.
fetch
(
:size
,
16
)
-
link
=
local_assigns
.
fetch
(
:link
,
true
)
-
type
=
local_assigns
.
fetch
(
:type
,
'pipeline'
)
-
title
=
local_assigns
.
fetch
(
:title
,
"
Pipeline
:
#{
status
.
label
}
"
)
-
title
=
local_assigns
.
fetch
(
:title
,
"
#{
type
.
titleize
}
:
#{
status
.
label
}
"
)
-
tooltip_placement
=
local_assigns
.
fetch
(
:tooltip_placement
,
"left"
)
-
tooltip_placement
=
local_assigns
.
fetch
(
:tooltip_placement
,
"left"
)
-
css_classes
=
"ci-status-link ci-status-icon ci-status-icon-
#{
status
.
group
}
#{
'has-tooltip'
if
title
.
present?
}
"
-
css_classes
=
"ci-status-link ci-status-icon ci-status-icon-
#{
status
.
group
}
has-tooltip
"
-
if
link
&&
status
.
has_details?
-
if
status
.
has_details?
=
link_to
status
.
details_path
,
class:
css_classes
,
title:
title
,
data:
{
html:
title
.
present?
,
placement:
tooltip_placement
}
do
=
link_to
status
.
details_path
,
class:
css_classes
,
title:
title
,
data:
{
html:
true
,
placement:
tooltip_placement
}
do
=
sprite_icon
(
status
.
icon
,
size:
size
)
-
else
%span
{
class:
css_classes
,
title:
title
,
data:
{
html:
title
.
present?
,
placement:
tooltip_placement
}
}
=
sprite_icon
(
status
.
icon
,
size:
size
)
=
sprite_icon
(
status
.
icon
,
size:
size
)
app/views/projects/commits/_commit.html.haml
View file @
2b517453
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
=
commit
.
short_id
=
commit
.
short_id
-
if
commit_status
-
if
commit_status
.d-block.d-sm-none
.d-block.d-sm-none
=
render
_commit_status
(
commit
,
ref:
ref
)
=
render
'ci/status/icon'
,
status:
commit
.
last_pipeline
.
detailed_status
(
current_user
),
type:
'commit'
,
size:
24
-
if
commit
.
description?
-
if
commit
.
description?
%button
.text-expander.js-toggle-button
%button
.text-expander.js-toggle-button
=
sprite_icon
(
'ellipsis_h'
,
size:
12
)
=
sprite_icon
(
'ellipsis_h'
,
size:
12
)
...
@@ -47,7 +47,7 @@
...
@@ -47,7 +47,7 @@
=
render
partial:
'projects/commit/ajax_signature'
,
locals:
{
commit:
commit
}
=
render
partial:
'projects/commit/ajax_signature'
,
locals:
{
commit:
commit
}
-
if
commit_status
-
if
commit_status
=
render
_commit_status
(
commit
,
ref:
ref
)
=
render
'ci/status/icon'
,
status:
commit
.
last_pipeline
.
detailed_status
(
current_user
),
type:
'commit'
,
size:
24
.js-commit-pipeline-status
{
data:
{
endpoint:
pipelines_project_commit_path
(
project
,
commit
.
id
,
ref:
ref
)
}
}
.js-commit-pipeline-status
{
data:
{
endpoint:
pipelines_project_commit_path
(
project
,
commit
.
id
,
ref:
ref
)
}
}
...
...
app/views/projects/issues/_merge_requests.html.haml
View file @
2b517453
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
=
merge_request
.
to_reference
=
merge_request
.
to_reference
%span
.mr-ci-status.flex-md-grow-1.justify-content-end.d-flex.ml-md-2
%span
.mr-ci-status.flex-md-grow-1.justify-content-end.d-flex.ml-md-2
-
if
merge_request
.
can_read_pipeline?
-
if
merge_request
.
can_read_pipeline?
=
render
'ci/status/icon'
,
status:
merge_request
.
head_pipeline
.
detailed_status
(
current_user
),
link:
true
,
tooltip_placement:
'bottom'
=
render
'ci/status/icon'
,
status:
merge_request
.
head_pipeline
.
detailed_status
(
current_user
),
tooltip_placement:
'bottom'
-
elsif
has_any_head_pipeline
-
elsif
has_any_head_pipeline
=
icon
(
'blank fw'
)
=
icon
(
'blank fw'
)
...
...
app/views/projects/issues/_related_branches.html.haml
View file @
2b517453
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
-
pipeline
=
@project
.
pipeline_for
(
branch
,
target
.
sha
)
if
target
-
pipeline
=
@project
.
pipeline_for
(
branch
,
target
.
sha
)
if
target
-
if
can?
(
current_user
,
:read_pipeline
,
pipeline
)
-
if
can?
(
current_user
,
:read_pipeline
,
pipeline
)
%span
.related-branch-ci-status
%span
.related-branch-ci-status
=
render
'ci/status/icon'
,
status:
pipeline
.
detailed_status
(
current_user
)
,
link:
true
=
render
'ci/status/icon'
,
status:
pipeline
.
detailed_status
(
current_user
)
%span
.related-branch-info
%span
.related-branch-info
%strong
%strong
=
link_to
branch
,
project_compare_path
(
@project
,
from:
@project
.
default_branch
,
to:
branch
),
class:
"ref-name"
=
link_to
branch
,
project_compare_path
(
@project
,
from:
@project
.
default_branch
,
to:
branch
),
class:
"ref-name"
app/views/projects/merge_requests/_merge_request.html.haml
View file @
2b517453
...
@@ -48,7 +48,7 @@
...
@@ -48,7 +48,7 @@
CLOSED
CLOSED
-
if
can?
(
current_user
,
:read_pipeline
,
merge_request
.
head_pipeline
)
-
if
can?
(
current_user
,
:read_pipeline
,
merge_request
.
head_pipeline
)
%li
.issuable-pipeline-status.d-none.d-sm-inline-block
%li
.issuable-pipeline-status.d-none.d-sm-inline-block
=
render
'ci/status/icon'
,
status:
merge_request
.
head_pipeline
.
detailed_status
(
current_user
)
,
link:
true
=
render
'ci/status/icon'
,
status:
merge_request
.
head_pipeline
.
detailed_status
(
current_user
)
-
if
merge_request
.
open?
&&
merge_request
.
broken?
-
if
merge_request
.
open?
&&
merge_request
.
broken?
%li
.issuable-pipeline-broken.d-none.d-sm-inline-block
%li
.issuable-pipeline-broken.d-none.d-sm-inline-block
=
link_to
merge_request_path
(
merge_request
),
class:
"has-tooltip"
,
title:
_
(
'Cannot be merged automatically'
)
do
=
link_to
merge_request_path
(
merge_request
),
class:
"has-tooltip"
,
title:
_
(
'Cannot be merged automatically'
)
do
...
...
app/views/shared/projects/_project.html.haml
View file @
2b517453
...
@@ -85,6 +85,6 @@
...
@@ -85,6 +85,6 @@
=
number_with_delimiter
(
project
.
open_issues_count
)
=
number_with_delimiter
(
project
.
open_issues_count
)
-
if
pipeline_status
&&
can?
(
current_user
,
:read_cross_project
)
&&
project
.
pipeline_status
.
has_status?
&&
can?
(
current_user
,
:read_build
,
project
)
-
if
pipeline_status
&&
can?
(
current_user
,
:read_cross_project
)
&&
project
.
pipeline_status
.
has_status?
&&
can?
(
current_user
,
:read_build
,
project
)
%span
.icon-wrapper.pipeline-status
%span
.icon-wrapper.pipeline-status
=
render
_project_pipeline_status
(
project
.
pipeline_status
,
tooltip_placement:
'top'
)
=
render
'ci/status/icon'
,
status:
project
.
commit
.
last_pipeline
.
detailed_status
(
current_user
),
type:
'commit'
,
tooltip_placement:
'top'
.updated-note
.updated-note
%span
Updated
#{
updated_tooltip
}
%span
Updated
#{
updated_tooltip
}
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