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 #23930: lost audit/enforce on the node compliance page #5281

Conversation

RaphaelGauthier
Copy link
Member

Copy link
Member

@fanf fanf left a comment

Choose a reason for hiding this comment

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

We can't go that way, it will be too costly. A better fashion would be to extend getNodeComplianceId to directly have the wanted information.

}
in
req

Copy link
Member

Choose a reason for hiding this comment

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

I don't think we want to do that. It will be extremely costly when the number of rules/directives growths, especially since we get all rules/directives, and not the ones for the node.

A better approach would be to extends getNodeComplianceId api to provide the compliance mode - and moreover, I'm pretty sure it's something that would be interesting to have in the public API too.

Copy link
Contributor

Choose a reason for hiding this comment

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

The API part is done here : https://github.com/Normation/rudder/pull/5308/files
You can change the decoder at the level of the RuleCompliance and DirectiveCompliance data types : just adding a policyMode field will do, it simplifies also a lot of things in this PR I guess 😄

@RaphaelGauthier
Copy link
Member Author

PR rebased

@RaphaelGauthier RaphaelGauthier force-pushed the bug_23930/lost_audit_enforce_on_the_node_compliance_page branch from fdc29d4 to 7ef3328 Compare January 5, 2024 14:49
@clarktsiory
Copy link
Contributor

PR updated with a new commit

@clarktsiory
Copy link
Contributor

PR rebased

@clarktsiory
Copy link
Contributor

I did the change :
image

@clarktsiory
Copy link
Contributor

Closing this PR, the fix is done in this other one : #5351

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