From cad98490197eec0178273514b381dd1827c2706b Mon Sep 17 00:00:00 2001 From: Allan Eising Date: Thu, 19 Jun 2025 06:20:33 +0200 Subject: [PATCH] Update audit and change-password page --- .../frontend/templates/audit/index.html.j2 | 60 +------------------ .../templates/change_password/index.html.j2 | 8 ++- .../templates/change_password/success.html.j2 | 9 ++- .../sshecret_admin/frontend/views/audit.py | 3 +- 4 files changed, 17 insertions(+), 63 deletions(-) diff --git a/packages/sshecret-admin/src/sshecret_admin/frontend/templates/audit/index.html.j2 b/packages/sshecret-admin/src/sshecret_admin/frontend/templates/audit/index.html.j2 index 7822b27..f86742d 100644 --- a/packages/sshecret-admin/src/sshecret_admin/frontend/templates/audit/index.html.j2 +++ b/packages/sshecret-admin/src/sshecret_admin/frontend/templates/audit/index.html.j2 @@ -1,60 +1,6 @@ -{% extends "/dashboard/_base.html" %} {% block content %} -
-
-
- -

Audit Log

-
-
-
+{% extends "/base/page.html.j2" %} +{% block title %}Audit{% endblock %} +{% block page_content %}
{% include 'audit/inner.html.j2' %}
diff --git a/packages/sshecret-admin/src/sshecret_admin/frontend/templates/change_password/index.html.j2 b/packages/sshecret-admin/src/sshecret_admin/frontend/templates/change_password/index.html.j2 index 2f10a8e..e826bcd 100644 --- a/packages/sshecret-admin/src/sshecret_admin/frontend/templates/change_password/index.html.j2 +++ b/packages/sshecret-admin/src/sshecret_admin/frontend/templates/change_password/index.html.j2 @@ -1,5 +1,9 @@ -{% extends "/dashboard/_base.html" %} {% block content %} -
+{% extends "/base/page.html.j2" %} +{% block title %}Change Password{% endblock %} + +{% block page_content %} + +

Change Password diff --git a/packages/sshecret-admin/src/sshecret_admin/frontend/templates/change_password/success.html.j2 b/packages/sshecret-admin/src/sshecret_admin/frontend/templates/change_password/success.html.j2 index 748faec..dd7b081 100644 --- a/packages/sshecret-admin/src/sshecret_admin/frontend/templates/change_password/success.html.j2 +++ b/packages/sshecret-admin/src/sshecret_admin/frontend/templates/change_password/success.html.j2 @@ -1,5 +1,8 @@ -{% extends "/dashboard/_base.html" %} {% block content %} -
+ +{% extends "/base/page.html.j2" %} + + {% block page_content %} +

Password Changed

Your password was changed sucessfully. Next time you log in, use your new password.

@@ -9,4 +12,4 @@
-{% endblock content %} +{% endblock %} diff --git a/packages/sshecret-admin/src/sshecret_admin/frontend/views/audit.py b/packages/sshecret-admin/src/sshecret_admin/frontend/views/audit.py index 9c042d3..9462448 100644 --- a/packages/sshecret-admin/src/sshecret_admin/frontend/views/audit.py +++ b/packages/sshecret-admin/src/sshecret_admin/frontend/views/audit.py @@ -42,6 +42,7 @@ def create_router(dependencies: FrontendDependencies) -> APIRouter: page=page, limit=per_page, total=audit_log.total, offset=offset ) operations = list(Operation) + breadcrumbs = [("Audit", "/audit/")] if request.headers.get("HX-Request"): return templates.TemplateResponse( request, @@ -56,7 +57,7 @@ def create_router(dependencies: FrontendDependencies) -> APIRouter: request, "audit/index.html.j2", { - "page_title": "Audit", + "breadcrumbs": breadcrumbs, "entries": audit_log.results, "user": current_user, "page_info": page_info,