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
56ebcbb9
Commit
56ebcbb9
authored
Aug 20, 2018
by
Winnie Hellmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resolve conflict in app/assets/javascripts/pages/groups/issues/index.js
parent
1191b0f2
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
50 additions
and
112 deletions
+50
-112
app/assets/javascripts/filtered_search/issues_filtered_search_token_keys.js
...ipts/filtered_search/issues_filtered_search_token_keys.js
+3
-3
app/assets/javascripts/pages/groups/issues/index.js
app/assets/javascripts/pages/groups/issues/index.js
+2
-7
ee/app/assets/javascripts/filtered_search/filtered_search_token_keys_issues.js
...ipts/filtered_search/filtered_search_token_keys_issues.js
+0
-102
ee/app/assets/javascripts/filtered_search/issues_filtered_search_token_keys.js
...ipts/filtered_search/issues_filtered_search_token_keys.js
+45
-0
No files found.
app/assets/javascripts/filtered_search/issues_filtered_search_token_keys.js
View file @
56ebcbb9
import
FilteredSearchTokenKeys
from
'
./filtered_search_token_keys
'
;
import
FilteredSearchTokenKeys
from
'
./filtered_search_token_keys
'
;
const
tokenKeys
=
[{
export
const
tokenKeys
=
[{
key
:
'
author
'
,
key
:
'
author
'
,
type
:
'
string
'
,
type
:
'
string
'
,
param
:
'
username
'
,
param
:
'
username
'
,
...
@@ -42,14 +42,14 @@ if (gon.current_user_id) {
...
@@ -42,14 +42,14 @@ if (gon.current_user_id) {
});
});
}
}
const
alternativeTokenKeys
=
[{
export
const
alternativeTokenKeys
=
[{
key
:
'
label
'
,
key
:
'
label
'
,
type
:
'
string
'
,
type
:
'
string
'
,
param
:
'
name
'
,
param
:
'
name
'
,
symbol
:
'
~
'
,
symbol
:
'
~
'
,
}];
}];
const
conditions
=
[{
export
const
conditions
=
[{
url
:
'
assignee_id=0
'
,
url
:
'
assignee_id=0
'
,
tokenKey
:
'
assignee
'
,
tokenKey
:
'
assignee
'
,
value
:
'
none
'
,
value
:
'
none
'
,
...
...
app/assets/javascripts/pages/groups/issues/index.js
View file @
56ebcbb9
import
projectSelect
from
'
~/project_select
'
;
import
projectSelect
from
'
~/project_select
'
;
import
initFilteredSearch
from
'
~/pages/search/init_filtered_search
'
;
import
initFilteredSearch
from
'
~/pages/search/init_filtered_search
'
;
import
{
FILTERED_SEARCH
}
from
'
~/pages/constants
'
;
import
{
FILTERED_SEARCH
}
from
'
~/pages/constants
'
;
<<<<<<<
HEAD
import
IssuesFilteredSearchTokenKeysEE
from
'
ee/filtered_search/issues_filtered_search_token_keys
'
;
import
FilteredSearchTokenKeysIssues
from
'
ee/filtered_search/filtered_search_token_keys_issues
'
;
=======
import
IssuesFilteredSearchTokenKeys
from
'
~/filtered_search/issues_filtered_search_token_keys
'
;
>>>>>>>
d4387d88767
...
make
FilteredSearchTokenKeys
generic
document
.
addEventListener
(
'
DOMContentLoaded
'
,
()
=>
{
document
.
addEventListener
(
'
DOMContentLoaded
'
,
()
=>
{
initFilteredSearch
({
initFilteredSearch
({
page
:
FILTERED_SEARCH
.
ISSUES
,
page
:
FILTERED_SEARCH
.
ISSUES
,
filteredSearchTokenKeys
:
FilteredSearchTokenKeysIssues
,
isGroupDecendent
:
true
,
isGroupDecendent
:
true
,
filteredSearchTokenKeys
:
IssuesFilteredSearchTokenKeys
,
filteredSearchTokenKeys
:
IssuesFilteredSearchTokenKeys
EE
,
});
});
projectSelect
();
projectSelect
();
});
});
ee/app/assets/javascripts/filtered_search/filtered_search_token_keys_issues.js
deleted
100644 → 0
View file @
1191b0f2
import
FilteredSearchTokenKeys
from
'
~/filtered_search/filtered_search_token_keys
'
;
const
weightTokenKey
=
{
key
:
'
weight
'
,
type
:
'
string
'
,
param
:
''
,
symbol
:
''
,
icon
:
'
balance-scale
'
,
tag
:
'
number
'
,
};
const
weightConditions
=
[{
url
:
'
weight=None
'
,
tokenKey
:
'
weight
'
,
value
:
'
None
'
,
},
{
url
:
'
weight=Any
'
,
tokenKey
:
'
weight
'
,
value
:
'
Any
'
,
}];
const
alternativeTokenKeys
=
[{
key
:
'
assignee
'
,
type
:
'
string
'
,
param
:
'
username
'
,
symbol
:
'
@
'
,
}];
export
default
class
FilteredSearchTokenKeysIssues
extends
FilteredSearchTokenKeys
{
static
init
(
availableFeatures
)
{
this
.
availableFeatures
=
availableFeatures
;
}
static
get
()
{
const
tokenKeys
=
Array
.
from
(
super
.
get
());
// Enable multiple assignees when available
if
(
this
.
availableFeatures
&&
this
.
availableFeatures
.
multipleAssignees
)
{
const
assigneeTokenKey
=
tokenKeys
.
find
(
tk
=>
tk
.
key
===
'
assignee
'
);
assigneeTokenKey
.
type
=
'
array
'
;
assigneeTokenKey
.
param
=
'
username[]
'
;
}
tokenKeys
.
push
(
weightTokenKey
);
return
tokenKeys
;
}
static
getKeys
()
{
const
tokenKeys
=
FilteredSearchTokenKeysIssues
.
get
();
return
tokenKeys
.
map
(
i
=>
i
.
key
);
}
static
getAlternatives
()
{
return
alternativeTokenKeys
.
concat
(
super
.
getAlternatives
());
}
static
getConditions
()
{
const
conditions
=
super
.
getConditions
();
return
conditions
.
concat
(
weightConditions
);
}
static
searchByKey
(
key
)
{
const
tokenKeys
=
FilteredSearchTokenKeysIssues
.
get
();
return
tokenKeys
.
find
(
tokenKey
=>
tokenKey
.
key
===
key
)
||
null
;
}
static
searchBySymbol
(
symbol
)
{
const
tokenKeys
=
FilteredSearchTokenKeysIssues
.
get
();
return
tokenKeys
.
find
(
tokenKey
=>
tokenKey
.
symbol
===
symbol
)
||
null
;
}
static
searchByKeyParam
(
keyParam
)
{
const
tokenKeys
=
FilteredSearchTokenKeysIssues
.
get
();
const
alternatives
=
FilteredSearchTokenKeysIssues
.
getAlternatives
();
const
tokenKeysWithAlternative
=
tokenKeys
.
concat
(
alternatives
);
return
tokenKeysWithAlternative
.
find
((
tokenKey
)
=>
{
let
tokenKeyParam
=
tokenKey
.
key
;
// Replace hyphen with underscore to compare keyParam with tokenKeyParam
// e.g. 'my-reaction' => 'my_reaction'
tokenKeyParam
=
tokenKeyParam
.
replace
(
'
-
'
,
'
_
'
);
if
(
tokenKey
.
param
)
{
tokenKeyParam
+=
`_
${
tokenKey
.
param
}
`
;
}
return
keyParam
===
tokenKeyParam
;
})
||
null
;
}
static
searchByConditionUrl
(
url
)
{
const
conditions
=
FilteredSearchTokenKeysIssues
.
getConditions
();
return
conditions
.
find
(
condition
=>
condition
.
url
===
url
)
||
null
;
}
static
searchByConditionKeyValue
(
key
,
value
)
{
const
conditions
=
FilteredSearchTokenKeysIssues
.
getConditions
();
return
conditions
.
find
(
condition
=>
condition
.
tokenKey
===
key
&&
condition
.
value
===
value
)
||
null
;
}
}
ee/app/assets/javascripts/filtered_search/issues_filtered_search_token_keys.js
0 → 100644
View file @
56ebcbb9
import
FilteredSearchTokenKeys
from
'
~/filtered_search/filtered_search_token_keys
'
;
import
{
tokenKeys
,
alternativeTokenKeys
,
conditions
,
}
from
'
~/filtered_search/issues_filtered_search_token_keys
'
;
const
weightTokenKey
=
{
key
:
'
weight
'
,
type
:
'
string
'
,
param
:
''
,
symbol
:
''
,
icon
:
'
balance-scale
'
,
tag
:
'
number
'
,
};
const
weightConditions
=
[
{
url
:
'
weight=None
'
,
tokenKey
:
'
weight
'
,
value
:
'
None
'
,
},
{
url
:
'
weight=Any
'
,
tokenKey
:
'
weight
'
,
value
:
'
Any
'
,
},
];
const
IssuesFilteredSearchTokenKeysEE
=
new
FilteredSearchTokenKeys
(
[...
tokenKeys
,
weightTokenKey
],
alternativeTokenKeys
,
[...
conditions
,
...
weightConditions
],
);
IssuesFilteredSearchTokenKeysEE
.
init
=
function
init
(
availableFeatures
)
{
// Enable multiple assignees when available
if
(
availableFeatures
&&
availableFeatures
.
multipleAssignees
)
{
const
assigneeTokenKey
=
this
.
tokenKeys
.
find
(
tk
=>
tk
.
key
===
'
assignee
'
);
assigneeTokenKey
.
type
=
'
array
'
;
assigneeTokenKey
.
param
=
'
username[]
'
;
}
};
export
default
IssuesFilteredSearchTokenKeysEE
;
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