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

41 lines
864 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,
2021-01-03 14:25:43 +05:30
configVariablesPath,
2020-10-24 23:57:45 +05:30
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,
2021-01-03 14:25:43 +05:30
configVariablesPath,
2020-10-24 23:57:45 +05:30
refParam,
variableParams,
fileParams,
refs,
settingsLink,
2020-11-24 15:15:51 +05:30
maxWarnings: Number(maxWarnings),
2020-10-24 23:57:45 +05:30
},
});
},
});
};