blob: 71db9400909531afa50db7ca49ef04190ad91285 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
import { GlToast } from '@gitlab/ui';
import Vue from 'vue';
import VueApollo from 'vue-apollo';
import createDefaultClient from '~/lib/graphql';
import PipelineSchedules from './components/pipeline_schedules.vue';
Vue.use(VueApollo);
Vue.use(GlToast);
const apolloProvider = new VueApollo({
defaultClient: createDefaultClient(),
});
export default () => {
const containerEl = document.querySelector('#pipeline-schedules-app');
if (!containerEl) {
return false;
}
const { fullPath, pipelinesPath, newSchedulePath, schedulesPath } = containerEl.dataset;
return new Vue({
el: containerEl,
name: 'PipelineSchedulesRoot',
apolloProvider,
provide: {
fullPath,
pipelinesPath,
newSchedulePath,
schedulesPath,
},
render(createElement) {
return createElement(PipelineSchedules);
},
});
};
|