Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
minerva
core
Commits
63fcb64e
Commit
63fcb64e
authored
Feb 05, 2018
by
Piotr Gawron
Browse files
default max count of search results is used in api calls when value is undefined
parent
2a8d3c2b
Changes
6
Hide whitespace changes
Inline
Side-by-side
frontend-js/src/main/js/ConfigurationType.js
View file @
63fcb64e
...
...
@@ -11,6 +11,7 @@ var ConfigurationType = {
REQUEST_ACCOUNT_EMAIL
:
"
REQUEST_ACCOUNT_EMAIL
"
,
SIMPLE_COLOR_VAL
:
"
SIMPLE_COLOR_VAL
"
,
SEARCH_DISTANCE
:
"
SEARCH_DISTANCE
"
,
SEARCH_RESULT_NUMBER
:
"
SEARCH_RESULT_NUMBER
"
,
USER_MANUAL_FILE
:
"
USER_MANUAL_FILE
"
,
};
...
...
frontend-js/src/main/js/ServerConnector.js
View file @
63fcb64e
...
...
@@ -999,6 +999,13 @@ ServerConnector.getElementsByQuery = function (params) {
return
self
.
getProjectId
(
params
.
projectId
).
then
(
function
(
result
)
{
queryParams
.
projectId
=
result
;
return
self
.
getConfigurationParam
(
ConfigurationType
.
SEARCH_RESULT_NUMBER
);
}).
then
(
function
(
defaultCount
)
{
if
(
params
.
count
!==
undefined
)
{
filterParams
.
count
=
params
.
count
;
}
else
{
filterParams
.
count
=
defaultCount
;
}
return
self
.
readFile
(
self
.
getSearchUrl
(
queryParams
,
filterParams
));
}).
then
(
function
(
content
)
{
var
array
=
JSON
.
parse
(
content
);
...
...
frontend-js/testFiles/apiCalls/projects/sample/models/all/bioEntities.search/perfectMatch=false&query=s1&token=MOCK_TOKEN_ID&
→
frontend-js/testFiles/apiCalls/projects/sample/models/all/bioEntities.search/
count=100&
perfectMatch=false&query=s1&token=MOCK_TOKEN_ID&
View file @
63fcb64e
File moved
frontend-js/testFiles/apiCalls/projects/sample/models/all/bioEntities.search/perfectMatch=true&query=s1&token=MOCK_TOKEN_ID&
→
frontend-js/testFiles/apiCalls/projects/sample/models/all/bioEntities.search/
count=100&
perfectMatch=true&query=s1&token=MOCK_TOKEN_ID&
View file @
63fcb64e
File moved
frontend-js/testFiles/apiCalls/projects/sample/models/all/bioEntities.search/query=s1&token=MOCK_TOKEN_ID&
→
frontend-js/testFiles/apiCalls/projects/sample/models/all/bioEntities.search/
count=100&
query=s1&token=MOCK_TOKEN_ID&
View file @
63fcb64e
File moved
frontend-js/testFiles/apiCalls/projects/sample/models/all/bioEntities.search/token=MOCK_TOKEN_ID&
→
frontend-js/testFiles/apiCalls/projects/sample/models/all/bioEntities.search/
count=100&
token=MOCK_TOKEN_ID&
View file @
63fcb64e
File moved
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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