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
6def9128
Commit
6def9128
authored
Jan 29, 2018
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Chganged approverUsers methods to use axios
parent
7c28e4cd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
7 deletions
+9
-7
app/assets/javascripts/api.js
app/assets/javascripts/api.js
+7
-5
ee/app/assets/javascripts/approvers_select.js
ee/app/assets/javascripts/approvers_select.js
+2
-2
No files found.
app/assets/javascripts/api.js
View file @
6def9128
...
...
@@ -182,14 +182,16 @@ const Api = {
approverUsers
(
search
,
options
,
callback
=
$
.
noop
)
{
const
url
=
Api
.
buildUrl
(
'
/autocomplete/users.json
'
);
return
$
.
ajax
({
url
,
data
:
$
.
extend
({
return
axios
.
get
(
url
,
{
params
:
Object
.
assign
({
search
,
per_page
:
20
,
},
options
),
dataType
:
'
json
'
,
}).
done
(
callback
);
}).
then
(({
data
})
=>
{
callback
(
data
);
return
data
;
});
},
ldap_groups
(
query
,
provider
,
callback
)
{
...
...
ee/app/assets/javascripts/approvers_select.js
View file @
6def9128
...
...
@@ -79,9 +79,9 @@ export default class ApproversSelect {
query
:
(
query
)
=>
{
const
fetchGroups
=
this
.
fetchGroups
(
query
.
term
);
const
fetchUsers
=
this
.
fetchUsers
(
query
.
term
);
return
$
.
when
(
fetchGroups
,
fetchUsers
).
then
((
groups
,
users
)
=>
{
return
Promise
.
all
([
fetchGroups
,
fetchUsers
]).
then
(([
groups
,
users
]
)
=>
{
const
data
=
{
results
:
groups
[
0
].
concat
(
users
[
0
]
),
results
:
groups
.
concat
(
users
),
};
return
query
.
callback
(
data
);
});
...
...
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