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

20 lines
512 B
JavaScript
Raw Normal View History

2018-03-27 19:54:05 +05:30
import Pipelines from '~/pipelines';
export default () => {
const { controllerAction } = document.querySelector('.js-pipeline-container').dataset;
2018-12-13 13:39:08 +05:30
const pipelineStatusUrl = `${document
.querySelector('.js-pipeline-tab-link a')
.getAttribute('href')}/status.json`;
2018-03-27 19:54:05 +05:30
2018-12-13 13:39:08 +05:30
// eslint-disable-next-line no-new
new Pipelines({
2018-03-27 19:54:05 +05:30
initTabs: true,
pipelineStatusUrl,
tabsOptions: {
action: controllerAction,
defaultAction: 'pipelines',
parentEl: '.pipelines-tabs',
},
});
};