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
429fae4b
Commit
429fae4b
authored
Sep 25, 2020
by
Florie Guibert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reload when Switching from Swimlanes to Board
parent
cec8e8a7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
4 deletions
+14
-4
app/assets/javascripts/boards/index.js
app/assets/javascripts/boards/index.js
+9
-4
ee/app/assets/javascripts/boards/stores/actions.js
ee/app/assets/javascripts/boards/stores/actions.js
+4
-0
ee/spec/frontend/boards/stores/actions_spec.js
ee/spec/frontend/boards/stores/actions_spec.js
+1
-0
No files found.
app/assets/javascripts/boards/index.js
View file @
429fae4b
...
@@ -132,6 +132,7 @@ export default () => {
...
@@ -132,6 +132,7 @@ export default () => {
eventHub
.
$on
(
'
clearDetailIssue
'
,
this
.
clearDetailIssue
);
eventHub
.
$on
(
'
clearDetailIssue
'
,
this
.
clearDetailIssue
);
sidebarEventHub
.
$on
(
'
toggleSubscription
'
,
this
.
toggleSubscription
);
sidebarEventHub
.
$on
(
'
toggleSubscription
'
,
this
.
toggleSubscription
);
eventHub
.
$on
(
'
performSearch
'
,
this
.
performSearch
);
eventHub
.
$on
(
'
performSearch
'
,
this
.
performSearch
);
eventHub
.
$on
(
'
initialBoardLoad
'
,
this
.
initialBoardLoad
);
},
},
beforeDestroy
()
{
beforeDestroy
()
{
eventHub
.
$off
(
'
updateTokens
'
,
this
.
updateTokens
);
eventHub
.
$off
(
'
updateTokens
'
,
this
.
updateTokens
);
...
@@ -139,6 +140,7 @@ export default () => {
...
@@ -139,6 +140,7 @@ export default () => {
eventHub
.
$off
(
'
clearDetailIssue
'
,
this
.
clearDetailIssue
);
eventHub
.
$off
(
'
clearDetailIssue
'
,
this
.
clearDetailIssue
);
sidebarEventHub
.
$off
(
'
toggleSubscription
'
,
this
.
toggleSubscription
);
sidebarEventHub
.
$off
(
'
toggleSubscription
'
,
this
.
toggleSubscription
);
eventHub
.
$off
(
'
performSearch
'
,
this
.
performSearch
);
eventHub
.
$off
(
'
performSearch
'
,
this
.
performSearch
);
eventHub
.
$off
(
'
initialBoardLoad
'
,
this
.
initialBoardLoad
);
},
},
mounted
()
{
mounted
()
{
this
.
filterManager
=
new
FilteredSearchBoards
(
boardsStore
.
filter
,
true
,
boardsStore
.
cantEdit
);
this
.
filterManager
=
new
FilteredSearchBoards
(
boardsStore
.
filter
,
true
,
boardsStore
.
cantEdit
);
...
@@ -149,6 +151,12 @@ export default () => {
...
@@ -149,6 +151,12 @@ export default () => {
boardsStore
.
disabled
=
this
.
disabled
;
boardsStore
.
disabled
=
this
.
disabled
;
if
(
!
gon
.
features
.
graphqlBoardLists
)
{
if
(
!
gon
.
features
.
graphqlBoardLists
)
{
this
.
initialBoardLoad
();
}
},
methods
:
{
...
mapActions
([
'
setInitialBoardData
'
,
'
setFilters
'
,
'
fetchEpicsSwimlanes
'
,
'
resetIssues
'
]),
initialBoardLoad
()
{
boardsStore
boardsStore
.
all
()
.
all
()
.
then
(
res
=>
res
.
data
)
.
then
(
res
=>
res
.
data
)
...
@@ -161,10 +169,7 @@ export default () => {
...
@@ -161,10 +169,7 @@ export default () => {
.
catch
(()
=>
{
.
catch
(()
=>
{
Flash
(
__
(
'
An error occurred while fetching the board lists. Please try again.
'
));
Flash
(
__
(
'
An error occurred while fetching the board lists. Please try again.
'
));
});
});
}
},
},
methods
:
{
...
mapActions
([
'
setInitialBoardData
'
,
'
setFilters
'
,
'
fetchEpicsSwimlanes
'
,
'
resetIssues
'
]),
updateTokens
()
{
updateTokens
()
{
this
.
filterManager
.
updateTokens
();
this
.
filterManager
.
updateTokens
();
},
},
...
...
ee/app/assets/javascripts/boards/stores/actions.js
View file @
429fae4b
...
@@ -11,6 +11,7 @@ import boardsStoreEE from './boards_store_ee';
...
@@ -11,6 +11,7 @@ import boardsStoreEE from './boards_store_ee';
import
*
as
types
from
'
./mutation_types
'
;
import
*
as
types
from
'
./mutation_types
'
;
import
{
fullEpicId
}
from
'
../boards_util
'
;
import
{
fullEpicId
}
from
'
../boards_util
'
;
import
{
formatListIssues
,
fullBoardId
}
from
'
~/boards/boards_util
'
;
import
{
formatListIssues
,
fullBoardId
}
from
'
~/boards/boards_util
'
;
import
eventHub
from
'
~/boards/eventhub
'
;
import
createDefaultClient
from
'
~/lib/graphql
'
;
import
createDefaultClient
from
'
~/lib/graphql
'
;
import
epicsSwimlanesQuery
from
'
../queries/epics_swimlanes.query.graphql
'
;
import
epicsSwimlanesQuery
from
'
../queries/epics_swimlanes.query.graphql
'
;
...
@@ -220,6 +221,9 @@ export default {
...
@@ -220,6 +221,9 @@ export default {
}
}
})
})
.
catch
(()
=>
commit
(
types
.
RECEIVE_SWIMLANES_FAILURE
));
.
catch
(()
=>
commit
(
types
.
RECEIVE_SWIMLANES_FAILURE
));
}
else
if
(
!
gon
.
features
.
graphqlBoardLists
)
{
boardsStore
.
create
();
eventHub
.
$emit
(
'
initialBoardLoad
'
);
}
}
},
},
};
};
ee/spec/frontend/boards/stores/actions_spec.js
View file @
429fae4b
...
@@ -18,6 +18,7 @@ let mock;
...
@@ -18,6 +18,7 @@ let mock;
beforeEach
(()
=>
{
beforeEach
(()
=>
{
mock
=
new
MockAdapter
(
axios
);
mock
=
new
MockAdapter
(
axios
);
window
.
gon
=
{
features
:
{}
};
});
});
afterEach
(()
=>
{
afterEach
(()
=>
{
...
...
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