debian-mirror-gitlab/app/views/projects/pipelines/_with_tabs.html.haml

81 lines
4 KiB
Text
Raw Normal View History

2019-12-26 22:10:19 +05:30
- test_reports_enabled = Feature.enabled?(:junit_pipeline_view)
2017-08-17 22:00:37 +05:30
.tabs-holder
2018-11-08 19:23:39 +05:30
%ul.pipelines-tabs.nav-links.no-top.no-bottom.mobile-separator.nav.nav-tabs
2017-08-17 22:00:37 +05:30
%li.js-pipeline-tab-link
2019-12-04 20:38:33 +05:30
= link_to @pipeline_path, data: { target: '#js-tab-pipeline', action: 'pipelines', toggle: 'tab' }, class: 'pipeline-tab' do
2019-07-07 11:18:12 +05:30
= _('Pipeline')
2017-08-17 22:00:37 +05:30
%li.js-builds-tab-link
2018-03-27 19:54:05 +05:30
= link_to builds_project_pipeline_path(@project, @pipeline), data: { target: '#js-tab-builds', action: 'builds', toggle: 'tab' }, class: 'builds-tab' do
2019-07-07 11:18:12 +05:30
= _('Jobs')
2018-11-08 19:23:39 +05:30
%span.badge.badge-pill.js-builds-counter= pipeline.total_size
2018-10-15 14:42:47 +05:30
- if @pipeline.failed_builds.present?
2017-08-17 22:00:37 +05:30
%li.js-failures-tab-link
2018-03-27 19:54:05 +05:30
= link_to failures_project_pipeline_path(@project, @pipeline), data: { target: '#js-tab-failures', action: 'failures', toggle: 'tab' }, class: 'failures-tab' do
2019-07-07 11:18:12 +05:30
= _('Failed Jobs')
2018-11-08 19:23:39 +05:30
%span.badge.badge-pill.js-failures-counter= @pipeline.failed_builds.count
2019-12-26 22:10:19 +05:30
- 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')
%span.badge.badge-pill= pipeline.test_reports.total_count
2018-11-18 11:00:15 +05:30
= render_if_exists "projects/pipelines/tabs_holder", pipeline: @pipeline, project: @project
2017-08-17 22:00:37 +05:30
.tab-content
2019-12-04 20:38:33 +05:30
#js-tab-pipeline.tab-pane.position-absolute.position-left-0.w-100
2017-09-10 17:25:29 +05:30
#js-pipeline-graph-vue
2017-08-17 22:00:37 +05:30
#js-tab-builds.tab-pane
2018-12-13 13:39:08 +05:30
- if pipeline.legacy_stages.present?
.table-holder.pipeline-holder
%table.table.ci-table.pipeline
%thead
%tr
2019-07-07 11:18:12 +05:30
%th= _('Status')
%th= _('Job ID')
%th= _('Name')
2018-12-13 13:39:08 +05:30
%th
2019-07-07 11:18:12 +05:30
%th= _('Coverage')
2018-12-13 13:39:08 +05:30
%th
= render partial: "projects/stage/stage", collection: pipeline.legacy_stages, as: :stage
2017-08-17 22:00:37 +05:30
2018-10-15 14:42:47 +05:30
- if @pipeline.failed_builds.present?
2018-11-08 19:23:39 +05:30
#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-07-07 11:18:12 +05:30
%th.table-th-transparent= _('Name')
%th.table-th-transparent= _('Stage')
%th.table-th-transparent= _('Failure')
2018-11-08 19:23:39 +05:30
%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-07-07 11:18:12 +05:30
%td.responsive-table-cell.ci-status-icon-failed{ data: { column: _('Status')} }
2018-11-08 19:23:39 +05:30
.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-07-07 11:18:12 +05:30
%td.responsive-table-cell.build-name{ data: { column: _('Name')} }
2018-11-08 19:23:39 +05:30
= link_to build.name, pipeline_job_url(pipeline, build)
2019-07-07 11:18:12 +05:30
%td.responsive-table-cell.build-stage{ data: { column: _('Stage')} }
2018-11-08 19:23:39 +05:30
= build.stage.titleize
2019-07-07 11:18:12 +05:30
%td.responsive-table-cell.build-failure{ data: { column: _('Failure')} }
2018-11-08 19:23:39 +05:30
= build.present.callout_failure_message
%td.responsive-table-cell.build-actions
2018-12-13 13:39:08 +05:30
- if can?(current_user, :update_build, job)
= link_to retry_project_job_path(build.project, build, return_to: request.original_url), method: :post, title: _('Retry'), class: 'btn btn-build' do
= icon('repeat')
- 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-12-26 22:10:19 +05:30
#js-tab-tests.tab-pane
#js-pipeline-tests-detail
2018-11-18 11:00:15 +05:30
= render_if_exists "projects/pipelines/tabs_content", pipeline: @pipeline, project: @project