summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClement Ho <ClemMakesApps@gmail.com>2018-01-10 11:10:58 -0600
committerClement Ho <ClemMakesApps@gmail.com>2018-01-10 11:10:58 -0600
commit0d1af3d2049320c1472faf7beba773958070ea0c (patch)
treeb81c3e5860d2829996416d3a2292f1366774fd6a
parent82007530cb08ccd8aff68aafdc506595f62a40a6 (diff)
downloadgitlab-ce-0d1af3d2049320c1472faf7beba773958070ea0c.tar.gz
Refactor dispatcher dashboard mr path
-rw-r--r--app/assets/javascripts/dispatcher.js5
-rw-r--r--app/assets/javascripts/pages/dashboard/merge_requests/index.js7
2 files changed, 10 insertions, 2 deletions
diff --git a/app/assets/javascripts/dispatcher.js b/app/assets/javascripts/dispatcher.js
index a282b67b0fc..0a8bf69a022 100644
--- a/app/assets/javascripts/dispatcher.js
+++ b/app/assets/javascripts/dispatcher.js
@@ -209,8 +209,9 @@ import Activities from './activities';
.catch(fail);
break;
case 'dashboard:merge_requests':
- projectSelect();
- initLegacyFilters();
+ import('./pages/dashboard/merge_requests')
+ .then(callDefault)
+ .catch(fail);
break;
case 'groups:issues':
case 'groups:merge_requests':
diff --git a/app/assets/javascripts/pages/dashboard/merge_requests/index.js b/app/assets/javascripts/pages/dashboard/merge_requests/index.js
new file mode 100644
index 00000000000..b7353669e65
--- /dev/null
+++ b/app/assets/javascripts/pages/dashboard/merge_requests/index.js
@@ -0,0 +1,7 @@
+import projectSelect from '~/project_select';
+import initLegacyFilters from '~/init_legacy_filters';
+
+export default () => {
+ projectSelect();
+ initLegacyFilters();
+};