From 04ef58a061045fad08566a6d4be56b9845ee87b4 Mon Sep 17 00:00:00 2001 From: Abderrahmane Smimite Date: Fri, 29 Nov 2024 11:06:25 +0100 Subject: [PATCH 01/22] starting point --- .../routes/(app)/(internal)/ebios-rm/[id=uuid]/+page.svelte | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 frontend/src/routes/(app)/(internal)/ebios-rm/[id=uuid]/+page.svelte diff --git a/frontend/src/routes/(app)/(internal)/ebios-rm/[id=uuid]/+page.svelte b/frontend/src/routes/(app)/(internal)/ebios-rm/[id=uuid]/+page.svelte new file mode 100644 index 000000000..093ce250c --- /dev/null +++ b/frontend/src/routes/(app)/(internal)/ebios-rm/[id=uuid]/+page.svelte @@ -0,0 +1,3 @@ + + +
From c32cad43ba180dbac0db68370b71e57397afa666 Mon Sep 17 00:00:00 2001 From: Abderrahmane Smimite Date: Fri, 29 Nov 2024 15:02:51 +0100 Subject: [PATCH 02/22] Basic tile styling --- frontend/messages/en.json | 10 +++++- frontend/messages/fr.json | 10 +++++- .../ebios-rm/[id=uuid]/+page.svelte | 32 +++++++++++++++++-- .../(internal)/ebios-rm/[id=uuid]/Tile.svelte | 28 ++++++++++++++++ 4 files changed, 76 insertions(+), 4 deletions(-) create mode 100644 frontend/src/routes/(app)/(internal)/ebios-rm/[id=uuid]/Tile.svelte diff --git a/frontend/messages/en.json b/frontend/messages/en.json index 42a0fa288..088754cc7 100644 --- a/frontend/messages/en.json +++ b/frontend/messages/en.json @@ -893,5 +893,13 @@ "p1": "P1", "p2": "P2", "p3": "P3", - "p4": "P4" + "p4": "P4", + "ebiosWs1_1": "Workshop 1.1: Scope", + "ebiosWs1_2": "Workshop 1.2: Feared events", + "ebiosWs1_3": "Workshop 1.3: Baseline", + "ebiosWs2": "Workshop 2: Risk origins", + "ebiosWs3_1": "Workshop 3.1: Ecosystem", + "ebiosWs3_2": "Workshop 3.2: Strategic scenarios", + "ebiosWs4": "Workshop 4: Operational scenarios", + "ebiosWs5": "Workshop 5: Risk managenement plan" } diff --git a/frontend/messages/fr.json b/frontend/messages/fr.json index dbe72b3a1..5c8e30db7 100644 --- a/frontend/messages/fr.json +++ b/frontend/messages/fr.json @@ -866,5 +866,13 @@ "forgotPassword": "Mot de passe oublié", "ssoSettingsUpdated": "Paramètres SSO mis à jour", "scoreSemiColon": "Score:", - "mappingInferenceHelpText": "Ces variables sont fixes et ne changeront pas en fonction de la source." + "mappingInferenceHelpText": "Ces variables sont fixes et ne changeront pas en fonction de la source.", + "ebiosWs1_1": "Atelier 1.1 : Cadrage", + "ebiosWs1_2": "Atelier 1.2 : Evenements redoutés", + "ebiosWs1_3": "Atelier 1.3 : Socle", + "ebiosWs2": "Atelier 2 : Source de risque", + "ebiosWs3_1": "Atelier 3.1 : Ecosysteme", + "ebiosWs3_2": "Atelier 3.2 : Scenarios stratégiques", + "ebiosWs4": "Atelier 4 : Scenarios opértionnels", + "ebiosWs5": "Atelier 5 : Traitement du risque" } diff --git a/frontend/src/routes/(app)/(internal)/ebios-rm/[id=uuid]/+page.svelte b/frontend/src/routes/(app)/(internal)/ebios-rm/[id=uuid]/+page.svelte index 093ce250c..b0903a1ac 100644 --- a/frontend/src/routes/(app)/(internal)/ebios-rm/[id=uuid]/+page.svelte +++ b/frontend/src/routes/(app)/(internal)/ebios-rm/[id=uuid]/+page.svelte @@ -1,3 +1,31 @@ - + -
+
+
+
+ + + +
+
+ +
+
+ + +
+
+ +
+
+ +
+
+ +
+
+
diff --git a/frontend/src/routes/(app)/(internal)/ebios-rm/[id=uuid]/Tile.svelte b/frontend/src/routes/(app)/(internal)/ebios-rm/[id=uuid]/Tile.svelte new file mode 100644 index 000000000..bf4491d86 --- /dev/null +++ b/frontend/src/routes/(app)/(internal)/ebios-rm/[id=uuid]/Tile.svelte @@ -0,0 +1,28 @@ + + +
+
+
{title}
+
+ {#if status == 'to_do'} + + {:else if status == 'in_progress'} + + {:else if status == 'done'} + + {/if} +
+
+ {#each meta as kv} +
{kv}
+ {/each} +
+
+
+
From 56835209150f367e0c459893743618f85e07067f Mon Sep 17 00:00:00 2001 From: Abderrahmane Smimite Date: Fri, 29 Nov 2024 18:35:34 +0100 Subject: [PATCH 03/22] wip --- .../routes/(app)/(internal)/ebios-rm/[id=uuid]/Tile.svelte | 2 +- .../src/routes/(app)/(internal)/experimental/+page.svelte | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/frontend/src/routes/(app)/(internal)/ebios-rm/[id=uuid]/Tile.svelte b/frontend/src/routes/(app)/(internal)/ebios-rm/[id=uuid]/Tile.svelte index bf4491d86..699e227ce 100644 --- a/frontend/src/routes/(app)/(internal)/ebios-rm/[id=uuid]/Tile.svelte +++ b/frontend/src/routes/(app)/(internal)/ebios-rm/[id=uuid]/Tile.svelte @@ -9,7 +9,7 @@
{title}
-
+
{#if status == 'to_do'} {:else if status == 'in_progress'} diff --git a/frontend/src/routes/(app)/(internal)/experimental/+page.svelte b/frontend/src/routes/(app)/(internal)/experimental/+page.svelte index 7964bcdf6..d9a1f5d98 100644 --- a/frontend/src/routes/(app)/(internal)/experimental/+page.svelte +++ b/frontend/src/routes/(app)/(internal)/experimental/+page.svelte @@ -27,4 +27,10 @@ link="assets/graph" tags={['analysis', 'assets']} /> +
From f15e8e03e7f91bd25ac3797cb1d7c099522abbb4 Mon Sep 17 00:00:00 2001 From: Abderrahmane Smimite Date: Fri, 29 Nov 2024 18:46:01 +0100 Subject: [PATCH 04/22] wip --- .../(app)/(internal)/ebios-rm/[id=uuid]/Tile.svelte | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/frontend/src/routes/(app)/(internal)/ebios-rm/[id=uuid]/Tile.svelte b/frontend/src/routes/(app)/(internal)/ebios-rm/[id=uuid]/Tile.svelte index 699e227ce..58fd22023 100644 --- a/frontend/src/routes/(app)/(internal)/ebios-rm/[id=uuid]/Tile.svelte +++ b/frontend/src/routes/(app)/(internal)/ebios-rm/[id=uuid]/Tile.svelte @@ -1,15 +1,17 @@
{title}
-
+
{#if status == 'to_do'} {:else if status == 'in_progress'} @@ -23,6 +25,8 @@
{kv}
{/each}
-
+
+ +
From ff16985601e9c7cbbc08257beff37aad96960435 Mon Sep 17 00:00:00 2001 From: Abderrahmane Smimite Date: Sun, 1 Dec 2024 20:27:14 +0100 Subject: [PATCH 05/22] Closer to the training materials --- frontend/messages/en.json | 31 +++++--- frontend/messages/fr.json | 30 ++++++-- .../ebios-rm/[id=uuid]/+page.svelte | 62 ++++++++++------ .../(internal)/ebios-rm/[id=uuid]/Tile.svelte | 71 +++++++++++++------ 4 files changed, 136 insertions(+), 58 deletions(-) diff --git a/frontend/messages/en.json b/frontend/messages/en.json index b1763a53a..c3efe6ae6 100644 --- a/frontend/messages/en.json +++ b/frontend/messages/en.json @@ -897,12 +897,27 @@ "p2": "P2", "p3": "P3", "p4": "P4", - "ebiosWs1_1": "Workshop 1.1: Scope", - "ebiosWs1_2": "Workshop 1.2: Feared events", - "ebiosWs1_3": "Workshop 1.3: Baseline", - "ebiosWs2": "Workshop 2: Risk origins", - "ebiosWs3_1": "Workshop 3.1: Ecosystem", - "ebiosWs3_2": "Workshop 3.2: Strategic scenarios", - "ebiosWs4": "Workshop 4: Operational scenarios", - "ebiosWs5": "Workshop 5: Risk managenement plan" + "ebiosWs1": "Workshop 1: Framing and Security Foundation", + "ebiosWs2": "Workshop 2: Risk Sources", + "ebiosWs3": "Workshop 3: Strategic Scenarios", + "ebiosWs4": "Workshop 4: Operational Scenarios", + "ebiosWs5": "Workshop 5: Risk Treatment", + "ebiosWs1_1": "Define the study framework", + "ebiosWs1_2": "Define business and technical perimeter", + "ebiosWs1_3": "Identify feared events", + "ebiosWs1_4": "Determine the security foundation", + "ebiosWs2_1": "Identify risk sources and targeted objectives", + "ebiosWs2_2": "Evaluate RS/TO pairs", + "ebiosWs2_3": "Select RS/TO pairs", + "ebiosWs3_1": "Map the ecosystem", + "ebiosWs3_2": "Develop strategic scenarios", + "ebiosWs3_3": "Define security measures for the ecosystem", + "ebiosWs4_1": "Develop operational scenarios", + "ebiosWs4_2": "Evaluate the likelihood of operational scenarios", + "ebiosWs5_1": "Conduct a risk assessment", + "ebiosWs5_2": "Decide on risk treatment strategy", + "ebiosWs5_3": "Define security measures", + "ebiosWs5_4": "Assess and document residual risks", + "ebiosWs5_5": "Establish risk monitoring framework", + "activity": "Activity" } diff --git a/frontend/messages/fr.json b/frontend/messages/fr.json index a0dd56cbb..7ba0259ea 100644 --- a/frontend/messages/fr.json +++ b/frontend/messages/fr.json @@ -873,12 +873,28 @@ "ssoSettingsUpdated": "Paramètres SSO mis à jour", "scoreSemiColon": "Score:", "mappingInferenceHelpText": "Ces variables sont fixes et ne changeront pas en fonction de la source.", - "ebiosWs1_1": "Atelier 1.1 : Cadrage", - "ebiosWs1_2": "Atelier 1.2 : Evenements redoutés", - "ebiosWs1_3": "Atelier 1.3 : Socle", - "ebiosWs2": "Atelier 2 : Source de risque", - "ebiosWs3_1": "Atelier 3.1 : Ecosysteme", - "ebiosWs3_2": "Atelier 3.2 : Scenarios stratégiques", + "ebiosWs1": "Atelier 1 : Cadrage et Socle de sécurité", + "ebiosWs2": "Atelier 2 : Sources de risque", + "ebiosWs3": "Atelier 3 : Scénarios stratégiques", "ebiosWs4": "Atelier 4 : Scenarios opértionnels", - "ebiosWs5": "Atelier 5 : Traitement du risque" + "ebiosWs5": "Atelier 5 : Traitement du risque", + "ebiosWs1_1": "Définir le cadre de l’étude", + "ebiosWs1_2": "Définir le périmètre métier et technique", + "ebiosWs1_3": "Identifier les événements redoutés", + "ebiosWs1_4": "Déterminer le socle de sécurité", + "ebiosWs2_1": "Identifier les sources de risque et objectifs visés", + "ebiosWs2_2": "Évaluer les couples SR/OV", + "ebiosWs2_3": "Sélectionner les couples SR/OV", + "ebiosWs3_1": "Cartographier l’écosystème", + "ebiosWs3_2": "Élaborer les scénarios stratégiques", + "ebiosWs3_3": "Définir les mesures de sécurité sur l’écosystème", + "ebiosWs4_1": "Elaborer les scénarios opérationnels", + "ebiosWs4_2": "Evaluer la vraisemblance des scénarios opérationnel", + "ebiosWs5_1": "Réaliser une évaluation des risques", + "ebiosWs5_2": "Décider de la stratégie de traitement du risque", + "ebiosWs5_3": "Définir les mesures de sécurité", + "ebiosWs5_4": "Évaluer et documenter les risques résiduels", + "ebiosWs5_5": "Mettre en place le cadre de suivi des risques", + "activity": "Activité" + } diff --git a/frontend/src/routes/(app)/(internal)/ebios-rm/[id=uuid]/+page.svelte b/frontend/src/routes/(app)/(internal)/ebios-rm/[id=uuid]/+page.svelte index b0903a1ac..33000896f 100644 --- a/frontend/src/routes/(app)/(internal)/ebios-rm/[id=uuid]/+page.svelte +++ b/frontend/src/routes/(app)/(internal)/ebios-rm/[id=uuid]/+page.svelte @@ -1,31 +1,47 @@
-
-
- - - -
-
- -
-
- - -
-
- -
-
- -
-
- -
+
+ + + + + +
diff --git a/frontend/src/routes/(app)/(internal)/ebios-rm/[id=uuid]/Tile.svelte b/frontend/src/routes/(app)/(internal)/ebios-rm/[id=uuid]/Tile.svelte index 58fd22023..00fe2faee 100644 --- a/frontend/src/routes/(app)/(internal)/ebios-rm/[id=uuid]/Tile.svelte +++ b/frontend/src/routes/(app)/(internal)/ebios-rm/[id=uuid]/Tile.svelte @@ -4,29 +4,60 @@ export let title = 'activity'; export let status = ''; - export let meta = []; + export let meta = null; export let href = '#'; + export let accent_color = ''; -
-
-
{title}
-
- {#if status == 'to_do'} - - {:else if status == 'in_progress'} - - {:else if status == 'done'} - - {/if} -
-
- {#each meta as kv} -
{kv}
- {/each} -
-
- +
+
+
+
{title}
+
+ {#if status == 'to_do'} + + {:else if status == 'in_progress'} + + {:else if status == 'done'} + + {/if} +
+ {#if meta} +
+
+
    + {#each meta as step, i} + {#if step.status == 'done'} +
  1. + + + + +

    {m.activity()} {i + 1}

    +

    {step.title}

    +
    +
  2. + {:else} +
  3. + + + + +

    {m.activity()} {i + 1}

    +

    {step.title}

    +
    +
  4. + {/if} + {/each} +
+
+
+ {/if} +
From 454aae000556a9691110b44d6f0648f592c52034 Mon Sep 17 00:00:00 2001 From: Abderrahmane Smimite Date: Sun, 1 Dec 2024 20:28:03 +0100 Subject: [PATCH 06/22] Formatter --- frontend/messages/en.json | 2 +- frontend/messages/fr.json | 37 ++++++++++++++++++------------------- 2 files changed, 19 insertions(+), 20 deletions(-) diff --git a/frontend/messages/en.json b/frontend/messages/en.json index c3efe6ae6..8be7b78d0 100644 --- a/frontend/messages/en.json +++ b/frontend/messages/en.json @@ -919,5 +919,5 @@ "ebiosWs5_3": "Define security measures", "ebiosWs5_4": "Assess and document residual risks", "ebiosWs5_5": "Establish risk monitoring framework", - "activity": "Activity" + "activity": "Activity" } diff --git a/frontend/messages/fr.json b/frontend/messages/fr.json index 7ba0259ea..29ce9296c 100644 --- a/frontend/messages/fr.json +++ b/frontend/messages/fr.json @@ -878,23 +878,22 @@ "ebiosWs3": "Atelier 3 : Scénarios stratégiques", "ebiosWs4": "Atelier 4 : Scenarios opértionnels", "ebiosWs5": "Atelier 5 : Traitement du risque", - "ebiosWs1_1": "Définir le cadre de l’étude", - "ebiosWs1_2": "Définir le périmètre métier et technique", - "ebiosWs1_3": "Identifier les événements redoutés", - "ebiosWs1_4": "Déterminer le socle de sécurité", - "ebiosWs2_1": "Identifier les sources de risque et objectifs visés", - "ebiosWs2_2": "Évaluer les couples SR/OV", - "ebiosWs2_3": "Sélectionner les couples SR/OV", - "ebiosWs3_1": "Cartographier l’écosystème", - "ebiosWs3_2": "Élaborer les scénarios stratégiques", - "ebiosWs3_3": "Définir les mesures de sécurité sur l’écosystème", - "ebiosWs4_1": "Elaborer les scénarios opérationnels", - "ebiosWs4_2": "Evaluer la vraisemblance des scénarios opérationnel", - "ebiosWs5_1": "Réaliser une évaluation des risques", - "ebiosWs5_2": "Décider de la stratégie de traitement du risque", - "ebiosWs5_3": "Définir les mesures de sécurité", - "ebiosWs5_4": "Évaluer et documenter les risques résiduels", - "ebiosWs5_5": "Mettre en place le cadre de suivi des risques", - "activity": "Activité" - + "ebiosWs1_1": "Définir le cadre de l’étude", + "ebiosWs1_2": "Définir le périmètre métier et technique", + "ebiosWs1_3": "Identifier les événements redoutés", + "ebiosWs1_4": "Déterminer le socle de sécurité", + "ebiosWs2_1": "Identifier les sources de risque et objectifs visés", + "ebiosWs2_2": "Évaluer les couples SR/OV", + "ebiosWs2_3": "Sélectionner les couples SR/OV", + "ebiosWs3_1": "Cartographier l’écosystème", + "ebiosWs3_2": "Élaborer les scénarios stratégiques", + "ebiosWs3_3": "Définir les mesures de sécurité sur l’écosystème", + "ebiosWs4_1": "Elaborer les scénarios opérationnels", + "ebiosWs4_2": "Evaluer la vraisemblance des scénarios opérationnel", + "ebiosWs5_1": "Réaliser une évaluation des risques", + "ebiosWs5_2": "Décider de la stratégie de traitement du risque", + "ebiosWs5_3": "Définir les mesures de sécurité", + "ebiosWs5_4": "Évaluer et documenter les risques résiduels", + "ebiosWs5_5": "Mettre en place le cadre de suivi des risques", + "activity": "Activité" } From 4f9c994033fb8132fb6b5d3f8dd0593d03399385 Mon Sep 17 00:00:00 2001 From: Mohamed-Hacene Date: Mon, 2 Dec 2024 16:42:02 +0100 Subject: [PATCH 07/22] workshop1: prepare step 1/2 --- .../components/Breadcrumbs/Breadcrumbs.svelte | 2 +- .../src/lib/components/Forms/ModelForm.svelte | 3 + .../Forms/ModelForm/EbiosRmStudy.svelte | 37 ++++++++++ frontend/src/lib/utils/crud.ts | 7 ++ frontend/src/lib/utils/schemas.ts | 13 +++- frontend/src/lib/utils/types.ts | 3 +- .../ebios-rm/[id=uuid]/+page.svelte | 4 +- .../ebios-rm-study/+page.server.ts | 69 +++++++++++++++++++ .../workshop-one/ebios-rm-study/+page.svelte | 18 +++++ .../workshop-one/feared-events/+page.svelte | 0 10 files changed, 152 insertions(+), 4 deletions(-) create mode 100644 frontend/src/lib/components/Forms/ModelForm/EbiosRmStudy.svelte create mode 100644 frontend/src/routes/(app)/(internal)/ebios-rm/[id=uuid]/workshop-one/ebios-rm-study/+page.server.ts create mode 100644 frontend/src/routes/(app)/(internal)/ebios-rm/[id=uuid]/workshop-one/ebios-rm-study/+page.svelte create mode 100644 frontend/src/routes/(app)/(internal)/ebios-rm/[id=uuid]/workshop-one/feared-events/+page.svelte diff --git a/frontend/src/lib/components/Breadcrumbs/Breadcrumbs.svelte b/frontend/src/lib/components/Breadcrumbs/Breadcrumbs.svelte index 7ceac4475..ff92026a7 100644 --- a/frontend/src/lib/components/Breadcrumbs/Breadcrumbs.svelte +++ b/frontend/src/lib/components/Breadcrumbs/Breadcrumbs.svelte @@ -17,7 +17,7 @@ let tokenPath = ''; crumbs = tokens.map((t) => { tokenPath += '/' + t; - if (t === $breadcrumbObject.id) { + if (t === $breadcrumbObject?.id) { if ($breadcrumbObject.name) { t = $breadcrumbObject.name; } else if ($breadcrumbObject.first_name && $breadcrumbObject.last_name) { diff --git a/frontend/src/lib/components/Forms/ModelForm.svelte b/frontend/src/lib/components/Forms/ModelForm.svelte index 2a331686a..909a99cc9 100644 --- a/frontend/src/lib/components/Forms/ModelForm.svelte +++ b/frontend/src/lib/components/Forms/ModelForm.svelte @@ -26,6 +26,7 @@ import SsoSettingsForm from './ModelForm/SsoSettingForm.svelte'; import FolderForm from './ModelForm/FolderForm.svelte'; import GeneralSettingsForm from './ModelForm/GeneralSettingForm.svelte'; + import EbiosRmStudy from './ModelForm/EbiosRmStudy.svelte'; import AutocompleteSelect from './AutocompleteSelect.svelte'; @@ -254,6 +255,8 @@ {:else if URLModel === 'filtering-labels'} + {:else if URLModel === 'ebios-rm-study'} + {/if}
{#if closeModal} diff --git a/frontend/src/lib/components/Forms/ModelForm/EbiosRmStudy.svelte b/frontend/src/lib/components/Forms/ModelForm/EbiosRmStudy.svelte new file mode 100644 index 000000000..b345f56f9 --- /dev/null +++ b/frontend/src/lib/components/Forms/ModelForm/EbiosRmStudy.svelte @@ -0,0 +1,37 @@ + + + +