Commit cc4434a4 authored by Filipa Lacerda's avatar Filipa Lacerda

Fix after review

Adds require statement
parent da8c2e69
......@@ -135,8 +135,18 @@
new TreeView();
}
break;
case 'projects:pipelines:builds':
case 'projects:pipelines:show':
new gl.Pipelines();
const controllerAction = document.querySelector('.js-pipeline-container').dataset.controllerAction;
new gl.Pipelines({
initTabs: true,
tabsOptions: {
action: controllerAction,
defaultAction: 'pipelines',
parentEl: '.pipelines-tabs',
},
});
break;
case 'groups:activity':
new gl.Activities();
......
//= require lib/utils/bootstrap_linked_tabs
/* eslint-disable */
((global) => {
class Pipelines {
constructor() {
constructor(options) {
if (options.initTabs && options.tabsOptions) {
new window.gl.LinkedTabs(options.tabsOptions);
}
this.addMarginToBuildColumns();
}
......
......@@ -52,13 +52,3 @@
%th
- pipeline.statuses.relevant.stages.each do |stage|
= render 'projects/commit/ci_stage', stage: stage, statuses: pipeline.statuses.relevant.where(stage: stage)
:javascript
var pipelines_tab;
pipelines_tab = new window.gl.LinkedTabs({
action: "#{controller.action_name}",
defaultAction: 'pipelines',
parentEl: '.pipelines-tabs'
});
......@@ -2,7 +2,7 @@
- page_title "Pipeline"
= render "projects/pipelines/head"
%div{ class: container_class }
%div.js-pipeline-container{ class: container_class, data: {controller_action: "#{controller.action_name}"} }
- if @commit
= render "projects/pipelines/info"
......
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