debian-mirror-gitlab/app/views/admin/background_migrations/_migration.html.haml

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

29 lines
1.6 KiB
Text
Raw Normal View History

2021-09-04 01:27:46 +05:30
%tr{ role: 'row' }
2022-07-16 23:28:13 +05:30
%td{ role: 'cell', data: { label: _('Migration') } }
= link_to admin_background_migration_path(migration, database: params[:database]) do
= migration.job_class_name + ': ' + migration.table_name
2021-09-04 01:27:46 +05:30
%td{ role: 'cell', data: { label: _('Progress') } }
- progress = batched_migration_progress(migration, @successful_rows_counts[migration.id])
- if progress
= number_to_percentage(progress, precision: 2)
- else
= _('Unknown')
%td{ role: 'cell', data: { label: _('Status') } }
2022-06-21 17:19:12 +05:30
= gl_badge_tag migration.status_name.to_s.humanize, { size: :sm, variant: batched_migration_status_badge_variant(migration) }
2021-09-30 23:02:18 +05:30
%td{ role: 'cell', data: { label: _('Action') } }
- if migration.active?
2023-04-23 21:23:45 +05:30
= render Pajamas::ButtonComponent.new(icon: 'pause',
method: :post,
href: pause_admin_background_migration_path(migration, database: params[:database]),
button_options: { class: 'has-tooltip', title: _('Pause'), 'aria-label' => _('Pause') })
2021-09-30 23:02:18 +05:30
- elsif migration.paused?
2023-04-23 21:23:45 +05:30
= render Pajamas::ButtonComponent.new(icon: 'play',
method: :post,
href: resume_admin_background_migration_path(migration, database: params[:database]),
button_options: { class: 'has-tooltip', title: _('Resume'), 'aria-label' => _('Resume') })
2021-11-11 11:23:49 +05:30
- elsif migration.failed?
2023-04-23 21:23:45 +05:30
= render Pajamas::ButtonComponent.new(icon: 'retry',
method: :post,
href: retry_admin_background_migration_path(migration, database: params[:database]),
button_options: { class: 'has-tooltip', title: _('Retry'), 'aria-label' => _('Retry') })