From d00cee34321570356115d45fd841dddac2f359c1 Mon Sep 17 00:00:00 2001 From: Marker689 Date: Sun, 10 May 2026 03:07:07 +0300 Subject: [PATCH] =?UTF-8?q?ui:=20=D1=83=D0=BB=D1=83=D1=87=D1=88=D0=B8?= =?UTF-8?q?=D1=82=D1=8C=20=D0=B4=D0=B0=D1=88=D0=B1=D0=BE=D1=80=D0=B4=20?= =?UTF-8?q?=E2=80=94=20bar-=D0=B3=D1=80=D0=B0=D1=84=D0=B8=D0=BA=D0=B8,=20t?= =?UTF-8?q?ooltips,=20empty=20states,=20spinner=20=D0=B4=D0=BB=D1=8F=20sca?= =?UTF-8?q?nning?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Заменить inline div-графики на styled bars с transition - Добавить tooltips на heatmap - Добавить empty state когда нет findings - Добавить spinner для статуса scanning - Добавить breadcrumbs на dashboard - Добавить title block --- guarddog_nexus/web/templates/dashboard.html | 8 +++ .../web/templates/dashboard_stats.html | 50 ++++++++++++------- 2 files changed, 39 insertions(+), 19 deletions(-) diff --git a/guarddog_nexus/web/templates/dashboard.html b/guarddog_nexus/web/templates/dashboard.html index d55d475..cb23fad 100644 --- a/guarddog_nexus/web/templates/dashboard.html +++ b/guarddog_nexus/web/templates/dashboard.html @@ -1,4 +1,12 @@ {% extends "base.html" %} +{% block title %}Dashboard — GuardDog Nexus{% endblock %} +{% block breadcrumbs %} + +{% endblock %} {% block content %}

Dashboard

diff --git a/guarddog_nexus/web/templates/dashboard_stats.html b/guarddog_nexus/web/templates/dashboard_stats.html index 9aee305..99eaffa 100644 --- a/guarddog_nexus/web/templates/dashboard_stats.html +++ b/guarddog_nexus/web/templates/dashboard_stats.html @@ -26,30 +26,37 @@ {% if total_findings > 0 %} -
+
Severity ratio -
+
{% set err_pct = (errors_count / total_findings * 100) | int %} {% set warn_pct = 100 - err_pct %} -
-
+
+
-
+
ERROR {{ errors_count }} WARNING {{ warnings_count }}
+{% else %} +
+ +

No findings yet

+ Scan results will appear here once packages are processed. +
{% endif %} {% if days %} -
+
Scan activity (14 days) -
+
{% set max_cnt = days | map(attribute=1) | max %} {% for day, cnt, fl in days %} -
+
{% set h = (cnt / max_cnt * 38) | int if max_cnt > 0 else 0 %} -
+
+
{{ day }}: {{ cnt }} scans, {{ fl }} flagged
{% endfor %}
@@ -57,7 +64,7 @@ {% endif %} {% if most_flagged %} -
+

⚠ Most Flagged Packages

@@ -80,7 +87,7 @@ {% endif %} {% if latest_flagged %} -
+

🔴 Latest Flagged

@@ -118,7 +125,9 @@ - + @@ -128,15 +137,18 @@ View all scans → {% if top_rules %} -

Top Rules Triggered

-
{{ s.package_name }} {{ s.package_version }} {{ s.repository }}{{ s.status }} + {% if s.status == 'scanning' %}scanning{% else %}{{ s.status }}{% endif %} + {% if s.flagged %}⚠ {{ s.total_findings }}{% elif s.status == 'completed' %}{% else %}-{% endif %} {{ s.started_at.strftime('%m-%d %H:%M') if s.started_at }}
- - +
+

Top Rules Triggered

{% for rule, cnt in top_rules %} -
+
+ {{ rule }} +
+
+
+ {{ cnt }} +
{% endfor %} - -
RuleCount
{{ rule }}{{ cnt }}
+
{% endif %} Last refresh: {{ now.strftime('%H:%M:%S') }} (auto every 30s)