2020-05-15 02:08:40 -04:00
|
|
|
- test_reports_enabled = Feature.enabled?(:junit_pipeline_view, @project)
|
2020-07-21 08:09:30 -04:00
|
|
|
- dag_pipeline_tab_enabled = Feature.enabled?(:dag_pipeline_tab, @project, default_enabled: true)
|
2019-11-05 10:06:17 -05:00
|
|
|
|
2016-11-15 14:24:25 -05:00
|
|
|
.tabs-holder
|
2018-04-19 23:34:20 -04:00
|
|
|
%ul.pipelines-tabs.nav-links.no-top.no-bottom.mobile-separator.nav.nav-tabs
|
2016-11-25 06:23:22 -05:00
|
|
|
%li.js-pipeline-tab-link
|
2020-03-03 16:08:37 -05:00
|
|
|
= link_to project_pipeline_path(@project, @pipeline), data: { target: '#js-tab-pipeline', action: 'pipelines', toggle: 'tab' }, class: 'pipeline-tab' do
|
2019-03-15 10:52:08 -04:00
|
|
|
= _('Pipeline')
|
2020-05-05 17:09:42 -04:00
|
|
|
- if dag_pipeline_tab_enabled
|
|
|
|
%li.js-dag-tab-link
|
|
|
|
= link_to dag_project_pipeline_path(@project, @pipeline), data: { target: '#js-tab-dag', action: 'dag', toggle: 'tab' }, class: 'dag-tab' do
|
|
|
|
= _('DAG')
|
2020-05-21 14:08:27 -04:00
|
|
|
%li.js-builds-tab-link
|
|
|
|
= link_to builds_project_pipeline_path(@project, @pipeline), data: { target: '#js-tab-builds', action: 'builds', toggle: 'tab' }, class: 'builds-tab' do
|
|
|
|
= _('Jobs')
|
|
|
|
%span.badge.badge-pill.js-builds-counter= pipeline.total_size
|
2018-04-21 18:30:37 -04:00
|
|
|
- if @pipeline.failed_builds.present?
|
2017-05-04 12:50:09 -04:00
|
|
|
%li.js-failures-tab-link
|
2018-02-16 07:07:04 -05:00
|
|
|
= link_to failures_project_pipeline_path(@project, @pipeline), data: { target: '#js-tab-failures', action: 'failures', toggle: 'tab' }, class: 'failures-tab' do
|
2019-03-15 10:52:08 -04:00
|
|
|
= _('Failed Jobs')
|
2018-05-08 11:49:30 -04:00
|
|
|
%span.badge.badge-pill.js-failures-counter= @pipeline.failed_builds.count
|
2019-11-05 10:06:17 -05:00
|
|
|
- if test_reports_enabled
|
|
|
|
%li.js-tests-tab-link
|
|
|
|
= link_to test_report_project_pipeline_path(@project, @pipeline), data: { target: '#js-tab-tests', action: 'test_report', toggle: 'tab' }, class: 'test-tab' do
|
|
|
|
= s_('TestReports|Tests')
|
2020-08-11 17:10:09 -04:00
|
|
|
%span.badge.badge-pill.js-test-report-badge-counter= @pipeline.test_report_summary.total[:count]
|
2018-07-20 02:15:14 -04:00
|
|
|
= render_if_exists "projects/pipelines/tabs_holder", pipeline: @pipeline, project: @project
|
2016-11-23 09:44:05 -05:00
|
|
|
|
2016-11-15 14:24:25 -05:00
|
|
|
.tab-content
|
2019-09-18 10:02:45 -04:00
|
|
|
#js-tab-pipeline.tab-pane.position-absolute.position-left-0.w-100
|
2017-05-26 06:56:54 -04:00
|
|
|
#js-pipeline-graph-vue
|
2017-05-06 13:02:06 -04:00
|
|
|
|
2016-11-15 14:24:25 -05:00
|
|
|
#js-tab-builds.tab-pane
|
2018-10-29 10:58:16 -04:00
|
|
|
- if pipeline.legacy_stages.present?
|
|
|
|
.table-holder.pipeline-holder
|
|
|
|
%table.table.ci-table.pipeline
|
|
|
|
%thead
|
|
|
|
%tr
|
2019-03-15 10:52:08 -04:00
|
|
|
%th= _('Status')
|
|
|
|
%th= _('Job ID')
|
|
|
|
%th= _('Name')
|
2018-10-29 10:58:16 -04:00
|
|
|
%th
|
2019-03-15 10:52:08 -04:00
|
|
|
%th= _('Coverage')
|
2018-10-29 10:58:16 -04:00
|
|
|
%th
|
|
|
|
= render partial: "projects/stage/stage", collection: pipeline.legacy_stages, as: :stage
|
2016-11-15 14:24:25 -05:00
|
|
|
|
2018-04-21 18:30:37 -04:00
|
|
|
- if @pipeline.failed_builds.present?
|
2018-06-07 14:06:31 -04:00
|
|
|
#js-tab-failures.build-failures.tab-pane.build-page
|
|
|
|
%table.table.responsive-table.ci-table.responsive-table-sm-rounded
|
|
|
|
%thead
|
|
|
|
%th.table-th-transparent
|
2019-03-15 10:52:08 -04:00
|
|
|
%th.table-th-transparent= _('Name')
|
|
|
|
%th.table-th-transparent= _('Stage')
|
|
|
|
%th.table-th-transparent= _('Failure')
|
2018-06-07 14:06:31 -04:00
|
|
|
|
|
|
|
%tbody
|
|
|
|
- @pipeline.failed_builds.each_with_index do |build, index|
|
|
|
|
- job = build.present(current_user: current_user)
|
|
|
|
%tr.build-state.responsive-table-border-start
|
2019-03-15 10:52:08 -04:00
|
|
|
%td.responsive-table-cell.ci-status-icon-failed{ data: { column: _('Status')} }
|
2018-06-07 14:06:31 -04:00
|
|
|
.d-none.d-md-block.build-icon
|
|
|
|
= custom_icon("icon_status_#{build.status}")
|
|
|
|
.d-md-none.build-badge
|
|
|
|
= render "ci/status/badge", link: false, status: job.detailed_status(current_user)
|
2019-03-15 10:52:08 -04:00
|
|
|
%td.responsive-table-cell.build-name{ data: { column: _('Name')} }
|
2018-06-07 14:06:31 -04:00
|
|
|
= link_to build.name, pipeline_job_url(pipeline, build)
|
2019-03-15 10:52:08 -04:00
|
|
|
%td.responsive-table-cell.build-stage{ data: { column: _('Stage')} }
|
2018-06-07 14:06:31 -04:00
|
|
|
= build.stage.titleize
|
2019-03-15 10:52:08 -04:00
|
|
|
%td.responsive-table-cell.build-failure{ data: { column: _('Failure')} }
|
2018-06-07 14:06:31 -04:00
|
|
|
= build.present.callout_failure_message
|
|
|
|
%td.responsive-table-cell.build-actions
|
2018-10-23 06:58:41 -04:00
|
|
|
- if can?(current_user, :update_build, job)
|
2020-07-23 11:09:28 -04:00
|
|
|
= link_to retry_project_job_path(build.project, build, return_to: request.original_url), method: :post, title: _('Retry'), class: 'btn btn-build gl-button btn-icon btn-default' do
|
|
|
|
= sprite_icon('repeat', css_class: 'gl-icon')
|
2018-10-23 06:58:41 -04:00
|
|
|
- if can?(current_user, :read_build, job)
|
|
|
|
%tr.build-trace-row.responsive-table-border-end
|
|
|
|
%td
|
|
|
|
%td.responsive-table-cell.build-trace-container{ colspan: 4 }
|
|
|
|
%pre.build-trace.build-trace-rounded
|
|
|
|
%code.bash.js-build-output
|
|
|
|
= build_summary(build)
|
2019-11-05 10:06:17 -05:00
|
|
|
|
2020-05-05 17:09:42 -04:00
|
|
|
- if dag_pipeline_tab_enabled
|
|
|
|
#js-tab-dag.tab-pane
|
2020-06-29 14:08:57 -04:00
|
|
|
#js-pipeline-dag-vue{ data: { pipeline_data_path: dag_project_pipeline_path(@project, @pipeline), empty_svg_path: image_path('illustrations/empty-state/empty-dag-md.svg'), dag_doc_path: help_page_path('ci/yaml/README.md', anchor: 'needs')} }
|
2020-05-05 17:09:42 -04:00
|
|
|
|
2019-11-05 10:06:17 -05:00
|
|
|
#js-tab-tests.tab-pane
|
2020-08-07 17:10:07 -04:00
|
|
|
#js-pipeline-tests-detail{ data: { summary_endpoint: summary_project_pipeline_tests_path(@project, @pipeline, format: :json),
|
|
|
|
suite_endpoint: project_pipeline_test_path(@project, @pipeline, suite_name: ':suite_name', format: :json) } }
|
2018-07-20 02:15:14 -04:00
|
|
|
= render_if_exists "projects/pipelines/tabs_content", pipeline: @pipeline, project: @project
|