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
d66b7003
Commit
d66b7003
authored
Mar 01, 2018
by
Kushal Pandya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update init config for group and groupAncestor support
parent
45ca7722
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
21 deletions
+12
-21
app/assets/javascripts/filtered_search/filtered_search_dropdown_manager.js
...ripts/filtered_search/filtered_search_dropdown_manager.js
+12
-14
app/assets/javascripts/pages/search/init_filtered_search.js
app/assets/javascripts/pages/search/init_filtered_search.js
+0
-7
No files found.
app/assets/javascripts/filtered_search/filtered_search_dropdown_manager.js
View file @
d66b7003
...
...
@@ -24,12 +24,8 @@ export default class FilteredSearchDropdownManager {
this
.
filteredSearchTokenKeys
=
filteredSearchTokenKeys
||
FilteredSearchTokenKeys
;
this
.
filteredSearchInput
=
this
.
container
.
querySelector
(
'
.filtered-search
'
);
this
.
page
=
page
;
<<<<<<<
HEAD
this
.
groupsOnly
=
page
===
'
boards
'
&&
isGroup
;
=======
this
.
groupsOnly
=
isGroup
;
this
.
groupAncestor
=
isGroupAncestor
;
>>>>>>>
upstream
/
master
this
.
setupMapping
();
...
...
@@ -72,11 +68,7 @@ export default class FilteredSearchDropdownManager {
reference
:
null
,
gl
:
DropdownNonUser
,
extraArguments
:
{
<<<<<<<
HEAD
endpoint
:
`
${
this
.
baseEndpoint
}
/milestones.json
${
this
.
groupsOnly
?
'
?only_group_milestones=true
'
:
''
}
`
,
=======
endpoint
:
this
.
getMilestoneEndpoint
(),
>>>>>>>
upstream
/
master
symbol
:
'
%
'
,
},
element
:
this
.
container
.
querySelector
(
'
#js-dropdown-milestone
'
),
...
...
@@ -85,11 +77,7 @@ export default class FilteredSearchDropdownManager {
reference
:
null
,
gl
:
DropdownNonUser
,
extraArguments
:
{
<<<<<<<
HEAD
endpoint
:
`
${
this
.
baseEndpoint
}
/labels.json
${
this
.
groupsOnly
?
'
?only_group_labels=true
'
:
''
}
`
,
=======
endpoint
:
this
.
getLabelsEndpoint
(),
>>>>>>>
upstream
/
master
symbol
:
'
~
'
,
preprocessing
:
DropdownUtils
.
duplicateLabelPreprocessing
,
},
...
...
@@ -117,13 +105,23 @@ export default class FilteredSearchDropdownManager {
}
getMilestoneEndpoint
()
{
const
endpoint
=
`
${
this
.
baseEndpoint
}
/milestones.json`
;
let
endpoint
=
`
${
this
.
baseEndpoint
}
/milestones.json`
;
// EE-only
if
(
this
.
groupsOnly
)
{
endpoint
=
`
${
endpoint
}
?only_group_milestones=true`
;
}
return
endpoint
;
}
getLabelsEndpoint
()
{
const
endpoint
=
`
${
this
.
baseEndpoint
}
/labels.json`
;
let
endpoint
=
`
${
this
.
baseEndpoint
}
/labels.json`
;
// EE-only
if
(
this
.
groupsOnly
)
{
endpoint
=
`
${
endpoint
}
?only_group_labels=true`
;
}
return
endpoint
;
}
...
...
app/assets/javascripts/pages/search/init_filtered_search.js
View file @
d66b7003
import
FilteredSearchManager
from
'
~/filtered_search/filtered_search_manager
'
;
<<<<<<<
HEAD
export
default
({
page
,
filteredSearchTokenKeys
,
stateFiltersSelector
})
=>
{
=======
export
default
({
page
,
filteredSearchTokenKeys
,
...
...
@@ -10,16 +7,12 @@ export default ({
isGroupAncestor
,
stateFiltersSelector
,
})
=>
{
>>>>>>>
upstream
/
master
const
filteredSearchEnabled
=
FilteredSearchManager
&&
document
.
querySelector
(
'
.filtered-search
'
);
if
(
filteredSearchEnabled
)
{
const
filteredSearchManager
=
new
FilteredSearchManager
({
page
,
<<<<<<<
HEAD
=======
isGroup
,
isGroupAncestor
,
>>>>>>>
upstream
/
master
filteredSearchTokenKeys
,
stateFiltersSelector
,
});
...
...
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