Skip to content

Commit

Permalink
use enum for status counts
Browse files Browse the repository at this point in the history
  • Loading branch information
manV committed Jul 15, 2024
1 parent 027070e commit 5e8ad3b
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions deepfence_frontend/apps/dashboard/src/queries/posture.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -524,11 +524,12 @@ export const postureQueries = createQueryKeys('posture', {
);

const cloudComplianceStatus = {
alarm: result.value.status_counts?.['alarm'] ?? 0,
info: result.value.status_counts?.['info'] ?? 0,
ok: result.value.status_counts?.['ok'] ?? 0,
skip: result.value.status_counts?.['skip'] ?? 0,
delete: result.value.status_counts?.['delete'] ?? 0,
alarm: result.value.status_counts?.[ModelCloudComplianceStatusEnum.Alarm] ?? 0,
info: result.value.status_counts?.[ModelCloudComplianceStatusEnum.Info] ?? 0,
ok: result.value.status_counts?.[ModelCloudComplianceStatusEnum.Ok] ?? 0,
skip: result.value.status_counts?.[ModelCloudComplianceStatusEnum.Skip] ?? 0,
delete:
result.value.status_counts?.[ModelCloudComplianceStatusEnum.Delete] ?? 0,
};

return {
Expand Down

0 comments on commit 5e8ad3b

Please sign in to comment.