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
ceaad325
Commit
ceaad325
authored
Jun 22, 2020
by
Dmitry Gruzd
Committed by
Jan Provaznik
Jun 22, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove the elasticsearch_web_indexing feature flag
parent
310511c7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1 addition
and
19 deletions
+1
-19
ee/app/controllers/admin/elasticsearch_controller.rb
ee/app/controllers/admin/elasticsearch_controller.rb
+0
-6
ee/app/views/admin/application_settings/_elasticsearch_form.html.haml
.../admin/application_settings/_elasticsearch_form.html.haml
+1
-1
ee/spec/controllers/admin/elasticsearch_controller_spec.rb
ee/spec/controllers/admin/elasticsearch_controller_spec.rb
+0
-12
No files found.
ee/app/controllers/admin/elasticsearch_controller.rb
View file @
ceaad325
# frozen_string_literal: true
class
Admin::ElasticsearchController
<
Admin
::
ApplicationController
before_action
:check_elasticsearch_web_indexing_feature_flag!
def
check_elasticsearch_web_indexing_feature_flag!
render_404
unless
Feature
.
enabled?
(
:elasticsearch_web_indexing
,
default_enabled:
true
)
end
# POST
# Scheduling indexing jobs
def
enqueue_index
...
...
ee/app/views/admin/application_settings/_elasticsearch_form.html.haml
View file @
ceaad325
...
...
@@ -28,7 +28,7 @@
-
unless
Gitlab
::
CurrentSettings
.
elasticsearch_indexing?
.form-text.text-muted
=
_
(
'Please create an index before enabling indexing'
)
-
if
Feature
.
enabled?
(
:elasticsearch_web_indexing
,
default_enabled:
true
)
&&
Gitlab
::
CurrentSettings
.
elasticsearch_indexing?
-
if
Gitlab
::
CurrentSettings
.
elasticsearch_indexing?
.form-text
=
link_to
_
(
'Index all projects'
),
admin_elasticsearch_enqueue_index_path
,
class:
[
'btn'
,
'btn-success'
],
method: :post
...
...
ee/spec/controllers/admin/elasticsearch_controller_spec.rb
View file @
ceaad325
...
...
@@ -36,17 +36,5 @@ RSpec.describe Admin::ElasticsearchController do
expect
(
response
).
to
redirect_to
integrations_admin_application_settings_path
(
anchor:
'js-elasticsearch-settings'
)
end
end
context
'when feature is disabled'
do
it
'does nothing and returns 404'
do
stub_feature_flags
(
elasticsearch_web_indexing:
false
)
expect
(
::
Elastic
::
IndexProjectsService
).
not_to
receive
(
:new
)
post
:enqueue_index
expect
(
response
).
to
have_gitlab_http_status
(
:not_found
)
end
end
end
end
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