Skip to content

Fixed #1634 added support to custom search services and minor fixes#1664

Merged
MV88 merged 6 commits into
geosolutions-it:masterfrom
MV88:iss_1634_search_custom_service
Mar 31, 2017
Merged

Fixed #1634 added support to custom search services and minor fixes#1664
MV88 merged 6 commits into
geosolutions-it:masterfrom
MV88:iss_1634_search_custom_service

Conversation

@MV88

@MV88 MV88 commented Mar 30, 2017

Copy link
Copy Markdown
Contributor

Added also the support for geomService.
Fixed minor things.

@MV88 MV88 requested a review from offtherailz March 30, 2017 14:15
@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage decreased (-5.4%) to 71.707% when pulling 6e126f1 on MV88:iss_1634_search_custom_service into 405b8f0 on geosolutions-it:master.

Comment thread web/client/api/searchText.js Outdated
}, params))
.then( response => response.features );
},
bzVie: (searchText, {pathname, lang}) => {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a custom service. Please remove it from pull request

Comment thread web/client/api/searchText.js Outdated
return [];
});
},
bzCivico: (searchText, {pathname, item}) => {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this too

Comment thread web/client/epics/search.js Outdated
.mergeAll()
.scan( (oldRes, newRes) => [...oldRes, ...newRes].sort( (a, b) => get(b, "__PRIORITY__") - get(a, "__PRIORITY__") ) .slice(0, 15))
.map((results) => searchResultLoaded(results, false, services))
.map((results) => searchResultLoaded(results, false, API.Services))

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably API.Services is not needed

Comment thread web/client/epics/search.js Outdated
.then(
(response= []) => response.map(result => ({...result, __SERVICE__: service, __PRIORITY__: service.priority || 0}))
))
.retryWhen(errors => errors.delay(200).scan((count, err) => {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indent back, retryWhen is applied to the Observable, not to the service's promise

Comment thread web/client/epics/search.js Outdated
.switchMap(action => {
const item = action.item;
let itemSelectionStream = Rx.Observable.of(action.item)
// retrieve geometry from geomService or pass the item directly

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this comment is relative to the function code. Move inside the function

action$.ofType(TEXT_SEARCH_ITEM_SELECTED)
.switchMap(action => {
const item = action.item;
let itemSelectionStream = Rx.Observable.of(action.item)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can comment itemSelectionStream with something like :

// emits actions for zoom and marker add

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage decreased (-0.07%) to 77.014% when pulling 28ba27a on MV88:iss_1634_search_custom_service into 405b8f0 on geosolutions-it:master.

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage decreased (-5.3%) to 71.827% when pulling afdc3cd on MV88:iss_1634_search_custom_service into 405b8f0 on geosolutions-it:master.

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.03%) to 77.122% when pulling 37bb493 on MV88:iss_1634_search_custom_service into 405b8f0 on geosolutions-it:master.

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.02%) to 77.112% when pulling 1ad2e3a on MV88:iss_1634_search_custom_service into 405b8f0 on geosolutions-it:master.

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.02%) to 77.112% when pulling 91553ae on MV88:iss_1634_search_custom_service into 405b8f0 on geosolutions-it:master.

@MV88 MV88 merged commit 966c6a5 into geosolutions-it:master Mar 31, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants