-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(RHINENG-15537): Return back RuleResults export (#2354)
* feat(RHINENG-15537): Return back RuleResults export * fix(Export): Fixing issue & refactor * fix(ExportColumns): Correct columns on export * fix(Lint): Correct code with linter * fix(Export): Bugfix for rule state Co-authored-by: Michael Johnson <[email protected]> * fix(Export): Refactor --------- Co-authored-by: Michael Johnson <[email protected]>
- Loading branch information
1 parent
597bfea
commit 06c7c86
Showing
4 changed files
with
98 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,29 @@ | ||
import useComplianceQuery from './useComplianceQuery'; | ||
|
||
const convertToArray = (params) => { | ||
if (Array.isArray(params)) { | ||
return params; | ||
} else { | ||
const { testResultId, reportId, limit, offset, idsOnly, sortBy, filter } = | ||
params; | ||
|
||
return [ | ||
testResultId, | ||
reportId, | ||
undefined, // xRHIDENTITY | ||
limit, | ||
offset, | ||
idsOnly, | ||
sortBy, | ||
filter, | ||
]; | ||
} | ||
}; | ||
|
||
const useReportRuleResults = (options) => | ||
useComplianceQuery('reportRuleResults', options); | ||
useComplianceQuery('reportRuleResults', { | ||
...options, | ||
convertToArray, | ||
}); | ||
|
||
export default useReportRuleResults; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters