diff --git a/argos/server/routes/views.py b/argos/server/routes/views.py index 287168d..b126b59 100644 --- a/argos/server/routes/views.py +++ b/argos/server/routes/views.py @@ -18,7 +18,12 @@ templates = Jinja2Templates(directory="argos/server/templates") @route.get("/") -async def get_severity_counts(request: Request, db: Session = Depends(get_db)): +async def get_severity_counts( + request: Request, + db: Session = Depends(get_db), + refresh: bool = False, + delay: int = 15 +): """Shows the number of results per severity""" counts_dict = await queries.get_severity_counts(db) @@ -30,6 +35,8 @@ async def get_severity_counts(request: Request, db: Session = Depends(get_db)): "request": request, "counts_dict": counts_dict, "agents": agents, + "refresh": refresh, + "delay": delay, }, ) diff --git a/argos/server/static/styles.css b/argos/server/static/styles.css index f1d80a8..e4e5764 100644 --- a/argos/server/static/styles.css +++ b/argos/server/static/styles.css @@ -15,3 +15,13 @@ code { margin-top: 0; margin-bottom: 1rem; } + +.inline-label { + display: inline-block; +} +.initial-width { + width: initial !important; +} +#refresh-form { + margin-bottom: 0; +} diff --git a/argos/server/templates/base.html b/argos/server/templates/base.html index 25837d4..f4b6829 100644 --- a/argos/server/templates/base.html +++ b/argos/server/templates/base.html @@ -5,7 +5,12 @@ Argos - + {% if refresh %} + + {% endif %} +
diff --git a/argos/server/templates/index.html b/argos/server/templates/index.html index e1b41bf..93ee3dc 100644 --- a/argos/server/templates/index.html +++ b/argos/server/templates/index.html @@ -1,27 +1,68 @@ {% extends "base.html" %} +{% block title %}

Dashboard

{% endblock %} {% block content %}
-

- {{ agents | length }} agent{% if agents| length > 1 %}s{% endif %} -

+
-
✅ OK
- {{ counts_dict['ok'] }} +
+ {{ counts_dict['unknown'] }}
-
⚠️ Warning
- {{ counts_dict['warning'] }} +
+ {{ counts_dict['ok'] }}
-
❌ Critical
- {{ counts_dict['critical'] }} +
⚠️
+ {{ counts_dict['warning'] }} +
+
+
+ {{ counts_dict['critical'] }}

- Details + + Domains +