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 {
|
2021-04-17 20:07:23 +05:30
|
|
|
// provide/inject
|
|
|
|
projectRefsEndpoint,
|
|
|
|
|
|
|
|
// props
|
2020-10-24 23:57:45 +05:30
|
|
|
projectId,
|
|
|
|
pipelinesPath,
|
2021-01-03 14:25:43 +05:30
|
|
|
configVariablesPath,
|
2021-02-22 17:27:13 +05:30
|
|
|
defaultBranch,
|
2020-10-24 23:57:45 +05:30
|
|
|
refParam,
|
|
|
|
varParam,
|
|
|
|
fileParam,
|
|
|
|
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);
|
|
|
|
|
|
|
|
return new Vue({
|
|
|
|
el,
|
2021-04-17 20:07:23 +05:30
|
|
|
provide: {
|
|
|
|
projectRefsEndpoint,
|
|
|
|
},
|
2020-10-24 23:57:45 +05:30
|
|
|
render(createElement) {
|
|
|
|
return createElement(PipelineNewForm, {
|
|
|
|
props: {
|
|
|
|
projectId,
|
|
|
|
pipelinesPath,
|
2021-01-03 14:25:43 +05:30
|
|
|
configVariablesPath,
|
2021-02-22 17:27:13 +05:30
|
|
|
defaultBranch,
|
2020-10-24 23:57:45 +05:30
|
|
|
refParam,
|
|
|
|
variableParams,
|
|
|
|
fileParams,
|
|
|
|
settingsLink,
|
2020-11-24 15:15:51 +05:30
|
|
|
maxWarnings: Number(maxWarnings),
|
2020-10-24 23:57:45 +05:30
|
|
|
},
|
|
|
|
});
|
|
|
|
},
|
|
|
|
});
|
|
|
|
};
|