debian-mirror-gitlab/app/assets/javascripts/pages/projects/pipelines/index/index.js

45 lines
1.5 KiB
JavaScript
Raw Normal View History

2018-03-27 19:54:05 +05:30
import Vue from 'vue';
import PipelinesStore from '../../../../pipelines/stores/pipelines_store';
import pipelinesComponent from '../../../../pipelines/components/pipelines.vue';
import Translate from '../../../../vue_shared/translate';
2019-02-15 15:39:39 +05:30
import { parseBoolean } from '../../../../lib/utils/common_utils';
2018-03-27 19:54:05 +05:30
Vue.use(Translate);
2018-12-13 13:39:08 +05:30
document.addEventListener(
'DOMContentLoaded',
() =>
new Vue({
el: '#pipelines-list-vue',
components: {
pipelinesComponent,
2018-03-27 19:54:05 +05:30
},
2018-12-13 13:39:08 +05:30
data() {
return {
store: new PipelinesStore(),
};
},
created() {
this.dataset = document.querySelector(this.$options.el).dataset;
},
render(createElement) {
return createElement('pipelines-component', {
props: {
store: this.store,
endpoint: this.dataset.endpoint,
helpPagePath: this.dataset.helpPagePath,
emptyStateSvgPath: this.dataset.emptyStateSvgPath,
errorStateSvgPath: this.dataset.errorStateSvgPath,
noPipelinesSvgPath: this.dataset.noPipelinesSvgPath,
autoDevopsPath: this.dataset.helpAutoDevopsPath,
newPipelinePath: this.dataset.newPipelinePath,
2019-02-15 15:39:39 +05:30
canCreatePipeline: parseBoolean(this.dataset.canCreatePipeline),
hasGitlabCi: parseBoolean(this.dataset.hasGitlabCi),
2018-12-13 13:39:08 +05:30
ciLintPath: this.dataset.ciLintPath,
resetCachePath: this.dataset.resetCachePath,
},
});
},
}),
);