Welcome to mirror list, hosted at ThFree Co, Russian Federation.

_with_tabs.html.haml « pipelines « projects « views « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 6b26c9f3f00c20041269b4951159bfb70b96312c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
- return if pipeline_has_errors

.tabs-holder
  %ul.pipelines-tabs.nav-links.no-top.no-bottom.mobile-separator.nav.nav-tabs
    %li.js-pipeline-tab-link
      = link_to project_pipeline_path(@project, @pipeline), data: { target: '#js-tab-pipeline', action: 'pipelines', toggle: 'tab' }, class: 'pipeline-tab' do
        = _('Pipeline')
    %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
        = _('Needs')
    %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')
        = gl_badge_tag @pipeline.total_size, { size: :sm }, { class: 'js-builds-counter' }
    - if @pipeline.failed_builds.present?
      %li.js-failures-tab-link
        = link_to failures_project_pipeline_path(@project, @pipeline), data: { target: '#js-tab-failures', action: 'failures', toggle: 'tab' }, class: 'failures-tab' do
          = _('Failed Jobs')
          = gl_badge_tag @pipeline.failed_builds.count, { size: :sm }, { class: 'js-failures-counter' }
    %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')
        = gl_badge_tag @pipeline.test_report_summary.total[:count], { size: :sm }, { class: 'js-test-report-badge-counter' }
    = render_if_exists "projects/pipelines/tabs_holder", pipeline: @pipeline, project: @project

.tab-content
  #js-tab-pipeline.tab-pane.gl-w-full
    #js-pipeline-graph-vue

  #js-tab-builds.tab-pane
    - if stages.present?
      #js-pipeline-jobs-vue{ data: { full_path: @project.full_path, pipeline_iid: @pipeline.iid } }

  - if @pipeline.failed_builds.present?
    #js-tab-failures.tab-pane
      - if Feature.enabled?(:failed_jobs_tab_vue, @project)
        #js-pipeline-failed-jobs-vue{ data: { full_path: @project.full_path, pipeline_iid: @pipeline.iid, failed_jobs_summary_data: prepare_failed_jobs_summary_data(@pipeline.failed_builds) } }
      - else
        .build-failures.build-page
          %table.table.gl-table.responsive-table.ci-table.responsive-table-sm-rounded
            %thead
              %th
              %th= _('Name')
              %th= _('Stage')
              %th= _('Failure')
              %th

            %tbody
              - @pipeline.failed_builds.each_with_index do |build, index|
                - job = build.present(current_user: current_user)
                %tr.build-state.responsive-table-border-start
                  %td.responsive-table-cell.ci-status-icon-failed{ data: { column: _('Status')} }
                    .d-none.d-md-block.build-icon
                      = sprite_icon("status_#{build.status}")
                    .d-md-none.build-badge
                      = render "ci/status/badge", link: false, status: job.detailed_status(current_user)
                  %td.responsive-table-cell.build-name{ data: { column: _('Name')} }
                    = link_to build.name, pipeline_job_url(pipeline, build)
                  %td.responsive-table-cell.build-stage{ data: { column: _('Stage')} }
                    = build.stage.titleize
                  %td.responsive-table-cell.build-failure{ data: { column: _('Failure')} }
                    = build.present.callout_failure_message
                  %td.responsive-table-cell.build-actions
                    - if can?(current_user, :update_build, job) && job.retryable?
                      = link_to retry_project_job_path(build.project, build, return_to: request.original_url), method: :post, title: _('Retry'), class: 'gl-button btn btn-default btn-icon' do
                        = sprite_icon('repeat', css_class: 'gl-icon')
                - if can?(current_user, :read_build, job)
                  %tr.build-log-row.responsive-table-border-end
                    %td
                    %td.responsive-table-cell.build-log-container{ colspan: 4 }
                      %pre.build-log.build-log-rounded
                        %code.bash.js-build-output
                          = build_summary(build)

  #js-tab-dag.tab-pane
    #js-pipeline-dag-vue{ data: { pipeline_project_path: @project.full_path, pipeline_iid: @pipeline.iid, empty_svg_path: image_path('illustrations/empty-state/empty-dag-md.svg'), about_dag_doc_path: help_page_path('ci/directed_acyclic_graph/index.md'), dag_doc_path: help_page_path('ci/yaml/index.md', anchor: 'needs')} }

  #js-tab-tests.tab-pane
    #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', format: :json),
      blob_path: project_blob_path(@project, @pipeline.sha),
      has_test_report: @pipeline.has_reports?(Ci::JobArtifact.test_reports).to_s,
      empty_state_image_path: image_path('illustrations/empty-state/empty-test-cases-lg.svg') } }
  = render_if_exists "projects/pipelines/tabs_content", pipeline: @pipeline, project: @project