Skip to content

Commit

Permalink
fix composer
Browse files Browse the repository at this point in the history
  • Loading branch information
ab-smith committed Aug 29, 2024
1 parent 0a498bf commit b051b88
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
7 changes: 4 additions & 3 deletions backend/core/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,10 @@ def flatten_dict(

STATUS_COLOR_MAP = { # TODO: Move these kinds of color maps to frontend
"undefined": "#CCC",
"planned": "#BFDBFE",
"--": "#CCC",
"to_do": "#BFDBFE",
"active": "#46D39A",
"inactive": "#E55759",
"deprecated": "#E55759",
"in_progress": "#5470c6",
"in_review": "#BBF7D0",
"done": "#46D39A",
Expand Down Expand Up @@ -913,7 +914,7 @@ def compile_risk_assessment_for_composer(user, risk_assessment_list: list):

values = list()
labels = list()

# WARNING: this is wrong - FIX ME because we compute the controls multiple times if used accross multiple scenarios
for st in AppliedControl.Status.choices:
count = (
AppliedControl.objects.filter(status=st[0])
Expand Down
2 changes: 1 addition & 1 deletion backend/core/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1190,8 +1190,8 @@ class AppliedControl(NameDescriptionMixin, FolderMixin, PublishInRootFolderMixin
class Status(models.TextChoices):
TO_DO = "to_do", _("To do")
IN_PROGRESS = "in_progress", _("In progress")
ACTIVE = "active", _("Active")
ON_HOLD = "on_hold", _("On hold")
ACTIVE = "active", _("Active")
DEPRECATED = "deprecated", _("Deprecated")
UNDEFINED = "--", _("Undefined")

Expand Down
3 changes: 0 additions & 3 deletions frontend/src/routes/(app)/analytics/composer/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@
});
let applied_control_status: AppliedControlStatus = data.applied_control_status;
for (const item in applied_control_status.labels) {
applied_control_status.labels[item] = localItems()[applied_control_status.localLables[item]];
}
</script>

<div class="flex flex-col space-y-4 p-2">
Expand Down

0 comments on commit b051b88

Please sign in to comment.