Skip to content

Commit

Permalink
fix(RHINENG-15212): Make rule expand work SystemDetails (#2329)
Browse files Browse the repository at this point in the history
  • Loading branch information
LightOfHeaven1994 authored Jan 9, 2025
1 parent 8c1a625 commit 3096b55
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/PresentationalComponents/RulesTable/RulesTableRest.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ const RulesTable = ({
setRuleValues,
ruleValues,
valueDefinitions,
skipValueDefinitions,
onRuleValueReset,
DedicatedAction,
onValueOverrideSave,
Expand Down Expand Up @@ -81,9 +82,11 @@ const RulesTable = ({
ruleValues: ruleRuleValues,
};

return valueDefinitions === undefined ||
valueDefinitions.loading === true ||
valueDefinitions.data === undefined ? (
return (skipValueDefinitions === undefined ||
skipValueDefinitions === false) &&
(valueDefinitions === undefined ||
valueDefinitions.loading === true ||
valueDefinitions.data === undefined) ? (
<List />
) : (
<RuleDetailsRow
Expand Down Expand Up @@ -181,6 +184,7 @@ RulesTable.propTypes = {
data: propTypes.any,
loading: propTypes.bool.isRequired,
}),
skipValueDefinitions: propTypes.bool,
onValueOverrideSave: propTypes.func,
onSelect: propTypes.oneOf([propTypes.func, propTypes.bool]),
total: propTypes.number,
Expand Down
1 change: 1 addition & 0 deletions src/SmartComponents/SystemDetails/RuleResults.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ const RuleResults = ({ reportTestResult }) => {
onSelect={true}
remediationsEnabled
reportTestResult={reportTestResult}
skipValueDefinitions={true}
// TODO: provide ruleTree
// TODO: hide passed rules by default
/>
Expand Down

0 comments on commit 3096b55

Please sign in to comment.