diff options
Diffstat (limited to 'app/views/projects/pipeline_schedules')
4 files changed, 46 insertions, 42 deletions
diff --git a/app/views/projects/pipeline_schedules/_pipeline_schedule.html.haml b/app/views/projects/pipeline_schedules/_pipeline_schedule.html.haml index 7b16564dfa2..0de31f59033 100644 --- a/app/views/projects/pipeline_schedules/_pipeline_schedule.html.haml +++ b/app/views/projects/pipeline_schedules/_pipeline_schedule.html.haml @@ -1,33 +1,38 @@ - if pipeline_schedule %tr.pipeline-schedule-table-row - %td - = pipeline_schedule.description - %td.branch-name-cell.gl-text-truncate - - 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 - - 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 ##{pipeline_schedule.last_pipeline.id} - - else - = s_("PipelineSchedules|None") - %td.gl-text-gray-500{ 'data-testid': 'next-run-cell' } - - if pipeline_schedule.active? && pipeline_schedule.next_run_at - = time_ago_with_tooltip(pipeline_schedule.real_next_run) - - else - = s_("PipelineSchedules|Inactive") - %td - - 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 + %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_to play_pipeline_schedule_path(pipeline_schedule), method: :post, title: _('Play'), class: 'btn gl-button btn-default btn-icon' do diff --git a/app/views/projects/pipeline_schedules/_table.html.haml b/app/views/projects/pipeline_schedules/_table.html.haml index d0c7ea77263..2f96ac6a534 100644 --- a/app/views/projects/pipeline_schedules/_table.html.haml +++ b/app/views/projects/pipeline_schedules/_table.html.haml @@ -1,12 +1,12 @@ .table-holder - %table.table.ci-table - %thead - %tr - %th= _("Description") - %th= s_("PipelineSchedules|Target") - %th= _("Last Pipeline") - %th= s_("PipelineSchedules|Next Run") - %th= _("Owner") - %th - + %table.table.ci-table.responsive-table.b-table.gl-table.b-table-stacked-md{ role: 'table' } + %thead{ role: 'rowgroup' } + %tr{ role: 'row' } + %th.table-th-transparent.border-bottom{ role: 'cell', style: 'width: 34%' }= _("Description") + %th.table-th-transparent.border-bottom{ role: 'cell' }= s_("PipelineSchedules|Target") + %th.table-th-transparent.border-bottom{ role: 'cell' }= _("Last Pipeline") + %th.table-th-transparent.border-bottom{ role: 'cell' }= s_("PipelineSchedules|Next Run") + %th.table-th-transparent.border-bottom{ role: 'cell' }= _("Owner") + %th.table-th-transparent.border-bottom{ role: 'cell' } + %tbody{ role: 'rowgroup' } = render partial: "pipeline_schedule", collection: @schedules diff --git a/app/views/projects/pipeline_schedules/index.html.haml b/app/views/projects/pipeline_schedules/index.html.haml index 47ad8cc826d..cb7cd631859 100644 --- a/app/views/projects/pipeline_schedules/index.html.haml +++ b/app/views/projects/pipeline_schedules/index.html.haml @@ -21,8 +21,7 @@ %ul.content-list = render partial: "table" - else - = render Pajamas::CardComponent.new(card_options: { class: 'bg-light gl-mt-3 gl-text-center' }) do |c| - - c.body do - = _("No schedules") + .nothing-here-block + = _("No schedules") #pipeline-take-ownership-modal diff --git a/app/views/projects/pipeline_schedules/new.html.haml b/app/views/projects/pipeline_schedules/new.html.haml index d3757d0e339..2d4ed5a9872 100644 --- a/app/views/projects/pipeline_schedules/new.html.haml +++ b/app/views/projects/pipeline_schedules/new.html.haml @@ -9,6 +9,6 @@ = _("Schedule a new pipeline") - if Feature.enabled?(:pipeline_schedules_vue, @project) - #pipeline-schedules-form-new{ data: { full_path: @project.full_path } } + #pipeline-schedules-form-new{ data: { full_path: @project.full_path, cron: @schedule.cron, daily_limit: @schedule.daily_limit, timezone_data: timezone_data.to_json, cron_timezone: @schedule.cron_timezone, project_id: @project.id, default_branch: @project.default_branch, settings_link: project_settings_ci_cd_path(@project), } } - else = render "form" |