pipelines_bundle.js 923 字节
Newer Older
1
/* eslint-disable no-param-reassign */
2 3 4

import Vue from 'vue';
import VueResource from 'vue-resource';
5
import CommitPipelinesTable from './pipelines_table';
F
Filipa Lacerda 已提交
6

7
Vue.use(VueResource);
8

F
Filipa Lacerda 已提交
9 10 11 12 13
/**
 * Commits View > Pipelines Tab > Pipelines Table.
 *
 * Renders Pipelines table in pipelines tab in the commits show view.
 */
14

15 16 17 18
// export for use in merge_request_tabs.js (TODO: remove this hack)
window.gl = window.gl || {};
window.gl.CommitPipelinesTable = CommitPipelinesTable;

19 20 21
$(() => {
  gl.commits = gl.commits || {};
  gl.commits.pipelines = gl.commits.pipelines || {};
F
Filipa Lacerda 已提交
22

23 24 25
  const pipelineTableViewEl = document.querySelector('#commit-pipeline-table-view');

  if (pipelineTableViewEl && pipelineTableViewEl.dataset.disableInitialization === undefined) {
26
    gl.commits.pipelines.PipelinesTableBundle = new CommitPipelinesTable().$mount();
27
    pipelineTableViewEl.appendChild(gl.commits.pipelines.PipelinesTableBundle.$el);
28
  }
F
Filipa Lacerda 已提交
29
});