Commit 7b92ef29 authored by Jacob Schatz's avatar Jacob Schatz

Merge branch 'ee-pipelines_show_refactor' into 'master'

Refactor pipelines show for webpack bundle tag removal (EE)

See merge request gitlab-org/gitlab-ee!4755
parents 7a857375 52b2bb3d
import initPipelineDetails from '~/pipelines/pipeline_details_bundle';
import initPipelines from '../init_pipelines'; import initPipelines from '../init_pipelines';
document.addEventListener('DOMContentLoaded', initPipelines); document.addEventListener('DOMContentLoaded', () => {
initPipelines();
initPipelineDetails();
});
import initPipelineDetails from '~/pipelines/pipeline_details_bundle';
import initPipelines from '../init_pipelines'; import initPipelines from '../init_pipelines';
document.addEventListener('DOMContentLoaded', initPipelines); document.addEventListener('DOMContentLoaded', () => {
initPipelines();
initPipelineDetails();
});
...@@ -12,9 +12,7 @@ import SastSummaryWidget from 'ee/pipelines/components/security_reports/sast_rep ...@@ -12,9 +12,7 @@ import SastSummaryWidget from 'ee/pipelines/components/security_reports/sast_rep
Vue.use(Translate); Vue.use(Translate);
Vue.use(Translate); export default () => {
document.addEventListener('DOMContentLoaded', () => {
const dataset = document.querySelector('.js-pipeline-details-vue').dataset; const dataset = document.querySelector('.js-pipeline-details-vue').dataset;
const mediator = new PipelinesMediator({ endpoint: dataset.endpoint }); const mediator = new PipelinesMediator({ endpoint: dataset.endpoint });
...@@ -144,4 +142,4 @@ document.addEventListener('DOMContentLoaded', () => { ...@@ -144,4 +142,4 @@ document.addEventListener('DOMContentLoaded', () => {
}, },
}); });
} }
}); };
...@@ -13,4 +13,3 @@ ...@@ -13,4 +13,3 @@
- content_for :page_specific_javascripts do - content_for :page_specific_javascripts do
= webpack_bundle_tag('common_vue') = webpack_bundle_tag('common_vue')
= webpack_bundle_tag('pipelines_details')
...@@ -56,7 +56,6 @@ function generateEntries() { ...@@ -56,7 +56,6 @@ function generateEntries() {
mr_notes: './mr_notes/index.js', mr_notes: './mr_notes/index.js',
notebook_viewer: './blob/notebook_viewer.js', notebook_viewer: './blob/notebook_viewer.js',
pdf_viewer: './blob/pdf_viewer.js', pdf_viewer: './blob/pdf_viewer.js',
pipelines_details: './pipelines/pipeline_details_bundle.js',
project_import_gl: './projects/project_import_gitlab_project.js', project_import_gl: './projects/project_import_gitlab_project.js',
protected_branches: './protected_branches', protected_branches: './protected_branches',
protected_tags: './protected_tags', protected_tags: './protected_tags',
......
import initPipelineDetails from '~/pipelines/pipeline_details_bundle';
import initPipelines from '~/pages/projects/pipelines/init_pipelines'; import initPipelines from '~/pages/projects/pipelines/init_pipelines';
document.addEventListener('DOMContentLoaded', initPipelines); document.addEventListener('DOMContentLoaded', () => {
initPipelines();
initPipelineDetails();
});
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment