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
048b0453
Commit
048b0453
authored
Oct 08, 2019
by
Ezekiel Kigbo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added mutations and actions for tasks_by_type
parent
5bf5e35a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
0 deletions
+26
-0
ee/app/assets/javascripts/analytics/cycle_analytics/store/actions.js
...ts/javascripts/analytics/cycle_analytics/store/actions.js
+19
-0
ee/app/assets/javascripts/analytics/cycle_analytics/store/mutation_types.js
...scripts/analytics/cycle_analytics/store/mutation_types.js
+4
-0
ee/app/assets/javascripts/analytics/cycle_analytics/store/mutations.js
.../javascripts/analytics/cycle_analytics/store/mutations.js
+3
-0
No files found.
ee/app/assets/javascripts/analytics/cycle_analytics/store/actions.js
View file @
048b0453
...
...
@@ -192,3 +192,22 @@ export const createCustomStage = ({ dispatch, state }, data) => {
.
then
(
response
=>
dispatch
(
'
receiveCreateCustomStageSuccess
'
,
response
))
.
catch
(
error
=>
dispatch
(
'
receiveCreateCustomStageError
'
,
{
error
,
data
}));
};
export
const
receiveTasksByTypeSuccess
=
({
commit
},
data
)
=>
commit
(
types
.
RECEIVE_TASKS_BY_TYPE_SUCCESS
,
data
);
export
const
receiveTasksByTypeError
=
({
commit
},
error
)
=>
{
commit
(
types
.
RECEIVE_TASKS_BY_TYPE_ERROR
,
error
);
createFlash
(
__
(
'
There was an error fetching data for the form
'
));
};
export
const
requestTasksByType
=
({
commit
})
=>
commit
(
types
.
REQUEST_TASKS_BY_TYPE
);
export
const
fetchTasksByType
=
({
dispatch
},
{
groupPath
,
labelIds
})
=>
{
const
endpoint
=
'
/~/analytics/tasks_by_type
'
;
const
params
=
{
group_id
:
groupPath
,
label_ids
:
labelIds
};
dispatch
(
'
requestTasksByTypeData
'
);
return
axios
.
get
(
endpoint
,
params
)
.
then
(
data
=>
dispatch
(
'
receiveTasksByTypeSuccess
'
,
data
))
.
catch
(
error
=>
dispatch
(
'
receiveTasksByTypeError
'
,
error
));
};
ee/app/assets/javascripts/analytics/cycle_analytics/store/mutation_types.js
View file @
048b0453
...
...
@@ -32,3 +32,7 @@ export const RECEIVE_GROUP_STAGES_AND_EVENTS_ERROR = 'RECEIVE_GROUP_STAGES_AND_E
export
const
REQUEST_CREATE_CUSTOM_STAGE
=
'
REQUEST_CREATE_CUSTOM_STAGE
'
;
export
const
RECEIVE_CREATE_CUSTOM_STAGE_RESPONSE
=
'
RECEIVE_CREATE_CUSTOM_STAGE_RESPONSE
'
;
export
const
REQUEST_TASKS_BY_TYPE_DATA
=
'
REQUEST_TASKS_BY_TYPE_DATA
'
;
export
const
RECEIVE_TASKS_BY_TYPE_DATA_SUCCESS
=
'
RECEIVE_TASKS_BY_TYPE_DATA_SUCCESS
'
;
export
const
RECEIVE_TASKS_BY_TYPE_DATA_ERROR
=
'
RECEIVE_TASKS_BY_TYPE_DATA_ERROR
'
;
ee/app/assets/javascripts/analytics/cycle_analytics/store/mutations.js
View file @
048b0453
...
...
@@ -126,4 +126,7 @@ export default {
[
types
.
RECEIVE_CREATE_CUSTOM_STAGE_RESPONSE
](
state
)
{
state
.
isSavingCustomStage
=
false
;
},
[
types
.
REQUEST_TASKS_BY_TYPE_DATA
](
state
)
{},
[
types
.
REQUEST_TASKS_BY_TYPE_DATA_ERROR
](
state
)
{},
[
types
.
REQUEST_TASKS_BY_TYPE_DATA_SUCCESS
](
state
)
{},
};
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