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
42fc5a9f
Commit
42fc5a9f
authored
Mar 24, 2020
by
Felipe Artur
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Hide health status when feature is not available
Hide health status from sidebar when feature is not available
parent
d8729627
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
42 additions
and
2 deletions
+42
-2
app/views/shared/issuable/_sidebar.html.haml
app/views/shared/issuable/_sidebar.html.haml
+1
-1
ee/app/assets/javascripts/sidebar/components/status/status.vue
...p/assets/javascripts/sidebar/components/status/status.vue
+1
-1
ee/app/serializers/ee/issue_sidebar_basic_entity.rb
ee/app/serializers/ee/issue_sidebar_basic_entity.rb
+2
-0
ee/spec/features/issues/issue_sidebar_spec.rb
ee/spec/features/issues/issue_sidebar_spec.rb
+37
-0
ee/spec/fixtures/api/schemas/entities/issue_sidebar.json
ee/spec/fixtures/api/schemas/entities/issue_sidebar.json
+1
-0
No files found.
app/views/shared/issuable/_sidebar.html.haml
View file @
42fc5a9f
...
...
@@ -129,7 +129,7 @@
=
render_if_exists
'shared/issuable/sidebar_weight'
,
issuable_sidebar:
issuable_sidebar
-
if
Feature
.
enabled?
(
:save_issuable_health_status
,
@project
.
group
)
&&
issuable_sidebar
[
:type
]
==
"issue"
-
if
issuable_sidebar
.
dig
(
:features_available
,
:health_status
)
.js-sidebar-status-entry-point
-
if
issuable_sidebar
.
has_key?
(
:confidential
)
...
...
ee/app/assets/javascripts/sidebar/components/status/status.vue
View file @
42fc5a9f
...
...
@@ -85,7 +85,7 @@ export default {
</
script
>
<
template
>
<div
class=
"block"
>
<div
class=
"block
health-status
"
>
<div
ref=
"status"
class=
"sidebar-collapsed-icon"
>
<gl-icon
name=
"status-health"
:size=
"14"
/>
...
...
ee/app/serializers/ee/issue_sidebar_basic_entity.rb
View file @
42fc5a9f
...
...
@@ -8,6 +8,8 @@ module EE
expose
:supports_epic?
,
as: :supports_epic
expose
:features_available
do
expose
:supports_health_status?
,
as: :health_status
expose
:issue_weights
do
|
issuable
|
issuable
.
project
.
feature_available?
(
:issue_weights
)
end
...
...
ee/spec/features/issues/issue_sidebar_spec.rb
View file @
42fc5a9f
...
...
@@ -76,6 +76,43 @@ describe 'Issue Sidebar' do
end
end
context
'health status'
,
:js
do
before
do
project
.
add_developer
(
user
)
end
context
'when health status feature is available'
do
it
'shows health status on sidebar'
do
stub_licensed_features
(
issuable_health_status:
true
)
visit_issue
(
project
,
issue
)
expect
(
page
).
to
have_selector
(
'.block.health-status'
)
end
end
context
'when health status feature is not available'
do
it
'does not show health status on sidebar'
do
stub_licensed_features
(
issuable_health_status:
false
)
visit_issue
(
project
,
issue
)
expect
(
page
).
not_to
have_selector
(
'.block.health-status'
)
end
end
context
'when health status feature flag is disabled'
do
it
'does not show health status on sidebar'
do
stub_licensed_features
(
issuable_health_status:
true
)
stub_feature_flags
(
save_issuable_health_status:
false
)
visit_issue
(
project
,
issue
)
expect
(
page
).
not_to
have_selector
(
'.block.health-status'
)
end
end
end
def
visit_issue
(
project
,
issue
)
visit
project_issue_path
(
project
,
issue
)
end
...
...
ee/spec/fixtures/api/schemas/entities/issue_sidebar.json
View file @
42fc5a9f
...
...
@@ -7,6 +7,7 @@
"features_available"
:
{
"type"
:
"object"
,
"properties"
:
{
"health_status"
:
{
"type"
:
"boolean"
},
"issue_weights"
:
{
"type"
:
"boolean"
},
"epics"
:
{
"type"
:
[
"null"
,
"boolean"
]
}
}
...
...
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