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
|
|
|
|
{% extends "base.html" %}
|
2025-09-10 13:44:03 +02:00
|
|
|
|
{% load i18n risk_extras %}
|
2025-09-12 13:04:04 +02:00
|
|
|
|
|
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
|
|
|
|
{% block crumbs %}
|
2025-09-12 13:04:04 +02:00
|
|
|
|
<li><a href="{% url 'risks:list_controls' %}">{% trans "Controls" %}</a></li>
|
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
|
|
|
|
<li><a href="{% url 'risks:show_control' control.id %}">{{ control.title }}</a></li>
|
|
|
|
|
{% endblock %}
|
2025-09-12 13:04:04 +02:00
|
|
|
|
|
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
|
|
|
|
{% block content %}
|
Refactor risk management application with enhanced localization, user authentication, and UI improvements
- Added verbose names for Incident and ResidualRisk models for better clarity in admin interface.
- Updated impact choices for ResidualRisk and Risk models to ensure consistency and clarity.
- Implemented gettext_lazy for translatable strings in models and choices.
- Enhanced the Risk, ResidualRisk, Control, AuditLog, and Incident models with Meta options for better admin representation.
- Added login required decorators to views for improved security.
- Introduced new CSS variables and classes for better visual representation of risk levels.
- Created custom template tags for dynamic CSS class assignment based on risk likelihood and impact.
- Improved dashboard and statistics views with user authentication checks.
- Updated templates for risks, controls, incidents, and admin interface to include edit and delete options for staff users.
- Added new login and logout templates for user authentication.
- Enhanced list views for risks, controls, and incidents to include action buttons for staff users.
- Improved overall UI/UX with Bulma CSS framework for a more modern look and feel.
2025-09-09 14:25:59 +02:00
|
|
|
|
|
2025-09-12 13:04:04 +02:00
|
|
|
|
<!-- ERP-style tabs -->
|
|
|
|
|
<div class="erp-tabs">
|
|
|
|
|
<a class="is-active" data-tab="overview">{% trans "Overview" %}</a>
|
|
|
|
|
<a data-tab="risks">{% trans "Linked Risks" %}</a>
|
|
|
|
|
<a data-tab="history">{% trans "History" %}</a>
|
|
|
|
|
<!-- Action Icons -->
|
|
|
|
|
<div class="buttons">
|
|
|
|
|
<a href="{% url 'admin:risks_control_change' control.pk %}" class="button is-small is-warning" title="{% trans 'Edit Control' %}">
|
|
|
|
|
<span class="icon"><i class="fas fa-edit"></i></span>
|
|
|
|
|
</a>
|
|
|
|
|
<a href="{% url 'admin:risks_control_delete' control.pk %}" class="button is-small is-danger" title="{% trans 'Delete Control' %}">
|
|
|
|
|
<span class="icon"><i class="fas fa-trash"></i></span>
|
|
|
|
|
</a>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- Tab: Overview -->
|
|
|
|
|
<div class="tab-panel" data-tab="overview">
|
|
|
|
|
<div class="card">
|
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
|
|
|
|
<div class="card-content">
|
|
|
|
|
<div class="columns is-multiline">
|
|
|
|
|
<div class="column is-half">
|
2025-09-12 13:04:04 +02:00
|
|
|
|
<p><strong>{% trans "Control" %}:</strong> {{ control.title }}</p>
|
|
|
|
|
<p><strong>{% trans "Responsible" %}:</strong> {{ control.responsible|default:"–" }}</p>
|
|
|
|
|
<p><strong>{% trans "Status" %}:</strong> {{ control.get_status_display }}</p>
|
|
|
|
|
<p>
|
|
|
|
|
<strong>{% trans "Link" %}:</strong>
|
|
|
|
|
{% if control.wiki_link %}
|
|
|
|
|
<a href="{{ control.wiki_link }}" target="_blank">🔗</a>
|
|
|
|
|
{% else %}
|
|
|
|
|
–
|
|
|
|
|
{% endif %}
|
|
|
|
|
</p>
|
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
|
|
|
|
</div>
|
|
|
|
|
<div class="column is-half">
|
2025-09-12 13:04:04 +02:00
|
|
|
|
<p><strong>{% trans "Created at" %}:</strong> {{ control.created_at|date:"d.m.Y H:i" }}</p>
|
|
|
|
|
<p><strong>{% trans "Updated at" %}:</strong> {{ control.updated_at|date:"d.m.Y H:i" }}</p>
|
|
|
|
|
<p><strong>{% trans "Deadline" %}:</strong> {{ control.due_date|date:"d.m.Y"|default:"–" }}</p>
|
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
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2025-09-12 13:04:04 +02:00
|
|
|
|
<section>
|
|
|
|
|
<h3 class="title is-6">{% trans "Description" %}</h3>
|
|
|
|
|
<p>{{ control.description|default:"–" }}</p>
|
|
|
|
|
</section>
|
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
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2025-09-12 13:04:04 +02:00
|
|
|
|
</div><!-- Overview Tab End -->
|
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
|
|
|
|
|
2025-09-12 13:04:04 +02:00
|
|
|
|
<!-- Tab: Linked Risks -->
|
|
|
|
|
<div class="tab-panel is-hidden" data-tab="risks">
|
|
|
|
|
<div class="table-container">
|
|
|
|
|
<table class="table is-bordered is-striped is-narrow is-hoverable is-fullwidth">
|
|
|
|
|
<thead>
|
|
|
|
|
<tr class="has-background-prosoft">
|
|
|
|
|
<th class="has-text-centered">{% trans "Risk" %}</th>
|
|
|
|
|
<th class="has-text-centered">{% trans "Owner" %}</th>
|
|
|
|
|
<th class="has-text-centered">{% trans "Category" %}</th>
|
|
|
|
|
<th class="has-text-centered">{% trans "Asset" %}</th>
|
|
|
|
|
<th class="has-text-centered">{% trans "Process" %}</th>
|
|
|
|
|
</tr>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody>
|
|
|
|
|
{% for risk in control.risks.all %}
|
|
|
|
|
<tr onclick="window.location.href='{% url 'risks:show_risk' risk.id %}'" style="cursor:pointer;">
|
|
|
|
|
<td>{{ risk.title }}</td>
|
|
|
|
|
<td class="has-text-centered">{{ risk.owner|user_display|default:"–" }}</td>
|
|
|
|
|
<td class="has-text-centered">{{ risk.category|default:"–" }}</td>
|
|
|
|
|
<td class="has-text-centered">{{ risk.asset|default:"–" }}</td>
|
|
|
|
|
<td class="has-text-centered">{{ risk.process|default:"–" }}</td>
|
|
|
|
|
</tr>
|
|
|
|
|
{% empty %}
|
|
|
|
|
<tr><td colspan="5" class="has-text-grey has-text-centered">{% trans "No linked risks." %}</td></tr>
|
|
|
|
|
{% endfor %}
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
</div>
|
|
|
|
|
</div><!-- Linked Risks Tab End -->
|
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
|
|
|
|
|
2025-09-12 13:04:04 +02:00
|
|
|
|
<!-- Tab: History -->
|
|
|
|
|
<div class="tab-panel is-hidden" data-tab="history">
|
|
|
|
|
<div class="table-container">
|
|
|
|
|
<table class="table is-bordered is-striped is-narrow is-hoverable is-fullwidth">
|
|
|
|
|
<thead>
|
|
|
|
|
<tr class="has-background-prosoft">
|
|
|
|
|
<th class="has-text-centered">{% trans "Time" %}</th>
|
|
|
|
|
<th class="has-text-centered">{% trans "User" %}</th>
|
|
|
|
|
<th class="has-text-centered">{% trans "Action" %}</th>
|
|
|
|
|
</tr>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody>
|
|
|
|
|
{% for log in logs %}
|
|
|
|
|
<tr>
|
|
|
|
|
<td class="has-text-centered">{{ log.action_time|date:"d.m.Y H:i" }}</td>
|
|
|
|
|
<td class="has-text-centered">{{ log.user.get_full_name|default:log.user.username }}</td>
|
|
|
|
|
<td>{{ log.get_change_message }}</td>
|
|
|
|
|
</tr>
|
|
|
|
|
{% empty %}
|
|
|
|
|
<tr><td colspan="3" class="has-text-grey has-text-centered">{% trans "No history found." %}</td></tr>
|
|
|
|
|
{% endfor %}
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
</div>
|
|
|
|
|
</div><!-- History Tab End -->
|
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
|
|
|
|
|
2025-09-12 13:04:04 +02:00
|
|
|
|
<!-- Tab switching script -->
|
|
|
|
|
<script>
|
|
|
|
|
document.addEventListener('DOMContentLoaded', () => {
|
|
|
|
|
const tabs = document.querySelectorAll('.erp-tabs a[data-tab]');
|
|
|
|
|
const panels = document.querySelectorAll('.tab-panel');
|
|
|
|
|
tabs.forEach(tab => {
|
|
|
|
|
tab.addEventListener('click', e => {
|
|
|
|
|
e.preventDefault();
|
|
|
|
|
tabs.forEach(x => x.classList.remove('is-active'));
|
|
|
|
|
panels.forEach(p => p.classList.add('is-hidden'));
|
|
|
|
|
tab.classList.add('is-active');
|
|
|
|
|
const target = tab.getAttribute('data-tab');
|
|
|
|
|
const activePanel = document.querySelector(`.tab-panel[data-tab="${target}"]`);
|
|
|
|
|
if (activePanel) activePanel.classList.remove('is-hidden');
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
</script>
|
|
|
|
|
{% endblock %}
|