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 react websockets implementation #13334

Merged
merged 2 commits into from
Dec 21, 2020
Merged

Conversation

ruddell
Copy link
Member

@ruddell ruddell commented Dec 19, 2020

  • add location hook to Routes component to send router location on change
  • export sendActivity to enabling sending path from location hook
  • only subscribe to tracker endpoint when user is an admin
  • disconnect and unsubscribe on logout

Fix #12729

Please make sure the below checklist is followed for Pull Requests.

add location hook to Routes component to send router location on change
export sendActivity to enabling sending path from location hook
only subscribe to tracker endpoint when user is an admin
disconnect and unsubscribe on logout

Fix jhipster#12729
@pascalgrimaud
Copy link
Member

@ruddell : if you feel confident, plz go ahead and merge it. So it will be included for JH v7 beta

@@ -39,6 +39,9 @@ import PrivateRoute from 'app/shared/auth/private-route';
import ErrorBoundaryRoute from 'app/shared/error/error-boundary-route';
import PageNotFound from 'app/shared/error/page-not-found';
import { AUTHORITIES } from 'app/config/constants';
<%_ if (websocket === 'spring-websocket') { _%>
import { sendActivity } from "app/config/websocket-middleware";
Copy link
Contributor

Choose a reason for hiding this comment

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

+ 'app/config/websocket-middleware'
- "app/config/websocket-middleware"

🙂

@ruddell ruddell merged commit c7669c3 into jhipster:main Dec 21, 2020
@ruddell ruddell deleted the fix-react-websockets branch December 21, 2020 02:58
@ruddell
Copy link
Member Author

ruddell commented Dec 21, 2020

@pascalgrimaud
Copy link
Member

@ruddell : approved

@pascalgrimaud pascalgrimaud added this to the 7.0.0-beta.0 milestone Dec 21, 2020
@pascalgrimaud
Copy link
Member

pascalgrimaud commented Dec 21, 2020

I restarted the daily builds for React, and it seems not working with Protractor e2e and prod profile:

ruddell added a commit to ruddell/generator-jhipster that referenced this pull request Dec 21, 2020
ruddell added a commit to ruddell/generator-jhipster that referenced this pull request Dec 21, 2020
also remove unused onhashchange method

related to jhipster#13334
ruddell added a commit that referenced this pull request Dec 21, 2020
also remove unused onhashchange method

related to #13334
coderguy-tech pushed a commit to coderguy-tech/generator-jhipster that referenced this pull request Jun 1, 2021
also remove unused onhashchange method

related to jhipster#13334
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants