Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #2031 Trigger notification if a map is an old one asking for updating it #2039

Merged
merged 8 commits into from
Jul 27, 2017

Conversation

allyoucanmap
Copy link
Contributor

See #2031
Added AutoMapUpdate plugin

@coveralls
Copy link

Coverage Status

Coverage increased (+0.04%) to 79.953% when pulling 10b7fff on allyoucanmap:refresh-notification into be0f21b on geosolutions-it:master.

* @memberof actions.notifications
* @returns {object} action
*/
function dispatchAction(action) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Are you sure this is needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, it's needed because we need to send custom action when the notification button has been toggled

@@ -0,0 +1,51 @@
const PropTypes = require('prop-types');
Copy link
Contributor

Choose a reason for hiding this comment

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

For new files, let's move this in the right place, please.

};
};
const action = dispatchAction(customAction);
expect(action().type).toBe('CUSTOM_ACTION');
Copy link
Member

Choose a reason for hiding this comment

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

pass simple object. The thunks will be removed in the next future.

return (dispatch) => {
AuthenticationAPI.login(username, password).then((response) => {
return (dispatch, state) => {
return AuthenticationAPI.login(username, password).then((response) => {
Copy link
Member

Choose a reason for hiding this comment

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

This refreshes can go easily in an epic. Doing it here can cause unwanted side effects.

You should monitor the login/logout actions to reload MapInfo, until you change page.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.06%) to 79.983% when pulling 95b8140 on allyoucanmap:refresh-notification into be0f21b on geosolutions-it:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.06%) to 79.995% when pulling c528849 on allyoucanmap:refresh-notification into 0c8b889 on geosolutions-it:master.

const canEdit = mapInfoLoaded.info && mapInfoLoaded.info.canEdit || false;
let layers = mapConfigLoaded.config && mapConfigLoaded.config.map && mapConfigLoaded.config.map.layers && mapConfigLoaded.config.map.layers.filter((l) => l.type === 'wms' && l.group !== 'background') || [];
const options = {bbox: true, search: true, dimensions: true, title: true};
return version < 2 && canEdit ?
Copy link
Contributor

Choose a reason for hiding this comment

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

change title to false

@coveralls
Copy link

Coverage Status

Coverage increased (+0.06%) to 79.995% when pulling 607dc51 on allyoucanmap:refresh-notification into 0c8b889 on geosolutions-it:master.

@coveralls
Copy link

coveralls commented Jul 20, 2017

Coverage Status

Coverage increased (+0.08%) to 80.023% when pulling 32f9105 on allyoucanmap:refresh-notification into 0c8b889 on geosolutions-it:master.

@mbarto mbarto merged commit cda33c9 into geosolutions-it:master Jul 27, 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.

6 participants