From bb5b1ab38c2f730c604241bd82324f42dd1a6ea0 Mon Sep 17 00:00:00 2001 From: Nassim Tabchiche Date: Wed, 28 Feb 2024 16:03:03 +0100 Subject: [PATCH] Update default SoK symbols --- backend/core/models.py | 13 ++--- .../libraries/critical_matrix_3x3.yaml | 13 ----- .../libraries/critical_matrix_5x5.yaml | 13 ----- .../RiskMatrix/RiskMatrix.stories.ts | 48 +++++++++++++++---- .../RiskMatrix/RiskScenarioItem.svelte | 7 ++- 5 files changed, 46 insertions(+), 48 deletions(-) diff --git a/backend/core/models.py b/backend/core/models.py index 40b5efb37..175ad1ecf 100644 --- a/backend/core/models.py +++ b/backend/core/models.py @@ -1007,28 +1007,21 @@ class RiskScenario(NameDescriptionMixin): "description": _( "The strength of the knowledge supporting the assessment is low" ), - "symbol": "◔", + "symbol": "◇", }, 1: { "name": _("Medium"), "description": _( "The strength of the knowledge supporting the assessment is medium" ), - "symbol": "◑", + "symbol": "⬙", }, 2: { "name": _("High"), "description": _( "The strength of the knowledge supporting the assessment is high" ), - "symbol": "◕", - }, - 3: { - "name": _("Very High"), - "description": _( - "The strength of the knowledge supporting the assessment is very high" - ), - "symbol": "●", + "symbol": "◆", }, } diff --git a/backend/library/libraries/critical_matrix_3x3.yaml b/backend/library/libraries/critical_matrix_3x3.yaml index 992b7d49d..ba72f3327 100644 --- a/backend/library/libraries/critical_matrix_3x3.yaml +++ b/backend/library/libraries/critical_matrix_3x3.yaml @@ -55,16 +55,3 @@ objects: - - 1 - 2 - 2 - strength_of_knowledge: - - name: Low - description: Low strength of knowledge - symbol: ◔ - - name: Medium - description: Medium strength of knowledge - symbol: ◑ - - name: High - description: High strength of knowledge - symbol: ◕ - - name: Very high - description: Very high strength of knowledge - symbol: ● diff --git a/backend/library/libraries/critical_matrix_5x5.yaml b/backend/library/libraries/critical_matrix_5x5.yaml index 460189d43..89c3c7f10 100644 --- a/backend/library/libraries/critical_matrix_5x5.yaml +++ b/backend/library/libraries/critical_matrix_5x5.yaml @@ -91,16 +91,3 @@ objects: - 3 - 4 - 4 - strength_of_knowledge: - - name: Low - description: Low strength of knowledge - symbol: ◔ - - name: Medium - description: Medium strength of knowledge - symbol: ◑ - - name: High - description: High strength of knowledge - symbol: ◕ - - name: Very high - description: Very high strength of knowledge - symbol: ● diff --git a/frontend/src/lib/components/RiskMatrix/RiskMatrix.stories.ts b/frontend/src/lib/components/RiskMatrix/RiskMatrix.stories.ts index 3e481edcc..cfccd5418 100644 --- a/frontend/src/lib/components/RiskMatrix/RiskMatrix.stories.ts +++ b/frontend/src/lib/components/RiskMatrix/RiskMatrix.stories.ts @@ -46,14 +46,46 @@ const riskMatrix = { }) }; -const riskScenario = { - id: '7059ef1b-7d4f-46bc-b735-ed41b531bb22', - name: 'RS1', - rid: 'R.1', - strength_of_knowledge: { - name: 'Very High', - description: 'The strength of the knowledge supporting the assessment is very high', - symbol: '●' +const riskScenarios = [ + { + id: '7059ef1b-7d4f-46bc-b735-ed41b531bb22', + name: 'RS1', + rid: 'R.1', + strength_of_knowledge: { + name: 'Low', + description: 'The strength of the knowledge supporting the assessment is very high', + symbol: '◇' + } + }, + { + id: '7059ef1b-7d4f-46bc-b735-ed41b531bb22', + name: 'RS1', + rid: 'R.2', + strength_of_knowledge: { + name: 'Low', + description: 'The strength of the knowledge supporting the assessment is very high', + symbol: '⬙' + } + }, + { + id: '7059ef1b-7d4f-46bc-b735-ed41b531bb22', + name: 'RS1', + rid: 'R.3', + strength_of_knowledge: { + name: 'Low', + description: 'The strength of the knowledge supporting the assessment is very high', + symbol: '◆' + } + }, + { + id: '7059ef1b-7d4f-46bc-b735-ed41b531bb22', + name: 'RS4', + rid: 'R.1', + strength_of_knowledge: { + name: 'Low', + description: 'The strength of the knowledge supporting the assessment is very high', + symbol: '◆' + } } }; diff --git a/frontend/src/lib/components/RiskMatrix/RiskScenarioItem.svelte b/frontend/src/lib/components/RiskMatrix/RiskScenarioItem.svelte index e9ee95443..edfb03064 100644 --- a/frontend/src/lib/components/RiskMatrix/RiskScenarioItem.svelte +++ b/frontend/src/lib/components/RiskMatrix/RiskScenarioItem.svelte @@ -3,8 +3,7 @@

- {data.rid} - {#if data.strength_of_knowledge && data.strength_of_knowledge.symbol !== undefined} - {data.strength_of_knowledge.symbol} - {/if} + {#if data.strength_of_knowledge && data.strength_of_knowledge.symbol !== undefined}{data.strength_of_knowledge.symbol}{/if}{data.rid}