Commit 8dba26d4 authored by Vitaly Slobodin's avatar Vitaly Slobodin

Merge branch 'change-es-reindexing-color-scheme' into 'master'

ES reindexing: add confirmation popup and change color scheme

See merge request gitlab-org/gitlab!42209
parents d463f84b 72b92a68
......@@ -102,7 +102,7 @@
.sub-section
%h4= _('Elasticsearch zero-downtime reindexing')
= link_to _('Trigger cluster reindexing'), admin_elasticsearch_trigger_reindexing_path, class: 'btn btn-success', method: :post, disabled: @elasticsearch_reindexing_task&.in_progress?
= link_to _('Trigger cluster reindexing'), admin_elasticsearch_trigger_reindexing_path, class: 'btn btn-primary', data: { confirm: _('Are you sure you want to reindex?') }, method: :post, disabled: @elasticsearch_reindexing_task&.in_progress?
.form-text.text-muted
= _('This feature should be used with an index that was created after 13.0')
- Elastic::ReindexingTask.old_indices_scheduled_for_deletion.each do |task|
......@@ -124,7 +124,7 @@
- percentage = ((processed_documents / expected_documents.to_f) * 100).round(2)
%p= _('Documents reindexed: %{processed_documents} (%{percentage}%%)') % { processed_documents: processed_documents, percentage: percentage }
.progress
.progress-bar.progress-bar-striped.bg-success{ "aria-valuemax" => "100", "aria-valuemin" => "0", "aria-valuenow" => percentage, :role => "progressbar", :style => "width: #{percentage}%" }
.progress-bar.progress-bar-striped.bg-primary{ "aria-valuemax" => "100", "aria-valuemin" => "0", "aria-valuenow" => percentage, :role => "progressbar", :style => "width: #{percentage}%" }
.sub-section
%h4= _('Elasticsearch indexing restrictions')
......
---
title: 'Elasticsearch reindexing: add confirmation popup and change color scheme'
merge_request: 42209
author:
type: other
......@@ -162,6 +162,17 @@ RSpec.describe 'Admin updates EE-only settings' do
expect(ElasticsearchIndexedProject.count).to eq(0)
expect(page).to have_content 'Application settings saved successfully'
end
it 'zero-downtime reindexing shows popup', :js do
page.within('.as-elasticsearch') do
expect(page).to have_content 'Trigger cluster reindexing'
click_link 'Trigger cluster reindexing'
end
text = page.driver.browser.switch_to.alert.text
expect(text).to eq 'Are you sure you want to reindex?'
page.driver.browser.switch_to.alert.accept
end
end
it 'Enable Slack application' do
......
......@@ -3358,6 +3358,9 @@ msgstr ""
msgid "Are you sure you want to regenerate the public key? You will have to update the public key on the remote server before mirroring will work again."
msgstr ""
msgid "Are you sure you want to reindex?"
msgstr ""
msgid "Are you sure you want to remove %{group_name}?"
msgstr ""
......
Markdown is supported
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