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

chore(agent): use notification message to patch template table #708

Merged
merged 2 commits into from
Dec 2, 2022

Conversation

tthvo
Copy link
Member

@tthvo tthvo commented Dec 2, 2022

Welcome to Cryostat! 👋

Before contributing, make sure you have:

  • Read the contributing guidelines
  • Linked a relevant issue which this PR resolves
  • Linked any other relevant issues, PR's, or documentation, if any
  • Resolved all conflicts, if any
  • Rebased your branch PR on top of the latest upstream main branch
  • Attached at least one of the following labels to the PR: [chore, ci, docs, feat, fix, test]
  • Signed the last commit: git commit --amend --signoff

Fixes: #586
Depends on https://github.com/cryostatio/cryostat/pull/1273

Description of the change:

This change clean up notification handling in the AgenTemplate table to use notification message and patch the table without refreshing.

Motivation for the change:

  • Avoid unncessary api requests and allow smoother UI.
  • Upload modal is uncessarily unmounted due to refeshing causes loading view to render. This fix will avoid this, allowing the modal to keep local states (to display failed files).

How to manually test:

  1. Start the backend with latest changes from https://github.com/cryostatio/cryostat/pull/1273. For example:
    $ CRYOSTAT_IMAGE=ghcr.io/cryostatio/cryostat:pr-1273-254d0939d87cfa7940d734311b06d959f58d7cdc sh smoketest.sh
    
  2. Delete or add templates.
  3. All functionality should remain the same.
  4. UI should not enter loading state if agent-template-related notifications are received.

Signed-off-by: Thuan Vo <thvo@redhat.com>
@tthvo tthvo added the chore Refactor, rename, cleanup, etc. label Dec 2, 2022
@github-actions github-actions bot removed the dependent label Dec 2, 2022
@github-actions
Copy link

github-actions bot commented Dec 2, 2022

This PR/issue depends on:

Copy link
Member

@maxcao13 maxcao13 left a comment

Choose a reason for hiding this comment

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

Looks good, renders nicely and notification handles correctly. :)

@andrewazores andrewazores merged commit d4b8ae1 into cryostatio:main Dec 2, 2022
@tthvo tthvo deleted the clean-agent-notification branch December 2, 2022 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Refactor, rename, cleanup, etc.
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[Task] Agent UI should avoid querying backend on notifications
3 participants