debian-mirror-gitlab/app/assets/javascripts/pipeline_new/index.js

39 lines
808 B
JavaScript
Raw Normal View History

2020-10-24 23:57:45 +05:30
import Vue from 'vue';
import PipelineNewForm from './components/pipeline_new_form.vue';
export default () => {
const el = document.getElementById('js-new-pipeline');
const {
projectId,
pipelinesPath,
refParam,
varParam,
fileParam,
refNames,
settingsLink,
2020-11-24 15:15:51 +05:30
maxWarnings,
2020-10-24 23:57:45 +05:30
} = el?.dataset;
const variableParams = JSON.parse(varParam);
const fileParams = JSON.parse(fileParam);
const refs = JSON.parse(refNames);
return new Vue({
el,
render(createElement) {
return createElement(PipelineNewForm, {
props: {
projectId,
pipelinesPath,
refParam,
variableParams,
fileParams,
refs,
settingsLink,
2020-11-24 15:15:51 +05:30
maxWarnings: Number(maxWarnings),
2020-10-24 23:57:45 +05:30
},
});
},
});
};