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(event-templates): should update template selection when template list updates #1003

Merged
merged 1 commit into from
May 2, 2023

Conversation

tthvo
Copy link
Member

@tthvo tthvo commented May 1, 2023

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: #1002

Description of the change:

Whenever the template list changes, check with current template selection. If contained, do nothing. Otherwise, remove the selection.

Also, move TargetSelect and SelectTemplateSelectorForm to @app/Shared since they are pretty by themselves in their directory.

Motivation for the change:

See #1002

How to manually test:

  1. Run CRYOSTAT_IMAGE=quay.io... sh smoketest.sh...
  2. Go to Rules. Click Create.
  3. Enter a match expression that matches some targets. Select a template. Now, enter another match expression.
  4. Notice the template selection will update as expected (not contained -> reset; contained -> do nothing).

@tthvo tthvo added chore Refactor, rename, cleanup, etc. fix backport labels May 1, 2023
@mergify mergify bot added the safe-to-test label May 1, 2023
@github-actions
Copy link

github-actions bot commented May 1, 2023

Test image available:

CRYOSTAT_IMAGE=ghcr.io/cryostatio/cryostat-web:pr-1003-13faa49a0386e619ffe632563dc5a1e6264a3f17 sh smoketest.sh

@tthvo tthvo requested review from andrewazores and maxcao13 May 1, 2023 23:03
@tthvo tthvo marked this pull request as draft May 1, 2023 23:12
@tthvo tthvo changed the title fix(rules): should update template selection when template list updates fix(event-templates): should update template selection when template list updates May 1, 2023
@github-actions
Copy link

github-actions bot commented May 2, 2023

Test image available:

CRYOSTAT_IMAGE=ghcr.io/cryostatio/cryostat-web:pr-1003-bbb6964037e50f3833acde2342817b9b56200342 sh smoketest.sh

@github-actions
Copy link

github-actions bot commented May 2, 2023

Test image available:

CRYOSTAT_IMAGE=ghcr.io/cryostatio/cryostat-web:pr-1003-988d262de7fe083ca9e60eae258fd7d2fe3861b5 sh smoketest.sh

@tthvo tthvo force-pushed the rule-template-sel branch from 988d262 to 4c1a7ac Compare May 2, 2023 02:12
@tthvo tthvo marked this pull request as ready for review May 2, 2023 02:13
@tthvo
Copy link
Member Author

tthvo commented May 2, 2023

Ready to review! This ensures the event template selection is synced with template list. However, there is an issue with AA config setting since it saves to local storage. This will be addressed in #1006 (might need a new UI design to separate display from setting form).

Screenshot from 2023-05-01 21-46-48

@github-actions
Copy link

github-actions bot commented May 2, 2023

Test image available:

CRYOSTAT_IMAGE=ghcr.io/cryostatio/cryostat-web:pr-1003-4c1a7aca891e81da1ef5af0427a34312ef360f71 sh smoketest.sh

@andrewazores andrewazores merged commit a687e9f into cryostatio:main May 2, 2023
mergify bot pushed a commit that referenced this pull request May 2, 2023
andrewazores pushed a commit that referenced this pull request May 2, 2023
…list updates (#1003) (#1007)

(cherry picked from commit a687e9f)

Co-authored-by: Thuan Vo <thvo@redhat.com>
@tthvo tthvo deleted the rule-template-sel branch May 2, 2023 20:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport chore Refactor, rename, cleanup, etc. fix safe-to-test
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[Bug] Outdated template selection when template list updates
2 participants