summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/assets/javascripts/dispatcher.js18
-rw-r--r--app/assets/javascripts/pages/projects/clusters/index/index.js3
-rw-r--r--app/assets/javascripts/pages/projects/clusters/show/index.js3
3 files changed, 12 insertions, 12 deletions
diff --git a/app/assets/javascripts/dispatcher.js b/app/assets/javascripts/dispatcher.js
index ad9e1aec06f..7a80f3c90ad 100644
--- a/app/assets/javascripts/dispatcher.js
+++ b/app/assets/javascripts/dispatcher.js
@@ -556,20 +556,14 @@ import Activities from './activities';
.catch(fail);
break;
case 'projects:clusters:show':
- import(/* webpackChunkName: "clusters" */ './clusters/clusters_bundle')
- .then(cluster => new cluster.default()) // eslint-disable-line new-cap
- .catch((err) => {
- Flash(s__('ClusterIntegration|Problem setting up the cluster'));
- throw err;
- });
+ import('./pages/projects/clusters/show')
+ .then(callDefault)
+ .catch(fail);
break;
case 'projects:clusters:index':
- import(/* webpackChunkName: "clusters_index" */ './clusters/clusters_index')
- .then(clusterIndex => clusterIndex.default())
- .catch((err) => {
- Flash(s__('ClusterIntegration|Problem setting up the clusters list'));
- throw err;
- });
+ import('./pages/projects/clusters/index')
+ .then(callDefault)
+ .catch(fail);
break;
}
switch (path[0]) {
diff --git a/app/assets/javascripts/pages/projects/clusters/index/index.js b/app/assets/javascripts/pages/projects/clusters/index/index.js
new file mode 100644
index 00000000000..66c3111f2b8
--- /dev/null
+++ b/app/assets/javascripts/pages/projects/clusters/index/index.js
@@ -0,0 +1,3 @@
+import ClustersIndex from '~/clusters/clusters_index';
+
+export default ClustersIndex;
diff --git a/app/assets/javascripts/pages/projects/clusters/show/index.js b/app/assets/javascripts/pages/projects/clusters/show/index.js
new file mode 100644
index 00000000000..f87471ee610
--- /dev/null
+++ b/app/assets/javascripts/pages/projects/clusters/show/index.js
@@ -0,0 +1,3 @@
+import ClustersBundle from '~/clusters/clusters_bundle';
+
+export default ClustersBundle;