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
22b272bd
Commit
22b272bd
authored
Sep 29, 2021
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab master
parents
c51d7f7d
0335e0c4
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
21 additions
and
28 deletions
+21
-28
app/assets/javascripts/vue_merge_request_widget/components/extensions/base.vue
...s/vue_merge_request_widget/components/extensions/base.vue
+2
-0
app/assets/javascripts/vue_merge_request_widget/components/extensions/status_icon.vue
...erge_request_widget/components/extensions/status_icon.vue
+2
-1
ee/config/feature_flags/development/project_level_issues_analytics.yml
...ture_flags/development/project_level_issues_analytics.yml
+0
-8
ee/lib/ee/sidebars/projects/menus/analytics_menu.rb
ee/lib/ee/sidebars/projects/menus/analytics_menu.rb
+1
-2
ee/spec/lib/ee/sidebars/projects/menus/analytics_menu_spec.rb
...pec/lib/ee/sidebars/projects/menus/analytics_menu_spec.rb
+3
-11
spec/frontend/vue_mr_widget/mr_widget_options_spec.js
spec/frontend/vue_mr_widget/mr_widget_options_spec.js
+10
-5
spec/frontend/vue_mr_widget/test_extension.js
spec/frontend/vue_mr_widget/test_extension.js
+3
-1
No files found.
app/assets/javascripts/vue_merge_request_widget/components/extensions/base.vue
View file @
22b272bd
...
...
@@ -46,6 +46,8 @@ export default {
return
true
;
},
statusIconName
()
{
if
(
this
.
isLoadingSummary
)
return
null
;
return
this
.
statusIcon
(
this
.
collapsedData
);
},
},
...
...
app/assets/javascripts/vue_merge_request_widget/components/extensions/status_icon.vue
View file @
22b272bd
...
...
@@ -19,7 +19,8 @@ export default {
},
iconName
:
{
type
:
String
,
required
:
true
,
required
:
false
,
default
:
null
,
},
},
computed
:
{
...
...
ee/config/feature_flags/development/project_level_issues_analytics.yml
deleted
100644 → 0
View file @
c51d7f7d
---
name
:
project_level_issues_analytics
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/25417
rollout_issue_url
:
milestone
:
'
12.9'
type
:
development
group
:
group::optimize
default_enabled
:
true
ee/lib/ee/sidebars/projects/menus/analytics_menu.rb
View file @
22b272bd
...
...
@@ -65,8 +65,7 @@ module EE
end
def
show_issues_analytics?
::
Feature
.
enabled?
(
:project_level_issues_analytics
,
context
.
project
,
default_enabled:
true
)
&&
context
.
project
.
licensed_feature_available?
(
:issues_analytics
)
&&
context
.
project
.
licensed_feature_available?
(
:issues_analytics
)
&&
can?
(
context
.
current_user
,
:read_project
,
context
.
project
)
end
...
...
ee/spec/lib/ee/sidebars/projects/menus/analytics_menu_spec.rb
View file @
22b272bd
...
...
@@ -50,10 +50,10 @@ RSpec.describe Sidebars::Projects::Menus::AnalyticsMenu do
describe
'Issue'
do
let
(
:item_id
)
{
:issues
}
let
(
:
flag_enabl
ed
)
{
true
}
let
(
:
licens
ed
)
{
true
}
before
do
stub_licensed_features
(
issues_analytics:
flag_enabl
ed
)
stub_licensed_features
(
issues_analytics:
licens
ed
)
end
specify
{
is_expected
.
not_to
be_nil
}
...
...
@@ -64,16 +64,8 @@ RSpec.describe Sidebars::Projects::Menus::AnalyticsMenu do
specify
{
is_expected
.
to
be_nil
}
end
describe
'when feature flag :project_level_issues_analytics is not enabled'
do
before
do
stub_feature_flags
(
project_level_issues_analytics:
false
)
end
specify
{
is_expected
.
to
be_nil
}
end
describe
'when licensed feature issues analytics is not enabled'
do
let
(
:
flag_enabl
ed
)
{
false
}
let
(
:
licens
ed
)
{
false
}
specify
{
is_expected
.
to
be_nil
}
end
...
...
spec/frontend/vue_mr_widget/mr_widget_options_spec.js
View file @
22b272bd
...
...
@@ -10,7 +10,10 @@ import axios from '~/lib/utils/axios_utils';
import
{
setFaviconOverlay
}
from
'
~/lib/utils/favicon
'
;
import
notify
from
'
~/lib/utils/notify
'
;
import
SmartInterval
from
'
~/smart_interval
'
;
import
{
registerExtension
}
from
'
~/vue_merge_request_widget/components/extensions
'
;
import
{
registerExtension
,
registeredExtensions
,
}
from
'
~/vue_merge_request_widget/components/extensions
'
;
import
{
SUCCESS
}
from
'
~/vue_merge_request_widget/components/deployment/constants
'
;
import
eventHub
from
'
~/vue_merge_request_widget/event_hub
'
;
import
MrWidgetOptions
from
'
~/vue_merge_request_widget/mr_widget_options.vue
'
;
...
...
@@ -886,20 +889,22 @@ describe('MrWidgetOptions', () => {
describe
(
'
mock extension
'
,
()
=>
{
beforeEach
(()
=>
{
registerExtension
(
testExtension
);
createComponent
();
});
it
(
'
renders collapsed data
'
,
async
()
=>
{
registerExtension
(
testExtension
);
afterEach
(()
=>
{
registeredExtensions
.
extensions
=
[];
});
it
(
'
renders collapsed data
'
,
async
()
=>
{
await
waitForPromises
();
expect
(
wrapper
.
text
()).
toContain
(
'
Test extension summary count: 1
'
);
});
it
(
'
renders full data
'
,
async
()
=>
{
registerExtension
(
testExtension
);
await
waitForPromises
();
wrapper
...
...
spec/frontend/vue_mr_widget/test_extension.js
View file @
22b272bd
import
{
EXTENSION_ICONS
}
from
'
~/vue_merge_request_widget/constants
'
;
export
default
{
name
:
'
WidgetTestExtension
'
,
props
:
[
'
targetProjectFullPath
'
],
...
...
@@ -6,7 +8,7 @@ export default {
return
`Test extension summary count:
${
count
}
&
${
targetProjectFullPath
}
`
;
},
statusIcon
({
count
})
{
return
count
>
0
?
'
warning
'
:
'
success
'
;
return
count
>
0
?
EXTENSION_ICONS
.
warning
:
EXTENSION_ICONS
.
success
;
},
},
methods
:
{
...
...
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