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
009e4b63
Commit
009e4b63
authored
Aug 10, 2020
by
Justin Ho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update ES controller redirect_path
Should go to Settings > General where the ES settings are now available.
parent
e7245e1b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
6 deletions
+12
-6
ee/app/controllers/admin/elasticsearch_controller.rb
ee/app/controllers/admin/elasticsearch_controller.rb
+8
-2
ee/spec/controllers/admin/elasticsearch_controller_spec.rb
ee/spec/controllers/admin/elasticsearch_controller_spec.rb
+4
-4
No files found.
ee/app/controllers/admin/elasticsearch_controller.rb
View file @
009e4b63
...
...
@@ -14,7 +14,7 @@ class Admin::ElasticsearchController < Admin::ApplicationController
flash
[
:warning
]
=
_
(
'Please create an index before enabling indexing'
)
end
redirect_to
integrations_admin_application_settings_path
(
anchor:
'js-elasticsearch-settings'
)
redirect_to
redirect_path
end
# POST
...
...
@@ -27,6 +27,12 @@ class Admin::ElasticsearchController < Admin::ApplicationController
flash
[
:notice
]
=
_
(
'Elasticsearch reindexing triggered'
)
end
redirect_to
integrations_admin_application_settings_path
(
anchor:
'js-elasticsearch-settings'
)
redirect_to
redirect_path
end
private
def
redirect_path
general_admin_application_settings_path
(
anchor:
'js-elasticsearch-settings'
)
end
end
ee/spec/controllers/admin/elasticsearch_controller_spec.rb
View file @
009e4b63
...
...
@@ -19,7 +19,7 @@ RSpec.describe Admin::ElasticsearchController do
post
:enqueue_index
expect
(
controller
).
to
set_flash
[
:notice
].
to
include
(
'/admin/sidekiq/queues/elastic_full_index'
)
expect
(
response
).
to
redirect_to
integrations
_admin_application_settings_path
(
anchor:
'js-elasticsearch-settings'
)
expect
(
response
).
to
redirect_to
general
_admin_application_settings_path
(
anchor:
'js-elasticsearch-settings'
)
end
context
'without an index'
do
...
...
@@ -33,7 +33,7 @@ RSpec.describe Admin::ElasticsearchController do
post
:enqueue_index
expect
(
controller
).
to
set_flash
[
:warning
].
to
include
(
'create an index before enabling indexing'
)
expect
(
response
).
to
redirect_to
integrations
_admin_application_settings_path
(
anchor:
'js-elasticsearch-settings'
)
expect
(
response
).
to
redirect_to
general
_admin_application_settings_path
(
anchor:
'js-elasticsearch-settings'
)
end
end
end
...
...
@@ -49,7 +49,7 @@ RSpec.describe Admin::ElasticsearchController do
post
:trigger_reindexing
expect
(
controller
).
to
set_flash
[
:notice
].
to
include
(
'reindexing triggered'
)
expect
(
response
).
to
redirect_to
integrations
_admin_application_settings_path
(
anchor:
'js-elasticsearch-settings'
)
expect
(
response
).
to
redirect_to
general
_admin_application_settings_path
(
anchor:
'js-elasticsearch-settings'
)
end
it
'does not create a reindexing task if there is another one'
do
...
...
@@ -59,7 +59,7 @@ RSpec.describe Admin::ElasticsearchController do
post
:trigger_reindexing
expect
(
controller
).
to
set_flash
[
:warning
].
to
include
(
'already in progress'
)
expect
(
response
).
to
redirect_to
integrations
_admin_application_settings_path
(
anchor:
'js-elasticsearch-settings'
)
expect
(
response
).
to
redirect_to
general
_admin_application_settings_path
(
anchor:
'js-elasticsearch-settings'
)
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