Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
61e2d44b
Commit
61e2d44b
authored
May 04, 2021
by
Terri Chu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Disable pause indexing if reindex in progress
Changelog: changed
parent
0abfd19e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
1 deletion
+22
-1
ee/app/views/admin/application_settings/_elasticsearch_form.html.haml
.../admin/application_settings/_elasticsearch_form.html.haml
+1
-1
ee/changelogs/unreleased/296884-disable-unpausing-indexing-if-a-reindex-is-in-progress.yml
...isable-unpausing-indexing-if-a-reindex-is-in-progress.yml
+5
-0
ee/spec/views/admin/application_settings/_elasticsearch_form.html.haml_spec.rb
...pplication_settings/_elasticsearch_form.html.haml_spec.rb
+16
-0
No files found.
ee/app/views/admin/application_settings/_elasticsearch_form.html.haml
View file @
61e2d44b
...
...
@@ -48,7 +48,7 @@
.form-group
.form-check
-
pending_migrations
=
elasticsearch_available
&&
Elastic
::
DataMigrationService
.
pending_migrations?
&&
Gitlab
::
CurrentSettings
.
elasticsearch_pause_indexing?
-
disable_checkbox
=
!
Gitlab
::
CurrentSettings
.
elasticsearch_indexing?
||
pending_migrations
-
disable_checkbox
=
!
Gitlab
::
CurrentSettings
.
elasticsearch_indexing?
||
pending_migrations
||
@elasticsearch_reindexing_task
&
.
in_progress?
=
f
.
check_box
:elasticsearch_pause_indexing
,
class:
'form-check-input'
,
data:
{
qa_selector:
'pause_checkbox'
},
disabled:
disable_checkbox
=
f
.
label
:elasticsearch_pause_indexing
,
class:
'form-check-label'
do
=
_
(
'Pause Elasticsearch indexing'
)
...
...
ee/changelogs/unreleased/296884-disable-unpausing-indexing-if-a-reindex-is-in-progress.yml
0 → 100644
View file @
61e2d44b
---
title
:
Disable pause indexing checkbox if a reindex is in progress
merge_request
:
60953
author
:
type
:
changed
ee/spec/views/admin/application_settings/_elasticsearch_form.html.haml_spec.rb
View file @
61e2d44b
...
...
@@ -97,6 +97,22 @@ RSpec.describe 'admin/application_settings/_elasticsearch_form' do
assign
(
:elasticsearch_reindexing_task
,
task
)
end
context
'when task is in progress'
do
let
(
:task
)
{
build
(
:elastic_reindexing_task
,
state: :reindexing
)
}
it
'renders a disabled pause checkbox'
do
render
expect
(
rendered
).
to
have_css
(
'input[id=application_setting_elasticsearch_pause_indexing][disabled="disabled"]'
)
end
it
'renders a disabled trigger cluster reindexing link'
do
render
expect
(
rendered
).
to
have_css
(
'a.gl-button[disabled="disabled"]'
,
text:
'Trigger cluster reindexing'
)
end
end
context
'without extended details'
do
let
(
:task
)
{
build
(
:elastic_reindexing_task
)
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment