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

_pipeline_schedule.html.haml « pipeline_schedules « projects « views « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: a050808f13c819dfa5eb0f0f0fb300e08c1ced6e (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
- if pipeline_schedule
  %tr.pipeline-schedule-table-row
    %td{ role: 'cell', data: { label: _('Description') } }
      %div
        = pipeline_schedule.description
    %td.branch-name-cell.gl-text-truncate{ role: 'cell', data: { label: s_("PipelineSchedules|Target") } }
      %div
        - if pipeline_schedule.for_tag?
          = sprite_icon('tag', size: 12, css_class: 'gl-vertical-align-middle!')
        - else
          = sprite_icon('fork', size: 12, css_class: 'gl-vertical-align-middle!')
        - if pipeline_schedule.ref.present?
          = link_to pipeline_schedule.ref_for_display, project_ref_path(@project, pipeline_schedule.ref_for_display), class: "ref-name"
    %td{ role: 'cell', data: { label: _("Last Pipeline") } }
      %div
        - if pipeline_schedule.last_pipeline
          .status-icon-container{ class: "ci-status-icon-#{pipeline_schedule.last_pipeline.status}" }
            = link_to project_pipeline_path(@project, pipeline_schedule.last_pipeline.id) do
              = ci_icon_for_status(pipeline_schedule.last_pipeline.status)
              %span.gl-text-blue-500! ##{pipeline_schedule.last_pipeline.id}
        - else
          = s_("PipelineSchedules|None")
    %td.gl-text-gray-500{ role: 'cell', data: { label: s_("PipelineSchedules|Next Run") }, 'data-testid': 'next-run-cell' }
      %div
        - if pipeline_schedule.active? && pipeline_schedule.next_run_at
          = time_ago_with_tooltip(pipeline_schedule.real_next_run)
        - else
          = s_("PipelineSchedules|Inactive")
    %td{ role: 'cell', data: { label: _("Owner") } }
      %div
        - if pipeline_schedule.owner
          = render Pajamas::AvatarComponent.new(pipeline_schedule.owner, size: 24, class: "gl-mr-2")
          = link_to user_path(pipeline_schedule.owner) do
            = pipeline_schedule.owner&.name
    %td{ role: 'cell', data: { label: _('Actions') } }
      .float-right.btn-group
        - if can?(current_user, :play_pipeline_schedule, pipeline_schedule)
          = link_button_to nil, play_pipeline_schedule_path(pipeline_schedule), method: :post, title: _('Play'), icon: 'play'
        - if can?(current_user, :admin_pipeline_schedule, pipeline_schedule) && pipeline_schedule.owner != current_user
          = render Pajamas::ButtonComponent.new(button_options: { class: 'js-take-ownership-button has-tooltip', title: s_('PipelineSchedule|Take ownership to edit'), data: { url: take_ownership_pipeline_schedule_path(pipeline_schedule) } }) do
            = s_('PipelineSchedules|Take ownership')
        - if can?(current_user, :update_pipeline_schedule, pipeline_schedule)
          = link_button_to nil, edit_pipeline_schedule_path(pipeline_schedule), title: _('Edit'), icon: 'pencil'
        - if can?(current_user, :admin_pipeline_schedule, pipeline_schedule)
          = link_button_to nil, pipeline_schedule_path(pipeline_schedule), title: _('Delete'), method: :delete, aria: { label: _('Delete pipeline schedule') }, data: { confirm: _("Are you sure you want to delete this pipeline schedule?"), confirm_btn_variant: 'danger' }, variant: :danger, icon: 'remove'