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

feat(eventtemplates): enable custom event template UI to display when no target is selected #1498

Merged
merged 6 commits into from
Dec 11, 2024

Conversation

andrewazores
Copy link
Member

@andrewazores andrewazores commented Dec 5, 2024

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 all commits using a GPG signature

To recreate commits with GPG signature git fetch upstream && git rebase --force --gpg-sign upstream/main


Related to #225

Description of the change:

  1. Allows the Event Templates view to be displayed even when there is no target selected. This allows the user to view, add, or remove Custom Event Templates without needing to select a target - particularly useful when there aren't any targets currently discovered.
  2. Similarly, the Agent Probe Templates view is displayed when there is no target selected.
  3. Fixes a similar bug on the Automated Rule creation form where the event template selections were limited to the set intersection of those available on the matched targets. If there were no matched targets (including if no targets are discovered), then the event template list would be empty. Now, if there are no matched targets, the non-target event template list (ie the custom templates, and the upcoming preset templates) will be provided as options.
  4. Fixes an API V4 bug (oversight) where custom event templates cannot be uploaded

How to manually test:

  1. Build and run Cryostat with this PR
  2. Go to Events view
  3. Do not select a Target
  4. Ensure that Event Templates and Agent Probe Templates views are visible, and that templates can be listed/added/removed from each
  5. Select a Target, creating one (localhost:0) if necessary
  6. Repeat step 4, and ensure that target-specific views (ex. Event Types) are now also interactable as normal

@andrewazores andrewazores added feat New feature or request safe-to-test labels Dec 5, 2024
@andrewazores andrewazores requested a review from a team December 5, 2024 15:43
@andrewazores andrewazores merged commit f0708be into cryostatio:main Dec 11, 2024
13 checks passed
@andrewazores andrewazores deleted the rules-templates branch December 11, 2024 20:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants