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
c23d5cd4
Commit
c23d5cd4
authored
Nov 08, 2021
by
Scott Stern
Committed by
Illya Klymov
Nov 08, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move fetchiterations to ee
parent
081f573c
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
66 additions
and
66 deletions
+66
-66
app/assets/javascripts/boards/stores/actions.js
app/assets/javascripts/boards/stores/actions.js
+0
-48
app/assets/javascripts/boards/stores/mutation_types.js
app/assets/javascripts/boards/stores/mutation_types.js
+0
-4
app/assets/javascripts/boards/stores/mutations.js
app/assets/javascripts/boards/stores/mutations.js
+0
-14
ee/app/assets/javascripts/boards/graphql/group_board_iterations.query.graphql
...ripts/boards/graphql/group_board_iterations.query.graphql
+0
-0
ee/app/assets/javascripts/boards/graphql/project_board_iterations.query.graphql
...pts/boards/graphql/project_board_iterations.query.graphql
+0
-0
ee/app/assets/javascripts/boards/stores/actions.js
ee/app/assets/javascripts/boards/stores/actions.js
+48
-0
ee/app/assets/javascripts/boards/stores/mutation_types.js
ee/app/assets/javascripts/boards/stores/mutation_types.js
+4
-0
ee/app/assets/javascripts/boards/stores/mutations.js
ee/app/assets/javascripts/boards/stores/mutations.js
+14
-0
No files found.
app/assets/javascripts/boards/stores/actions.js
View file @
c23d5cd4
...
...
@@ -36,13 +36,11 @@ import {
}
from
'
../boards_util
'
;
import
{
gqlClient
}
from
'
../graphql
'
;
import
boardLabelsQuery
from
'
../graphql/board_labels.query.graphql
'
;
import
groupBoardIterationsQuery
from
'
../graphql/group_board_iterations.query.graphql
'
;
import
groupBoardMilestonesQuery
from
'
../graphql/group_board_milestones.query.graphql
'
;
import
groupProjectsQuery
from
'
../graphql/group_projects.query.graphql
'
;
import
issueCreateMutation
from
'
../graphql/issue_create.mutation.graphql
'
;
import
issueSetLabelsMutation
from
'
../graphql/issue_set_labels.mutation.graphql
'
;
import
listsIssuesQuery
from
'
../graphql/lists_issues.query.graphql
'
;
import
projectBoardIterationsQuery
from
'
../graphql/project_board_iterations.query.graphql
'
;
import
projectBoardMilestonesQuery
from
'
../graphql/project_board_milestones.query.graphql
'
;
import
*
as
types
from
'
./mutation_types
'
;
...
...
@@ -203,52 +201,6 @@ export default {
});
},
fetchIterations
({
state
,
commit
},
title
)
{
commit
(
types
.
RECEIVE_ITERATIONS_REQUEST
);
const
{
fullPath
,
boardType
}
=
state
;
const
variables
=
{
fullPath
,
title
,
};
let
query
;
if
(
boardType
===
BoardType
.
project
)
{
query
=
projectBoardIterationsQuery
;
}
if
(
boardType
===
BoardType
.
group
)
{
query
=
groupBoardIterationsQuery
;
}
if
(
!
query
)
{
// eslint-disable-next-line @gitlab/require-i18n-strings
throw
new
Error
(
'
Unknown board type
'
);
}
return
gqlClient
.
query
({
query
,
variables
,
})
.
then
(({
data
})
=>
{
const
errors
=
data
[
boardType
]?.
errors
;
const
iterations
=
data
[
boardType
]?.
iterations
.
nodes
;
if
(
errors
?.[
0
])
{
throw
new
Error
(
errors
[
0
]);
}
commit
(
types
.
RECEIVE_ITERATIONS_SUCCESS
,
iterations
);
return
iterations
;
})
.
catch
((
e
)
=>
{
commit
(
types
.
RECEIVE_ITERATIONS_FAILURE
);
throw
e
;
});
},
fetchMilestones
({
state
,
commit
},
searchTerm
)
{
commit
(
types
.
RECEIVE_MILESTONES_REQUEST
);
...
...
app/assets/javascripts/boards/stores/mutation_types.js
View file @
c23d5cd4
...
...
@@ -41,7 +41,3 @@ export const ADD_LIST_TO_HIGHLIGHTED_LISTS = 'ADD_LIST_TO_HIGHLIGHTED_LISTS';
export
const
REMOVE_LIST_FROM_HIGHLIGHTED_LISTS
=
'
REMOVE_LIST_FROM_HIGHLIGHTED_LISTS
'
;
export
const
RESET_BOARD_ITEM_SELECTION
=
'
RESET_BOARD_ITEM_SELECTION
'
;
export
const
SET_ERROR
=
'
SET_ERROR
'
;
export
const
RECEIVE_ITERATIONS_REQUEST
=
'
RECEIVE_ITERATIONS_REQUEST
'
;
export
const
RECEIVE_ITERATIONS_SUCCESS
=
'
RECEIVE_ITERATIONS_SUCCESS
'
;
export
const
RECEIVE_ITERATIONS_FAILURE
=
'
RECEIVE_ITERATIONS_FAILURE
'
;
app/assets/javascripts/boards/stores/mutations.js
View file @
c23d5cd4
...
...
@@ -64,20 +64,6 @@ export default {
);
},
[
mutationTypes
.
RECEIVE_ITERATIONS_REQUEST
](
state
)
{
state
.
iterationsLoading
=
true
;
},
[
mutationTypes
.
RECEIVE_ITERATIONS_SUCCESS
](
state
,
iterations
)
{
state
.
iterations
=
iterations
;
state
.
iterationsLoading
=
false
;
},
[
mutationTypes
.
RECEIVE_ITERATIONS_FAILURE
](
state
)
{
state
.
iterationsLoading
=
false
;
state
.
error
=
__
(
'
Failed to load iterations.
'
);
},
[
mutationTypes
.
SET_ACTIVE_ID
](
state
,
{
id
,
sidebarType
})
{
state
.
activeId
=
id
;
state
.
sidebarType
=
sidebarType
;
...
...
app/assets/javascripts/boards/graphql/group_board_iterations.query.graphql
→
ee/
app/assets/javascripts/boards/graphql/group_board_iterations.query.graphql
View file @
c23d5cd4
File moved
app/assets/javascripts/boards/graphql/project_board_iterations.query.graphql
→
ee/
app/assets/javascripts/boards/graphql/project_board_iterations.query.graphql
View file @
c23d5cd4
File moved
ee/app/assets/javascripts/boards/stores/actions.js
View file @
c23d5cd4
...
...
@@ -16,6 +16,8 @@ import { getIdFromGraphQLId } from '~/graphql_shared/utils';
import
{
historyPushState
,
convertObjectPropsToCamelCase
}
from
'
~/lib/utils/common_utils
'
;
import
{
mergeUrlParams
,
removeParams
,
queryToObject
}
from
'
~/lib/utils/url_utility
'
;
import
{
s__
}
from
'
~/locale
'
;
import
groupBoardIterationsQuery
from
'
ee/boards/graphql/group_board_iterations.query.graphql
'
;
import
projectBoardIterationsQuery
from
'
ee/boards/graphql/project_board_iterations.query.graphql
'
;
import
{
fullEpicBoardId
,
formatEpic
,
...
...
@@ -109,6 +111,52 @@ export default {
);
},
fetchIterations
({
state
,
commit
},
title
)
{
commit
(
types
.
RECEIVE_ITERATIONS_REQUEST
);
const
{
fullPath
,
boardType
}
=
state
;
const
variables
=
{
fullPath
,
title
,
};
let
query
;
if
(
boardType
===
BoardType
.
project
)
{
query
=
projectBoardIterationsQuery
;
}
if
(
boardType
===
BoardType
.
group
)
{
query
=
groupBoardIterationsQuery
;
}
if
(
!
query
)
{
// eslint-disable-next-line @gitlab/require-i18n-strings
throw
new
Error
(
'
Unknown board type
'
);
}
return
gqlClient
.
query
({
query
,
variables
,
})
.
then
(({
data
})
=>
{
const
errors
=
data
[
boardType
]?.
errors
;
const
iterations
=
data
[
boardType
]?.
iterations
.
nodes
;
if
(
errors
?.[
0
])
{
throw
new
Error
(
errors
[
0
]);
}
commit
(
types
.
RECEIVE_ITERATIONS_SUCCESS
,
iterations
);
return
iterations
;
})
.
catch
((
e
)
=>
{
commit
(
types
.
RECEIVE_ITERATIONS_FAILURE
);
throw
e
;
});
},
performSearch
({
dispatch
,
getters
})
{
dispatch
(
'
setFilters
'
,
...
...
ee/app/assets/javascripts/boards/stores/mutation_types.js
View file @
c23d5cd4
...
...
@@ -22,3 +22,7 @@ export const REQUEST_SUB_GROUPS = 'REQUEST_SUB_GROUPS';
export
const
RECEIVE_SUB_GROUPS_SUCCESS
=
'
RECEIVE_SUB_GROUPS_SUCCESS
'
;
export
const
RECEIVE_SUB_GROUPS_FAILURE
=
'
RECEIVE_SUB_GROUPS_FAILURE
'
;
export
const
SET_SELECTED_GROUP
=
'
SET_SELECTED_GROUP
'
;
export
const
RECEIVE_ITERATIONS_REQUEST
=
'
RECEIVE_ITERATIONS_REQUEST
'
;
export
const
RECEIVE_ITERATIONS_SUCCESS
=
'
RECEIVE_ITERATIONS_SUCCESS
'
;
export
const
RECEIVE_ITERATIONS_FAILURE
=
'
RECEIVE_ITERATIONS_FAILURE
'
;
ee/app/assets/javascripts/boards/stores/mutations.js
View file @
c23d5cd4
...
...
@@ -105,6 +105,20 @@ export default {
});
},
[
mutationTypes
.
RECEIVE_ITERATIONS_REQUEST
](
state
)
{
state
.
iterationsLoading
=
true
;
},
[
mutationTypes
.
RECEIVE_ITERATIONS_SUCCESS
](
state
,
iterations
)
{
state
.
iterations
=
iterations
;
state
.
iterationsLoading
=
false
;
},
[
mutationTypes
.
RECEIVE_ITERATIONS_FAILURE
](
state
)
{
state
.
iterationsLoading
=
false
;
state
.
error
=
__
(
'
Failed to load iterations.
'
);
},
[
mutationTypes
.
REQUEST_MORE_EPICS
]:
(
state
)
=>
{
Vue
.
set
(
state
,
'
epicsSwimlanesFetchInProgress
'
,
{
...
state
.
epicsSwimlanesFetchInProgress
,
...
...
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