Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/cycle_analytics/index.js')
-rw-r--r--app/assets/javascripts/cycle_analytics/index.js32
1 files changed, 32 insertions, 0 deletions
diff --git a/app/assets/javascripts/cycle_analytics/index.js b/app/assets/javascripts/cycle_analytics/index.js
new file mode 100644
index 00000000000..42d6700fae1
--- /dev/null
+++ b/app/assets/javascripts/cycle_analytics/index.js
@@ -0,0 +1,32 @@
+import Vue from 'vue';
+import Translate from '../vue_shared/translate';
+import CycleAnalytics from './components/base.vue';
+import CycleAnalyticsService from './cycle_analytics_service';
+import CycleAnalyticsStore from './cycle_analytics_store';
+
+Vue.use(Translate);
+
+const createCycleAnalyticsService = (requestPath) =>
+ new CycleAnalyticsService({
+ requestPath,
+ });
+
+export default () => {
+ const el = document.querySelector('#js-cycle-analytics');
+ const { noAccessSvgPath, noDataSvgPath } = el.dataset;
+
+ // eslint-disable-next-line no-new
+ new Vue({
+ el,
+ name: 'CycleAnalytics',
+ render: (createElement) =>
+ createElement(CycleAnalytics, {
+ props: {
+ noDataSvgPath,
+ noAccessSvgPath,
+ store: CycleAnalyticsStore,
+ service: createCycleAnalyticsService(el.dataset.requestPath),
+ },
+ }),
+ });
+};