rancher / kubewarden-ui

Kubewarden's User Interface
Apache License 2.0
11 stars 13 forks source link

Store and filter ClusterPolicyReports for project/namespaces #708

Closed jordojordo closed 3 months ago

jordojordo commented 3 months ago

Fix #659 Fix #707

ClusterPolicyReports (clusterpolicyreports.wgpolicyk8s.io) will now be fetched and displayed when on the project/namespace list view and a within Namespace compliance tab. These will not be fetched for any other resource.

Cluster Compliance column

clustercompliance-column

Compliance tab for Namespace detail

clustercompliance-tab-ns

kravciak commented 3 months ago

One other note, it was confusing for me at first glance why we have Cluster Compliance and Compliance columns. What do you think about displaying aggregate for both under Compliance column and display details only when user opens namespace?

...just an idea, keep your solution if you prefer it

jordojordo commented 3 months ago

@kravciak I felt the same about having two columns, some UX concerns led me in this direction but perhaps it would be better to try with one column and change it if people ask.

jordojordo commented 3 months ago

I removed the "Cluster Compliance" column and combined the two reports into one:

compliance-concat

kravciak commented 3 months ago

About my problem in https://github.com/rancher/kubewarden-ui/pull/708#pullrequestreview-2032024074, I found out that log was pointing to policy that did not exist anymore (reports are not deleted when policy does not exist). I will try more on thursday, this seems like backend issue.