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

20 lines
595 B
JavaScript
Raw Normal View History

2018-05-09 12:01:36 +05:30
import $ from 'jquery';
2018-03-27 19:54:05 +05:30
import NewBranchForm from '~/new_branch_form';
2018-10-15 14:42:47 +05:30
import setupNativeFormVariableList from '~/ci_variable_list/native_form_variable_list';
2020-10-24 23:57:45 +05:30
import initNewPipeline from '~/pipeline_new/index';
2018-03-17 18:26:18 +05:30
2018-03-27 19:54:05 +05:30
document.addEventListener('DOMContentLoaded', () => {
2020-10-24 23:57:45 +05:30
const el = document.getElementById('js-new-pipeline');
2018-10-15 14:42:47 +05:30
2020-10-24 23:57:45 +05:30
if (el) {
initNewPipeline();
} else {
new NewBranchForm($('.js-new-pipeline-form')); // eslint-disable-line no-new
setupNativeFormVariableList({
container: $('.js-ci-variable-list-section'),
formField: 'variables_attributes',
});
}
2018-03-27 19:54:05 +05:30
});