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 #24567: when sorting by targeted compliance, the No data available should always be last #5523

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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