Skip to content

Commit

Permalink
Merge branch 'bug_24567/when_sorting_by_targeted_compliance_the_no_da…
Browse files Browse the repository at this point in the history
…ta_available_should_always_be_last_pr' into branches/rudder/8.1
  • Loading branch information
Jenkins CI committed Mar 25, 2024
2 parents 298a8be + c094a68 commit 98eee05
Showing 1 changed file with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,18 @@ getSortFunction model g1 g2 =
allComplianceValues = getAllComplianceValues c.complianceDetails
in
if ( allComplianceValues.okStatus.value + allComplianceValues.nonCompliant.value + allComplianceValues.error.value + allComplianceValues.unexpected.value + allComplianceValues.pending.value + allComplianceValues.reportsDisabled.value + allComplianceValues.noReport.value == 0 ) then
-1.0
-- We always want "No data available" to be at the bottom. see https://issues.rudder.io/issues/24567
if model.ui.groupFilters.tableFilters.sortOrder == Asc then
101.0
else
-1.0
else
c.compliance
Nothing -> -2.0
Nothing ->
if model.ui.groupFilters.tableFilters.sortOrder == Asc then
102.0
else
-2.0
groupGlobalCompliance g = getCompliance <| Maybe.map (.global) (getGroupCompliance model g.id)
groupTargetedCompliance g = getCompliance <| Maybe.map (.targeted) (getGroupCompliance model g.id)
order = case model.ui.groupFilters.tableFilters.sortBy of
Expand Down

0 comments on commit 98eee05

Please sign in to comment.