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
5e699c98
Commit
5e699c98
authored
Jun 20, 2018
by
Mark Chao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add autocomplete_sources/epics endpoint
Add epics path to autocomplete_data_sources
parent
05ad2887
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
1 deletion
+13
-1
config/routes/group.rb
config/routes/group.rb
+1
-0
ee/app/controllers/groups/autocomplete_sources_controller.rb
ee/app/controllers/groups/autocomplete_sources_controller.rb
+10
-0
ee/app/helpers/ee/application_helper.rb
ee/app/helpers/ee/application_helper.rb
+2
-1
No files found.
config/routes/group.rb
View file @
5e699c98
...
...
@@ -90,6 +90,7 @@ constraints(::Constraints::GroupUrlConstrainer.new) do
resources
:autocomplete_sources
,
only:
[]
do
collection
do
get
'members'
get
'epics'
end
end
...
...
ee/app/controllers/groups/autocomplete_sources_controller.rb
View file @
5e699c98
class
Groups::AutocompleteSourcesController
<
Groups
::
ApplicationController
before_action
:load_autocomplete_service
,
except:
[
:members
]
def
members
render
json:
::
Groups
::
ParticipantsService
.
new
(
@group
,
current_user
).
execute
(
target
)
end
def
epics
render
json:
@autocomplete_service
.
epics
end
private
def
load_autocomplete_service
@autocomplete_service
=
::
Groups
::
AutocompleteService
.
new
(
@group
,
current_user
)
end
def
target
case
params
[
:type
]
&
.
downcase
when
'epic'
...
...
ee/app/helpers/ee/application_helper.rb
View file @
5e699c98
...
...
@@ -66,7 +66,8 @@ module EE
return
super
unless
object
.
is_a?
(
Group
)
{
members:
members_group_autocomplete_sources_path
(
object
,
type:
noteable_type
,
type_id:
params
[
:id
])
members:
members_group_autocomplete_sources_path
(
object
,
type:
noteable_type
,
type_id:
params
[
:id
]),
epics:
epics_group_autocomplete_sources_path
(
object
)
}
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