Skip to content
Snippets Groups Projects
Commit 401c155e authored by Kamil Trzcińśki's avatar Kamil Trzcińśki
Browse files

Update stage rendering views

parent 260d754c
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -111,7 +111,7 @@
%span.label.label-primary
= tag
 
- if @build.pipeline.stages_count.many?
- if @build.pipeline.stages_count > 1
.dropdown.build-dropdown
.title Stage
%button.dropdown-menu-toggle{type: 'button', 'data-toggle' => 'dropdown'}
Loading
Loading
@@ -120,7 +120,7 @@
%ul.dropdown-menu
- @build.pipeline.stages.each do |stage|
%li
%a.stage-item= stage
%a.stage-item= stage.name
 
.builds-container
- HasStatus::ORDERED_STATUSES.each do |build_status|
Loading
Loading
Loading
Loading
@@ -25,18 +25,7 @@
= time_interval_in_words pipeline.duration
 
.row-content-block.build-content.middle-block.pipeline-graph.hidden
.pipeline-visualization
%ul.stage-column-list
- pipeline.stages.each do |stage|
%li.stage-column
.stage-name
%a{name: stage.name}
- if stage.name
= stage.name.titleize
.builds-container
%ul
= render "projects/commit/pipeline_stage", statuses: stage.statuses
= render "projects/pipelines/graph", subject: pipeline
 
- if pipeline.yaml_errors.present?
.bs-callout.bs-callout-danger
Loading
Loading
@@ -61,4 +50,5 @@
- if pipeline.project.build_coverage_enabled?
%th Coverage
%th
= render pipeline.stages
- pipeline.stages.each do |stage|
= render "projects/stage/stage", subject: stage
- status_groups = statuses.sort_by(&:name).group_by(&:group_name)
- status_groups.each do |group_name, grouped_statuses|
- if grouped_statuses.one?
- status = grouped_statuses.first
- is_playable = status.playable? && can?(current_user, :update_build, @project)
%li.build{ class: ("playable" if is_playable) }
.curve
.build-content
= render "projects/#{status.to_partial_path}_pipeline", subject: status
- else
%li.build
.curve
.dropdown.inline.build-content
= render "projects/commit/pipeline_status_group", name: group_name, subject: grouped_statuses
.pipeline-visualization
%ul.stage-column-list
- subject.stages.each do |stage|
= render "projects/stage/graph", subject: stage
Loading
Loading
@@ -13,17 +13,7 @@
.tab-content
#js-tab-pipeline.tab-pane
.build-content.middle-block.pipeline-graph
.pipeline-visualization
%ul.stage-column-list
- pipeline.stages.each do |stage|
%li.stage-column
.stage-name
%a{name: stage.name}
- if stage.name
= stage.name.titleize
.builds-container
%ul
= render "projects/commit/pipeline_stage", statuses: statuses
= render "projects/pipelines/graph", subject: pipeline
 
#js-tab-builds.tab-pane
- if pipeline.yaml_errors.present?
Loading
Loading
@@ -49,4 +39,5 @@
- if pipeline.project.build_coverage_enabled?
%th Coverage
%th
= render pipeline.stages
- pipeline.stages.each do |stage|
= render "projects/stage/stage", subject: stage
%li.stage-column
.stage-name
%a{ name: subject.name }
- if subject.name
= subject.name.titleize
.builds-container
%ul
- statuses = subject.statuses.latest
- status_groups = statuses.sort_by(&:name).group_by(&:group_name)
- status_groups.each do |group_name, grouped_statuses|
- if grouped_statuses.one?
- status = grouped_statuses.first
- is_playable = status.playable? && can?(current_user, :update_build, @project)
%li.build{ class: ("playable" if is_playable) }
.curve
.build-content
= render "projects/#{status.to_partial_path}_pipeline", subject: status
- else
%li.build
.curve
.dropdown.inline.build-content
= render "projects/stage/in_stage_group", name: group_name, subject: grouped_statuses
%tr
%th{colspan: 10}
%strong
%a{name: subject.name}
%a{ name: subject.name }
%span{class: "ci-status-link ci-status-icon-#{subject.status}"}
= ci_icon_for_status(subject.status)
- if subject.name
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment