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
67abfa8a
Commit
67abfa8a
authored
Dec 02, 2021
by
Ezekiel Kigbo
Committed by
Brandon Labuschagne
Dec 02, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[VSA] Fix duplicate summary data request
parent
deb24d90
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
15 deletions
+14
-15
ee/app/assets/javascripts/analytics/cycle_analytics/components/base.vue
...javascripts/analytics/cycle_analytics/components/base.vue
+4
-5
ee/app/assets/javascripts/analytics/cycle_analytics/store/getters.js
...ts/javascripts/analytics/cycle_analytics/store/getters.js
+1
-1
ee/app/assets/javascripts/analytics/shared/utils.js
ee/app/assets/javascripts/analytics/shared/utils.js
+1
-1
ee/spec/frontend/analytics/cycle_analytics/components/base_spec.js
...rontend/analytics/cycle_analytics/components/base_spec.js
+1
-1
ee/spec/frontend/analytics/shared/utils_spec.js
ee/spec/frontend/analytics/shared/utils_spec.js
+7
-7
No files found.
ee/app/assets/javascripts/analytics/cycle_analytics/components/base.vue
View file @
67abfa8a
<
script
>
import
{
GlEmptyState
}
from
'
@gitlab/ui
'
;
import
{
mapActions
,
mapState
,
mapGetters
}
from
'
vuex
'
;
import
{
toYmd
}
from
'
~/analytics/shared/utils
'
;
import
PathNavigation
from
'
~/cycle_analytics/components/path_navigation.vue
'
;
import
StageTable
from
'
~/cycle_analytics/components/stage_table.vue
'
;
import
ValueStreamFilters
from
'
~/cycle_analytics/components/value_stream_filters.vue
'
;
...
...
@@ -84,7 +83,7 @@ export default {
return
this
.
createdAfter
&&
this
.
createdBefore
;
},
query
()
{
const
selectedProjectIds
=
this
.
selectedProjectIds
?.
length
?
this
.
selectedProjectIds
:
null
;
const
{
project_ids
,
created_after
,
created_before
}
=
this
.
cycleAnalyticsRequestParams
;
const
paginationUrlParams
=
!
this
.
isOverviewStageSelected
?
{
sort
:
this
.
pagination
?.
sort
||
null
,
...
...
@@ -99,9 +98,9 @@ export default {
return
{
value_stream_id
:
this
.
selectedValueStream
?.
id
||
null
,
project_ids
:
selectedProjectIds
,
created_after
:
toYmd
(
this
.
createdAfter
)
,
created_before
:
toYmd
(
this
.
createdBefore
)
,
project_ids
,
created_after
,
created_before
,
stage_id
:
(
!
this
.
isOverviewStageSelected
&&
this
.
selectedStage
?.
id
)
||
null
,
// the `overview` stage is always the default, so dont persist the id if its selected
...
paginationUrlParams
,
};
...
...
ee/app/assets/javascripts/analytics/cycle_analytics/store/getters.js
View file @
67abfa8a
...
...
@@ -42,7 +42,7 @@ export const cycleAnalyticsRequestParams = (state, getters) => {
});
return
{
project_ids
:
getters
.
selectedProjectIds
,
project_ids
:
getters
.
selectedProjectIds
?.
length
?
getters
.
selectedProjectIds
:
null
,
created_after
:
createdAfter
?
dateFormat
(
createdAfter
,
dateFormats
.
isoDate
)
:
null
,
created_before
:
createdBefore
?
dateFormat
(
createdBefore
,
dateFormats
.
isoDate
)
:
null
,
...
filterBarQuery
,
...
...
ee/app/assets/javascripts/analytics/shared/utils.js
View file @
67abfa8a
...
...
@@ -118,7 +118,7 @@ export const buildCycleAnalyticsInitialData = ({
createdAfter
:
createdAfter
?
new
Date
(
createdAfter
)
:
null
,
selectedProjects
:
projects
?
buildProjectsFromJSON
(
projects
).
map
(
convertObjectPropsToCamelCase
)
:
[]
,
:
null
,
labelsPath
,
milestonesPath
,
defaultStageConfig
:
defaultStages
...
...
ee/spec/frontend/analytics/cycle_analytics/components/base_spec.js
View file @
67abfa8a
...
...
@@ -484,7 +484,7 @@ describe('EE Value Stream Analytics component', () => {
wrapper
=
null
;
});
describe
(
'
with minimal parameters set
set
'
,
()
=>
{
describe
(
'
with minimal parameters set
'
,
()
=>
{
beforeEach
(
async
()
=>
{
wrapper
=
await
createComponent
();
...
...
ee/spec/frontend/analytics/shared/utils_spec.js
View file @
67abfa8a
...
...
@@ -86,7 +86,7 @@ describe('buildCycleAnalyticsInitialData', () => {
${
'
group
'
}
|
${
null
}
${
'
createdBefore
'
}
|
${
null
}
${
'
createdAfter
'
}
|
${
null
}
${
'
selectedProjects
'
}
|
${
[]
}
${
'
selectedProjects
'
}
|
${
null
}
${
'
labelsPath
'
}
|
${
''
}
${
'
milestonesPath
'
}
|
${
''
}
${
'
stage
'
}
|
${
null
}
...
...
@@ -152,13 +152,13 @@ describe('buildCycleAnalyticsInitialData', () => {
});
it
.
each
`
field | value
${
'
selectedProjects
'
}
|
${
null
}
${
'
selectedProjects
'
}
|
${[]}
${
'
selectedProjects
'
}
|
${
''
}
`
(
'
will be an empty array if given a value of `$value`
'
,
({
value
,
field
})
=>
{
field | value
| result
${
'
selectedProjects
'
}
|
${
null
}
|
${
null
}
${
'
selectedProjects
'
}
|
${[]}
|
${[]}
${
'
selectedProjects
'
}
|
${
''
}
|
${
null
}
`
(
'
will be an empty array if given a value of `$value`
'
,
({
value
,
field
,
result
})
=>
{
expect
(
buildCycleAnalyticsInitialData
({
projects
:
value
})).
toMatchObject
({
[
field
]:
[]
,
[
field
]:
result
,
});
});
});
...
...
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