diff options
author | Jacob Schatz <jschatz@gitlab.com> | 2018-01-23 16:26:13 +0000 |
---|---|---|
committer | Jacob Schatz <jschatz@gitlab.com> | 2018-01-23 16:26:13 +0000 |
commit | f74e431b44031f0be13acbe2d2748b7e03390379 (patch) | |
tree | c8fe7235a98263421d623711a4a9232095a4cfc4 | |
parent | f34f4ba51ea9c73b6bb89dca9903d22318585ebc (diff) | |
parent | 57749eca898ca12546313068f2492ab4d2d0afe2 (diff) | |
download | gitlab-ce-f74e431b44031f0be13acbe2d2748b7e03390379.tar.gz |
Merge branch 'dispatcher-milestones-show-path' into 'master'
Refactor dispatcher milestones show path
See merge request gitlab-org/gitlab-ce!16633
4 files changed, 22 insertions, 4 deletions
diff --git a/app/assets/javascripts/dispatcher.js b/app/assets/javascripts/dispatcher.js index 895251cec3c..d5659be28a4 100644 --- a/app/assets/javascripts/dispatcher.js +++ b/app/assets/javascripts/dispatcher.js @@ -1,9 +1,7 @@ /* eslint-disable func-names, space-before-function-paren, no-var, prefer-arrow-callback, wrap-iife, no-shadow, consistent-return, one-var, one-var-declaration-per-line, camelcase, default-case, no-new, quotes, no-duplicate-case, no-case-declarations, no-fallthrough, max-len */ -import Milestone from './milestone'; import notificationsDropdown from './notifications_dropdown'; import LineHighlighter from './line_highlighter'; import MergeRequest from './merge_request'; -import Sidebar from './right_sidebar'; import Flash from './flash'; import BlobViewer from './blob/viewer/index'; import GfmAutoComplete from './gfm_auto_complete'; @@ -97,9 +95,14 @@ import SearchAutocomplete from './search_autocomplete'; .catch(fail); break; case 'projects:milestones:show': + import('./pages/projects/milestones/show') + .then(callDefault) + .catch(fail); + break; case 'groups:milestones:show': - new Milestone(); - new Sidebar(); + import('./pages/groups/milestones/show') + .then(callDefault) + .catch(fail); break; case 'dashboard:milestones:show': import('./pages/dashboard/milestones/show') diff --git a/app/assets/javascripts/pages/groups/milestones/show/index.js b/app/assets/javascripts/pages/groups/milestones/show/index.js new file mode 100644 index 00000000000..0c3ce848e3d --- /dev/null +++ b/app/assets/javascripts/pages/groups/milestones/show/index.js @@ -0,0 +1,3 @@ +import initMilestonesShow from '~/pages/init_milestones_show'; + +export default initMilestonesShow; diff --git a/app/assets/javascripts/pages/init_milestones_show.js b/app/assets/javascripts/pages/init_milestones_show.js new file mode 100644 index 00000000000..7aa5be0d5b9 --- /dev/null +++ b/app/assets/javascripts/pages/init_milestones_show.js @@ -0,0 +1,9 @@ +/* eslint-disable no-new */ + +import Milestone from '~/milestone'; +import Sidebar from '~/right_sidebar'; + +export default () => { + new Milestone(); + new Sidebar(); +}; diff --git a/app/assets/javascripts/pages/projects/milestones/show/index.js b/app/assets/javascripts/pages/projects/milestones/show/index.js new file mode 100644 index 00000000000..0c3ce848e3d --- /dev/null +++ b/app/assets/javascripts/pages/projects/milestones/show/index.js @@ -0,0 +1,3 @@ +import initMilestonesShow from '~/pages/init_milestones_show'; + +export default initMilestonesShow; |