Commit cc4434a4 authored by Filipa Lacerda's avatar Filipa Lacerda

Fix after review

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