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(jmx): populate credentials table via notification only #404

Merged
merged 1 commit into from
Apr 11, 2022

Conversation

jan-law
Copy link
Contributor

@jan-law jan-law commented Apr 11, 2022

Fixes #403

When credentials were added or deleted, both refreshStoredTargetsList and the notification subscriptions attempted to update the storedTargets list at the same time. When an item was deleted, the resulting storedTargets list became empty.

refreshStoredTargetsList should only be called on page refresh. Only notification subscriptions will update the table from now on. I also removed the state variable isEmpty and simply checked for storedTargets.length === 0.

Planning to add unit tests for this component in a separate PR.

remove redundant state var
fix target message filter
@jan-law jan-law added the fix label Apr 11, 2022
@jan-law jan-law requested a review from andrewazores April 11, 2022 19:05
@andrewazores andrewazores merged commit 507b10f into cryostatio:main Apr 11, 2022
andrewazores pushed a commit to andrewazores/cryostat-web that referenced this pull request Apr 12, 2022
…o#404)

remove redundant state var
fix target message filter
@jan-law jan-law deleted the credentials-table-refresh branch April 12, 2022 16:00
andrewazores added a commit that referenced this pull request Apr 12, 2022
remove redundant state var
fix target message filter

Co-authored-by: Janelle Law <jalaw@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

JMX credentials table renders empty view after deleting one item
2 participants