Skip to content
Snippets Groups Projects
Commit 2f0f7538 authored by Robert Hunt's avatar Robert Hunt
Browse files

Merge branch...

Merge branch '363936-migrate-ee-app-views-projects-mirrors-_table_pull_row-html-haml-to-pajamas-buttoncomponent' into 'master'

Migrate buttons in the Repository Mirroring section to Pajamas::ButtonComponent

See merge request gitlab-org/gitlab!89785
parents 9377ea62 015622a7
Branches 363733-docs-refactor-project-settings-page
Tags
No related merge requests found
......@@ -71,8 +71,10 @@
= gl_badge_tag _('Error'), { variant: :danger }, { data: { toggle: 'tooltip', html: 'true', qa_selector: 'mirror_error_badge' }, title: html_escape(mirror.last_error.try(:strip)) }
%td.gl-display-flex
- if mirror_settings_enabled
%button.js-delete-mirror.qa-delete-mirror.rspec-delete-mirror.btn.btn-icon.gl-button.btn-danger.gl-mr-3{ type: 'button', data: { mirror_id: mirror.id, toggle: 'tooltip', container: 'body' }, title: _('Remove') }= sprite_icon('remove')
.btn-group.mirror-actions-group{ role: 'group' }
- if mirror.ssh_key_auth?
= clipboard_button(text: mirror.ssh_public_key, class: 'gl-button btn btn-default', title: _('Copy SSH public key'), qa_selector: 'copy_public_key_button')
= clipboard_button(text: mirror.ssh_public_key, class: 'gl-button btn btn-default btn-icon', title: _('Copy SSH public key'), qa_selector: 'copy_public_key_button')
= render 'shared/remote_mirror_update_button', remote_mirror: mirror
= render Pajamas::ButtonComponent.new(variant: :danger,
icon: 'remove',
button_options: { class: 'js-delete-mirror qa-delete-mirror rspec-delete-mirror', title: _('Remove'), data: { mirror_id: mirror.id, toggle: 'tooltip', container: 'body' } })
- if remote_mirror.update_in_progress?
%button.btn.btn-icon.gl-button.disabled{ type: 'button', data: { toggle: 'tooltip', container: 'body', qa_selector: 'updating_button' }, title: _('Updating') }
= sprite_icon("retry", css_class: "spin")
= render Pajamas::ButtonComponent.new(icon: 'retry',
button_options: { class: 'disabled', title: _('Updating'), data: { toggle: 'tooltip', container: 'body', qa_selector: 'updating_button' } },
icon_classes: 'spin')
- elsif remote_mirror.enabled?
= link_to update_now_project_mirror_path(@project, sync_remote: true), method: :post, class: "btn btn-icon gl-button qa-update-now-button rspec-update-now-button", data: { toggle: 'tooltip', container: 'body' }, title: _('Update now') do
= sprite_icon("retry")
......@@ -19,12 +19,18 @@
.btn-group.mirror-actions-group.float-right{ role: 'group' }
- ssh_public_key = @project.import_data.ssh_public_key
- if ssh_public_key
= clipboard_button(text: ssh_public_key, class: 'gl-button btn btn-default rspec-copy-ssh-public-key', title: _('Copy SSH public key'), qa_selector: 'copy_public_key_button')
= clipboard_button(text: ssh_public_key, class: 'gl-button btn btn-default btn-icon rspec-copy-ssh-public-key', title: _('Copy SSH public key'), qa_selector: 'copy_public_key_button')
- if import_state.mirror_update_due? || import_state.updating_mirror?
%button.btn.btn-default.btn-icon.gl-button.disabled{ type: 'button', data: { container: 'body', toggle: 'tooltip', qa_selector: 'updating_button' }, title: _('Updating') }= sprite_icon("retry", css_class: "spin")
= render Pajamas::ButtonComponent.new(icon: 'retry',
button_options: { class: 'disabled', title: _('Updating'), data: { container: 'body', toggle: 'tooltip', qa_selector: 'updating_button' } },
icon_classes: 'spin')
- elsif @project.archived?
%button.btn.btn-default.btn-icon.gl-button.disabled{ type: 'button', data: { container: 'body', toggle: 'tooltip', qa_selector: 'update_now_button' }, title: _('This Project is currently archived and read-only. Please unarchive the project first if you want to resume Pull mirroring') }= sprite_icon("retry")
= render Pajamas::ButtonComponent.new(icon: 'retry',
button_options: { class: 'disabled', title: _('This Project is currently archived and read-only. Please unarchive the project first if you want to resume Pull mirroring'), data: { container: 'body', toggle: 'tooltip', qa_selector: 'update_now_button' } },
icon_classes: 'spin')
- else
= link_to update_now_project_mirror_path(@project), method: :post, class: 'btn gl-button btn-icon btn-default js-force-update-mirror', data: { container: 'body', toggle: 'tooltip', qa_selector: 'update_now_button' }, title: _('Update now') do
= sprite_icon("retry")
%button.js-delete-mirror.js-delete-pull-mirror.btn.btn-icon.gl-button.btn-danger{ type: 'button', data: { toggle: 'tooltip', container: 'body' }, title: _('Remove') }= sprite_icon('remove')
= render Pajamas::ButtonComponent.new(variant: :danger,
icon: 'remove',
button_options: { class: 'js-delete-mirror js-delete-pull-mirror', title: _('Remove'), data: { toggle: 'tooltip', container: 'body' } })
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment