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

Fixes #23926: Display group compliance #5290

Conversation

clarktsiory
Copy link
Contributor

@clarktsiory clarktsiory commented Dec 26, 2023

https://issues.rudder.io/issues/23926

Creates an Elm app for display of compliance by group (I copied most of the app structure from directives).
It also changes a bit of Scala frontend code in the summary page of a group, which therefore uses javascript to display compliance (this page has not been rewritten in Elm yet).

There is also some change in the Scala backend to add the policy mode of a rule and a node to the API response.

The 'global' and 'targeted' compliance is specific to groups, and it can be seen as filters for the rules and nodes displayed in the compliance tree :
image
When the filter value is changed (e.g. from 'global' to 'targeted'), I made the compliance table display in "reload" state until the new compliance data is fetched, as it may take some time for the new data to be shown.

@clarktsiory clarktsiory marked this pull request as draft December 26, 2023 17:52
[ div [class "d-inline-flex align-items-baseline pb-3 w-25"]
[
div [class "btn-group yesno"]
[ label [class ("btn btn-default" ++ if isGlobalMode then " active" else ""), style "box-shadow" (if isGlobalMode then "inset 0 3px 5px rgba(0,0,0,.125)" else "none"), onClick (LoadCompliance GlobalCompliance)]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The styling is done "by-hand" here for testing, it is currently broken since the bootstrap 5 migration, the shadow is no longer present when the button is active...

(This should be fixed globally in another PR)

@clarktsiory clarktsiory force-pushed the ust_23926/display_group_compliance branch 2 times, most recently from c01ec26 to e2f5516 Compare December 29, 2023 09:39
@clarktsiory
Copy link
Contributor Author

PR updated with a new commit

@clarktsiory clarktsiory marked this pull request as ready for review December 29, 2023 09:40
@clarktsiory clarktsiory marked this pull request as draft December 29, 2023 09:53
@clarktsiory
Copy link
Contributor Author

PR updated with a new commit

@clarktsiory clarktsiory force-pushed the ust_23926/display_group_compliance branch from 6fac1e6 to 4b03764 Compare December 29, 2023 13:26
@clarktsiory clarktsiory marked this pull request as ready for review December 29, 2023 13:26
@Normation-Quality-Assistant
Copy link
Contributor

OK, merging this PR

@Normation-Quality-Assistant Normation-Quality-Assistant merged commit 4b03764 into Normation:master Dec 30, 2023
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants