index.js.es6 662 Bytes
Newer Older
1
/* eslint-disable no-param-reassign */
2
/* global Vue, VueResource, gl */
3 4
window.Vue = require('vue');
window.Vue.use(require('vue-resource'));
5
require('../lib/utils/common_utils');
6
require('../vue_shared/vue_resource_interceptor');
7
require('./pipelines');
8

9 10
$(() => new Vue({
  el: document.querySelector('.vue-pipelines-index'),
11

12 13
  data() {
    const project = document.querySelector('.pipelines');
14

15 16 17 18 19 20 21 22 23 24
    return {
      scope: project.dataset.url,
      store: new gl.PipelineStore(),
    };
  },
  components: {
    'vue-pipelines': gl.VuePipelines,
  },
  template: `
    <vue-pipelines
Filipa Lacerda's avatar
Filipa Lacerda committed
25 26
      :scope="scope"
      :store="store">
27 28 29
    </vue-pipelines>
  `,
}));