debian-mirror-gitlab/app/assets/javascripts/analytics/usage_trends/index.js

25 lines
523 B
JavaScript
Raw Normal View History

2021-01-03 14:25:43 +05:30
import Vue from 'vue';
import VueApollo from 'vue-apollo';
import createDefaultClient from '~/lib/graphql';
2021-04-17 20:07:23 +05:30
import UsageTrendsApp from './components/app.vue';
2021-01-03 14:25:43 +05:30
Vue.use(VueApollo);
const apolloProvider = new VueApollo({
2021-11-11 11:23:49 +05:30
defaultClient: createDefaultClient({}, { assumeImmutableResults: true }),
2021-01-03 14:25:43 +05:30
});
export default () => {
2021-04-17 20:07:23 +05:30
const el = document.getElementById('js-usage-trends-app');
2021-01-03 14:25:43 +05:30
if (!el) return false;
return new Vue({
el,
apolloProvider,
render(h) {
2021-04-17 20:07:23 +05:30
return h(UsageTrendsApp);
2021-01-03 14:25:43 +05:30
},
});
};