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)