-
Notifications
You must be signed in to change notification settings - Fork 73
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 #22338: Refactor some code and changes API url for compliance by directive #4674
Conversation
.../sources/rudder/rudder-rest/src/main/scala/com/normation/rudder/rest/ApiDatastructures.scala
Outdated
Show resolved
Hide resolved
val z = implicitly[Line].value | ||
val description = "Get a directive's compliance to CSV format" | ||
val (action, path) = GET / "compliance" / "directives" / "export" / "{id}" | ||
val (action, path) = GET / "compliance" / "directives" / "{id}" |
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.
@VinceMacBuche you mentioned here that you will prefer this format: /compliance/directives/{id}?format=csv
I think it could be problematic because:
- the endpoint is the same as directive's compliance by ID, the two requests are the same for the webapp, since
?format=csv
is not defined in the endpoint definition but we capture it at the moment we received the request - the archive API use the format
/archives/export?object=robject_id
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.
Yes i meant that csv and json should be the same endpoint, with a default format value to be json. I made a second commit with refactoring
Commit modified |
69199ad
to
4664db2
Compare
PR updated with a new commit |
3 similar comments
PR updated with a new commit |
PR updated with a new commit |
PR updated with a new commit |
Commit modified |
2920bed
to
c36ee28
Compare
PR rebased |
c36ee28
to
1bf6f1a
Compare
1bf6f1a
to
e986730
Compare
…y directive fixup! Fixes #22338: Refactor some code and changes API url for compliance by directive Fixes #22338: Refactor some code and changes API url for compliance by directive
e986730
to
abe64ee
Compare
OK, merging this PR |
precision.getOrElse(CompliancePrecision.Level2) | ||
) // by default, all details are displayed | ||
val t4 = System.currentTimeMillis | ||
TimingDebugLogger.trace(s"API DirectiveCompliance - serialize to json in ${t4 - t3} ms") |
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.
I have 5,5s on this part to show compliance per directive on load platform
https://issues.rudder.io/issues/22338