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

Initial load graph or mesh on componentDidMount #7368

Merged
merged 1 commit into from
May 22, 2024

Conversation

ferhoyos
Copy link
Contributor

Describe the change

The initial loading of the mesh and graph data is performed in the componentDidUpdate method to ensure that everything is set before the mesh loads. The issue is that the componentDidUpdate method is not called in OSSMC during the initial mesh load, so the page displays the Loading message until the user performs an action that triggers the componentDidUpdate method.

image

This PR also sets some missing redux properties in the mesh page and fix lint issues.

Steps to test the PR

This PR only affects OSSMC. Kiali standalone should work as usual.

Automation testing

N/A

Issue reference

kiali/openshift-servicemesh-plugin#308

@ferhoyos ferhoyos added the test: n/a PR does not need test additions or updates label May 20, 2024
@ferhoyos ferhoyos requested a review from jshaughn May 20, 2024 15:02
@ferhoyos ferhoyos self-assigned this May 20, 2024
jshaughn
jshaughn previously approved these changes May 21, 2024
Copy link
Collaborator

@jshaughn jshaughn left a comment

Choose a reason for hiding this comment

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

The old setTimeout() to 0 trick again! I wish I had known/thought of that in the past, clean and solves lots of various problems :-) Tested, seems to work well without the need for the isInitialLoad hack.

@ferhoyos
Copy link
Contributor Author

Yes, it is a very useful trick to have in your UI development toolset :-)

Copy link
Collaborator

@jshaughn jshaughn left a comment

Choose a reason for hiding this comment

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

Re-approving

@jshaughn jshaughn merged commit 0feab76 into kiali:master May 22, 2024
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test: n/a PR does not need test additions or updates
Projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants