diff options
Diffstat (limited to 'app/assets/javascripts/cycle_analytics/store/actions.js')
-rw-r--r-- | app/assets/javascripts/cycle_analytics/store/actions.js | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/app/assets/javascripts/cycle_analytics/store/actions.js b/app/assets/javascripts/cycle_analytics/store/actions.js index a7a2c8ea9d3..e39cd224199 100644 --- a/app/assets/javascripts/cycle_analytics/store/actions.js +++ b/app/assets/javascripts/cycle_analytics/store/actions.js @@ -163,6 +163,7 @@ const refetchStageData = (dispatch) => { dispatch('fetchCycleAnalyticsData'), dispatch('fetchStageData'), dispatch('fetchStageMedians'), + dispatch('fetchStageCountValues'), ]), ) .finally(() => dispatch('setLoading', false)); @@ -170,14 +171,24 @@ const refetchStageData = (dispatch) => { export const setFilters = ({ dispatch }) => refetchStageData(dispatch); -export const setDateRange = ({ dispatch, commit }, daysInPast) => { - commit(types.SET_DATE_RANGE, daysInPast); +export const setDateRange = ({ dispatch, commit }, { createdAfter, createdBefore }) => { + commit(types.SET_DATE_RANGE, { createdAfter, createdBefore }); return refetchStageData(dispatch); }; export const initializeVsa = ({ commit, dispatch }, initialData = {}) => { commit(types.INITIALIZE_VSA, initialData); + const { + endpoints: { fullPath, groupPath, milestonesPath = '', labelsPath = '' }, + } = initialData; + dispatch('filters/setEndpoints', { + labelsEndpoint: labelsPath, + milestonesEndpoint: milestonesPath, + groupEndpoint: groupPath, + projectEndpoint: fullPath, + }); + return dispatch('setLoading', true) .then(() => dispatch('fetchValueStreams')) .finally(() => dispatch('setLoading', false)); |