Skip to content
This repository has been archived by the owner on Mar 30, 2024. It is now read-only.

Commit

Permalink
Merge branch 'main' into 18-fresh-instance-creating-a-project-results…
Browse files Browse the repository at this point in the history
…-in-error-500
  • Loading branch information
nas-tabchiche authored Oct 23, 2023
2 parents 1d2661e + 4e336de commit a08f908
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/unit-test-mira.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
24 changes: 12 additions & 12 deletions core/templates/snippets/risk_matrix.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
{% if data %}
<div class="flex flex-row justify-center">
<div class="text-black font-bold text-center print-impact flex items-center">
<p class="-rotate-90">{% trans "Impact" %}</p>
<p class="-rotate-90">{% trans "Probability" %}</p>
</div>
<table class="w-full">
{% for row in matrix.render_grid_as_colors reversed %}
{% with row_index=forloop.revcounter0 %}
<tr class="w-full">
<td class="w-1/6 text-right pr-2 border-4 border-white">
{% with impact=matrix.parse_json.impact|index:row_index %}
{{ impact.name }}
{% with probability=matrix.parse_json.probability|index:row_index %}
{{ probability.name }}
{% endwith %}
</td>
{% for item in row %}
Expand All @@ -34,22 +34,22 @@
</table>
</div>
<div class="text-black font-bold text-center mx-auto mt-2">
<p>{% trans "Probability" %}</p>
<p>{% trans "Impact" %}</p>
</div>
{% else %}
<div class="w-full">
<div class="flex flex-row justify-center">
<div class="text-black font-bold text-center print-impact flex items-center">
<p class="-rotate-90">{% trans "Impact" %}</p>
<p class="-rotate-90">{% trans "Probability" %}</p>
</div>
<table class="w-3/4 mt-10">
{% for row in matrix.render_grid_as_colors reversed %}
{% with row_index=forloop.revcounter0 %}
<tr>
<td class="w-1/6 text-center text-black bg-gray-200 border-4 border-white pr-2">
{% 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 %}
</td>
{% if enriched_data %}
Expand All @@ -70,17 +70,17 @@
{% endfor %}
<tr>
<td></td>
{% for probability in matrix.parse_json.probability %}
{% for impact in matrix.parse_json.impact %}
<td class="w-1/6 h-16 text-center text-black bg-gray-200 border-4 border-white">
{{ probability.name }}:
{{ probability.description|linebreaksbr }}
{{ impact.name }}:
{{ impact.description|linebreaksbr }}
</td>
{% endfor %}
</tr>
</table>
</div>
<div class="text-black font-bold text-center mx-auto mt-4">
{% trans "Probability" %}
{% trans "Impact" %}
</div>
</div>
<div class="w-full flex flex-col justify-start">
Expand Down
8 changes: 4 additions & 4 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -125,7 +125,7 @@ git clone [email protected]: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 `"<XXX>"` 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 `"<XXX>"` by your private values. Take car not to commit this file in your git repo.

**Recommended variables**

Expand All @@ -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**

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit a08f908

Please sign in to comment.