Uploaded image for project: 'Red Hat Advanced Cluster Security'
  1. Red Hat Advanced Cluster Security
  2. ROX-33429

Remove redundant Entity Type filter in violations page Full view

    • Icon: Story Story
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • None
    • UI
    • Rox Sprint 4.11C

      The getFilteredWorkflowViewSearchFilter function in ViolationsTablePage.tsx passes all 5 EntityType enum values (UNSET, DEPLOYMENT, CONTAINER_IMAGE, RESOURCE, NODE) for the Full view case. Since this matches the exhaustive proto enum (storage.ListAlert.EntityType), it is equivalent to no filter at all.

      Returning {} for Full view would be simpler and more future-proof – if a new entity type is added to the proto, an explicit list would accidentally exclude it from Full view until manually updated, while an empty filter would automatically include it.

      However, the filter value is also passed as additionalContextFilter to the CompoundSearchFilter autocomplete component, which uses it to scope search suggestions. Removing the Entity Type filter for Full view could change autocomplete behavior and needs verification.

      Investigation needed:
        - Confirm that removing Entity Type from the Full view filter does not break autocomplete suggestions
        - If safe, return {} for the Full view case
        - Consider whether ViolationsTableSearchFilter.tsx can be simplified as a result

      Follow-up from PR #19223 review feedback.

              schaudhr Saif Chaudhry
              schaudhr Saif Chaudhry
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: