ISO-27001-Risk-Management/templates/risks/list_risks.html
Kevin Heyer 43e86d0357 feat: Enhance Risk Management Module
- Updated Risk model to include description, created_at, and updated_at fields.
- Modified RiskSerializer to include created_at and updated_at in serialized output.
- Improved logging in signals for Risk and Control models, including serialization of values.
- Added new template tags for CIA label mapping.
- Refactored URL patterns for better clarity and added detail views for risks, controls, and incidents.
- Implemented list and detail views for risks, controls, and incidents with filtering options.
- Enhanced CSS for better UI/UX, including breadcrumbs and table styling.
- Created new templates for displaying individual risks, controls, and incidents with detailed information.
2025-09-08 15:03:12 +02:00

125 lines
No EOL
4 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{% extends "base.html" %}
{% block crumbs %}
<li><a href="{% url 'risks:list_risks' %}">Risikoanalyse</a></li>
{% endblock %}
{% block content %}
<section class="section">
<div class="box">
<h2 class="title is-5">Auswahl</h2>
<!-- Filter -->
<form method="get">
<div class="columns is-multiline">
<!-- Risiko Filter -->
<div class="column is-3">
<div class="field">
<label class="label">Risiko</label>
<div class="control">
<div class="select is-fullwidth">
<select name="risk" onchange="this.form.submit()">
<option value="">Alle</option>
{% for r in risks %}
<option value="{{ r.id }}" {% if request.GET.risk == r.id|stringformat:"s" %}selected{% endif %}>
{{ r.title }}
</option>
{% endfor %}
</select>
</div>
</div>
</div>
</div>
<!-- Maßnahmen Filter -->
<div class="column is-3">
<div class="field">
<label class="label">Maßnahmen</label>
<div class="control">
<div class="select is-fullwidth">
<select name="control" onchange="this.form.submit()">
<option value="">Alle</option>
{% for c in controls %}
<option value="{{ c.id }}" {% if request.GET.control == c.id|stringformat:"s" %}selected{% endif %}>
{{ c.title }}
</option>
{% endfor %}
</select>
</div>
</div>
</div>
</div>
<!-- Risikoeigner Filter -->
<div class="column is-3">
<div class="field">
<label class="label">Risikoeigner</label>
<div class="control">
<div class="select is-fullwidth">
<select name="owner" onchange="this.form.submit()">
<option value="">Alle</option>
{% for u in owners %}
<option value="{{ u.id }}" {% if request.GET.owner == u.id|stringformat:"s" %}selected{% endif %}>
{{ u.get_full_name|default:u.username }}
</option>
{% endfor %}
</select>
</div>
</div>
</div>
</div>
</div>
</form>
<h2 class="title is-5">Risiken</h2>
<!-- Risiken -->
<div class="table-container">
<table class="table is-bordered is-striped is-hoverable is-fullwidth">
<thead>
<tr>
<th>Risiko</th>
<th>Asset / Prozes</th>
<th>Kategorie</th>
<th>Eintritt</th>
<th>Schaden</th>
<th>Score</th>
<th>Stufe</th>
<th>Risikoeigner</th>
</tr>
</thead>
<tbody>
{% for r in risks %}
<tr onclick="window.location.href='{% url 'risks:show_risk' r.id %}'" style="cursor:pointer;">
<td>{{ r.title }}</td>
<td>
{{ r.asset }}
{% if r.process %}
<br><small>{{ r.process }}</small>
{% endif %}
</td>
<td>{{ r.category }}</td>
<td>{{ r.get_likelihood_display }}</td>
<td>{{ r.get_impact_display }}</td>
<td>{{ r.score }}</td>
<td>{{ r.level }}</td>
<td>
{% if r.owner %}
{{ r.owner.get_full_name|default:r.owner.username }}
{% else %}
{% endif %}
</td>
</tr>
{% empty %}
<tr>
<td colspan="8" class="has-text-centered has-text-grey">Keine Risiken vorhanden</td>
</tr>
{% endfor %}
</tbody>
</table>
</div> <!-- Ende Risiken -->
</div>
</section>
{% endblock %}