From 03a500708d31f7861cc8b7b8a96b43ba610d293c Mon Sep 17 00:00:00 2001 From: monsieurswag Date: Sun, 15 Oct 2023 05:50:53 +0200 Subject: [PATCH 1/5] Add python 3.10 to github actions workflow --- .github/workflows/unit-test-mira.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unit-test-mira.yml b/.github/workflows/unit-test-mira.yml index 5158213..c9a489f 100644 --- a/.github/workflows/unit-test-mira.yml +++ b/.github/workflows/unit-test-mira.yml @@ -25,7 +25,7 @@ jobs: strategy: max-parallel: 4 matrix: - python-version: ["3.11"] + python-version: ["3.10","3.11"] steps: - uses: actions/checkout@v3 From e7c8072d8abb30582ff5812a4c0824ed251f3b86 Mon Sep 17 00:00:00 2001 From: nas-tabchiche <71079376+nas-tabchiche@users.noreply.github.com> Date: Mon, 16 Oct 2023 11:30:39 +0200 Subject: [PATCH 2/5] Highlight inline variable and commands when relevant --- readme.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/readme.md b/readme.md index bcc2f7a..4899b4e 100644 --- a/readme.md +++ b/readme.md @@ -32,7 +32,7 @@ To install gettext and pango, do `sudo apt update && sudo apt install gettext li There are two methods to run MIRA locally: using Python or using Docker. -By default, Django secret key is generated randomly at each start of Mira. This is convenient for quick test, but not recommended for production, as it can break the sessions (see this [topic](https://stackoverflow.com/questions/15170637/effects-of-changing-djangos-secret-key) for more information). To set a fixed secret key, use the environment variable DJANGO_SECRET_KEY. +By default, Django secret key is generated randomly at each start of Mira. This is convenient for quick test, but not recommended for production, as it can break the sessions (see this [topic](https://stackoverflow.com/questions/15170637/effects-of-changing-djangos-secret-key) for more information). To set a fixed secret key, use the environment variable `DJANGO_SECRET_KEY`. 0. Clone the repository @@ -125,7 +125,7 @@ git clone git@github.com:intuitem/mira-community.git cd mira-community ``` -2. Create a file in the parent folder (e.g. ../myvars) and store your environment variables within it by copying and modifying the following code and replace `""` by your private values. Take car not to commit this file in your git repo. +2. Create a file in the parent folder (e.g. `../myvars`) and store your environment variables within it by copying and modifying the following code and replace `""` by your private values. Take car not to commit this file in your git repo. **Recommended variables** @@ -147,7 +147,7 @@ export EMAIL_HOST=localhost export EMAIL_PORT=1025 ``` -> As said in the quickstart section, MIRA generates a random Django secret key if not specified. To avoid broken sessions, it is preferable to set a fixed random value using the DJANGO_SECRET_KEY environment variable. +> As said in the quickstart section, MIRA generates a random Django secret key if not specified. To avoid broken sessions, it is preferable to set a fixed random value using the `DJANGO_SECRET_KEY` environment variable. **Optional variables** @@ -216,7 +216,7 @@ python manage.py migrate 7. Create a superuser, that will be MIRA administrator. -> If you have set a mailer and MIRA_SUPERUSER_EMAIL variables, there's no need to create a Django superuser with createsuperuser, as it will be created automatically on first start. You should receive an email with a link to setup your password. +> If you have set a mailer and `MIRA_SUPERUSER_EMAIL` variables, there's no need to create a Django superuser with `createsuperuser`, as it will be created automatically on first start. You should receive an email with a link to setup your password. ```sh python manage.py createsuperuser From e5a4539dcfeb1114afe4444cc12eaeda9cb17f8d Mon Sep 17 00:00:00 2001 From: Nassim Tabchiche Date: Thu, 19 Oct 2023 14:56:15 +0200 Subject: [PATCH 3/5] Fix inverted matrix legends --- core/templates/snippets/risk_matrix.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/templates/snippets/risk_matrix.html b/core/templates/snippets/risk_matrix.html index 8000f01..1731ebc 100644 --- a/core/templates/snippets/risk_matrix.html +++ b/core/templates/snippets/risk_matrix.html @@ -4,15 +4,15 @@ {% if data %}
{% for row in matrix.render_grid_as_colors reversed %} {% with row_index=forloop.revcounter0 %} {% for item in row %} @@ -34,7 +34,7 @@
- {% with impact=matrix.parse_json.impact|index:row_index %} - {{ impact.name }} + {% with probability=matrix.parse_json.probability|index:row_index %} + {{ probability.name }} {% endwith %}
-

{% trans "Probability" %}

+

{% trans "Impact" %}

{% else %}
From c94a603572cebe39f63d0bb2489655ce40771318 Mon Sep 17 00:00:00 2001 From: Nassim Tabchiche Date: Thu, 19 Oct 2023 14:58:25 +0200 Subject: [PATCH 4/5] Update VERSION --- mira/VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mira/VERSION b/mira/VERSION index 3d54442..ae58dec 100644 --- a/mira/VERSION +++ b/mira/VERSION @@ -1 +1 @@ -3.0.2a +3.0.2b From a383e7d38cdb0d43ca94ae92b73e2b470c2472aa Mon Sep 17 00:00:00 2001 From: Nassim Tabchiche Date: Thu, 19 Oct 2023 15:23:52 +0200 Subject: [PATCH 5/5] Fix legends for matrices with no data --- core/templates/snippets/risk_matrix.html | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/core/templates/snippets/risk_matrix.html b/core/templates/snippets/risk_matrix.html index 1731ebc..48977a3 100644 --- a/core/templates/snippets/risk_matrix.html +++ b/core/templates/snippets/risk_matrix.html @@ -40,16 +40,16 @@
{% for row in matrix.render_grid_as_colors reversed %} {% with row_index=forloop.revcounter0 %} {% if enriched_data %} @@ -70,17 +70,17 @@ {% endfor %} - {% for probability in matrix.parse_json.probability %} + {% for impact in matrix.parse_json.impact %} {% endfor %}
- {% with impact=matrix.parse_json.impact|index:row_index %} - {{ impact.name }}: - {{ impact.description|linebreaksbr }} + {% with probability=matrix.parse_json.probability|index:row_index %} + {{ probability.name }}: + {{ probability.description|linebreaksbr }} {% endwith %}
- {{ probability.name }}: - {{ probability.description|linebreaksbr }} + {{ impact.name }}: + {{ impact.description|linebreaksbr }}
- {% trans "Probability" %} + {% trans "Impact" %}