-
Notifications
You must be signed in to change notification settings - Fork 58
feat(RHINENG-21983): Add 'Applies to OS' filter CVEs table #2439
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(RHINENG-21983): Add 'Applies to OS' filter CVEs table #2439
Conversation
Reviewer's GuideAdds an "Applies to OS" hierarchical filter to the IoP CVE list, wiring it to inventory-provided OS versions and exposing the new filter in the IoP environment configuration so it participates in the standard toolbar filtering system. Sequence diagram for Applies to OS filter loading and applicationsequenceDiagram
actor User
participant CveListTable
participant ReactQuery_useQuery as ReactQuery_useQuery
participant InventoryAPI
participant AppliesToOSFilterUtils
participant CVEBackend as CVE_API
User->>CveListTable: Open_IoP_CVEs_page
CveListTable->>ReactQuery_useQuery: useQuery(queryKey OsVersions, queryFn)
ReactQuery_useQuery->>InventoryAPI: GET /system_profile/operating_system
InventoryAPI-->>ReactQuery_useQuery: 200 OK results[value]
ReactQuery_useQuery-->>CveListTable: osVersionData
CveListTable->>AppliesToOSFilterUtils: convertOperatingSystemsToFilterGroupItems(version_values)
AppliesToOSFilterUtils-->>CveListTable: osVersionFilterItems
CveListTable->>CveListTable: Build_hierarchyFilter(urlParam rhel_version, groups osVersionFilterItems)
User->>CveListTable: Select_Applies_to_OS_value
CveListTable->>CVEBackend: Fetch_CVEs_with_param_rhel_version
CVEBackend-->>CveListTable: Filtered_CVEs
CveListTable-->>User: Render_filtered_CVE_table
Updated class diagram for CveListTable and IoP environment context filtersclassDiagram
class CveListTable {
+DEFAULT_PARAMS
+CveListTable()
+ENV_CONTEXT_FILTER_FILTER(filter)
+cvssMin
+cvssMax
+filters_including_rhel_version
}
class ReactQuery_useQuery {
+useQuery(options)
}
class Axios {
+get(url)
}
class AppliesToOSFilterUtils {
+convertOperatingSystemsToFilterGroupItems(versions)
}
class IOP_ENVIRONMENT_CONTEXT {
+cveList_title
+cveList_columns
+cveList_filters_including_rhel_version
+cveList_areColumnsManageable
+cveList_areParamsUrlBound
}
CveListTable ..> ReactQuery_useQuery : uses_for_OsVersions
CveListTable ..> Axios : fetches_os_versions
CveListTable ..> AppliesToOSFilterUtils : builds_Applies_to_OS_filter_groups
CveListTable ..> IOP_ENVIRONMENT_CONTEXT : obeys_filter_config_including_rhel_version
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
6001e67 to
b636ce3
Compare
b636ce3 to
8f51dea
Compare
8f51dea to
3f4ee7c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey there - I've reviewed your changes - here's some feedback:
- Consider including
envContext.apiPaths.inventory(or the full URL string) in theuseQueryqueryKeyso that if the inventory API path changes at runtime the OS versions query will refetch appropriately instead of reusing a stale cache entry. - You may want to guard
osVersionData?.data?.resultsor memoize theosVersionFilterItemswithuseMemoto avoid recomputing the filter groups on every render and to make the component more robust if the shape of the query data changes.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Consider including `envContext.apiPaths.inventory` (or the full URL string) in the `useQuery` `queryKey` so that if the inventory API path changes at runtime the OS versions query will refetch appropriately instead of reusing a stale cache entry.
- You may want to guard `osVersionData?.data?.results` or memoize the `osVersionFilterItems` with `useMemo` to avoid recomputing the filter groups on every render and to make the component more robust if the shape of the query data changes.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
bastilian
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome! Nice work! Thank you very much for implementing this @LightOfHeaven1994!
|
Referenced Jiras: |
Adding
Applies to OSfilter for CVEs page.How to test
Summary by Sourcery
Add OS applicability filtering and column updates to IoP vulnerability CVE views, adjust styling, and integrate Tekton build pipelines for the Satellite IoP frontend.
New Features:
Enhancements:
Build:
CI:
Summary by Sourcery
New Features: