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
9ee7ca27
Commit
9ee7ca27
authored
Jul 31, 2020
by
Ezekiel Kigbo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refetch chart data when select value stream
parent
4cf5d287
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
9 deletions
+12
-9
ee/app/assets/javascripts/analytics/cycle_analytics/components/duration_chart.vue
...s/analytics/cycle_analytics/components/duration_chart.vue
+1
-4
ee/app/assets/javascripts/analytics/cycle_analytics/store/actions.js
...ts/javascripts/analytics/cycle_analytics/store/actions.js
+4
-2
ee/spec/frontend/analytics/cycle_analytics/components/base_spec.js
...rontend/analytics/cycle_analytics/components/base_spec.js
+1
-0
ee/spec/frontend/analytics/cycle_analytics/store/actions_spec.js
.../frontend/analytics/cycle_analytics/store/actions_spec.js
+6
-3
No files found.
ee/app/assets/javascripts/analytics/cycle_analytics/components/duration_chart.vue
View file @
9ee7ca27
...
...
@@ -25,11 +25,8 @@ export default {
return
Boolean
(
this
.
durationChartPlottableData
.
length
);
},
},
mounted
()
{
this
.
fetchDurationData
();
},
methods
:
{
...
mapActions
(
'
durationChart
'
,
[
'
fetchDurationData
'
,
'
updateSelectedDurationChartStages
'
]),
...
mapActions
(
'
durationChart
'
,
[
'
updateSelectedDurationChartStages
'
]),
onDurationStageSelect
(
stages
)
{
this
.
updateSelectedDurationChartStages
(
stages
);
},
...
...
ee/app/assets/javascripts/analytics/cycle_analytics/store/actions.js
View file @
9ee7ca27
...
...
@@ -125,7 +125,6 @@ export const fetchCycleAnalyticsData = ({ dispatch }) => {
return
Promise
.
resolve
()
.
then
(()
=>
dispatch
(
'
fetchValueStreams
'
))
.
then
(()
=>
dispatch
(
'
fetchStageMedianValues
'
))
.
then
(()
=>
dispatch
(
'
receiveCycleAnalyticsDataSuccess
'
))
.
catch
(
error
=>
dispatch
(
'
receiveCycleAnalyticsDataError
'
,
error
));
};
...
...
@@ -314,7 +313,10 @@ export const createValueStream = ({ commit, dispatch, getters }, data) => {
export
const
setSelectedValueStream
=
({
commit
,
dispatch
},
streamId
)
=>
{
commit
(
types
.
SET_SELECTED_VALUE_STREAM
,
streamId
);
return
dispatch
(
'
fetchGroupStagesAndEvents
'
);
return
Promise
.
resolve
()
.
then
(()
=>
dispatch
(
'
fetchGroupStagesAndEvents
'
))
.
then
(()
=>
dispatch
(
'
fetchStageMedianValues
'
))
.
then
(()
=>
dispatch
(
'
durationChart/fetchDurationData
'
));
};
export
const
receiveValueStreamsSuccess
=
({
commit
,
dispatch
},
data
=
[])
=>
{
...
...
ee/spec/frontend/analytics/cycle_analytics/components/base_spec.js
View file @
9ee7ca27
...
...
@@ -453,6 +453,7 @@ describe('Cycle Analytics component', () => {
StageNavItem
,
},
},
withValueStreamSelected
:
false
,
withStageSelected
:
true
,
});
});
...
...
ee/spec/frontend/analytics/cycle_analytics/store/actions_spec.js
View file @
9ee7ca27
...
...
@@ -91,13 +91,17 @@ describe('Cycle analytics actions', () => {
describe
(
'
setSelectedValueStream
'
,
()
=>
{
const
vs
=
{
id
:
'
vs-1
'
,
name
:
'
Value stream 1
'
};
it
(
'
dispatches the fetchCycleAnalyticsData action
'
,
()
=>
{
it
(
'
refetches the cycle analytics data
'
,
()
=>
{
return
testAction
(
actions
.
setSelectedValueStream
,
vs
,
{
...
state
,
selectedValueStream
:
{}
},
[{
type
:
types
.
SET_SELECTED_VALUE_STREAM
,
payload
:
vs
}],
[{
type
:
'
fetchGroupStagesAndEvents
'
}],
[
{
type
:
'
fetchGroupStagesAndEvents
'
},
{
type
:
'
fetchStageMedianValues
'
},
{
type
:
'
durationChart/fetchDurationData
'
},
],
);
});
});
...
...
@@ -276,7 +280,6 @@ describe('Cycle analytics actions', () => {
[
{
type
:
'
requestCycleAnalyticsData
'
},
{
type
:
'
fetchValueStreams
'
},
{
type
:
'
fetchStageMedianValues
'
},
{
type
:
'
receiveCycleAnalyticsDataSuccess
'
},
],
);
...
...
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