From 936c230aa3cca3d0d336e42f3946039f8b5c5147 Mon Sep 17 00:00:00 2001 From: UpstreamData Date: Fri, 4 Mar 2022 15:48:17 -0700 Subject: [PATCH] fixed a bug with scanning and adding miner which didnt append to the navbar --- tools/web_monitor/app.py | 4 +- tools/web_monitor/templates/index.html | 53 ++++++++++++++----------- tools/web_monitor/templates/navbar.html | 2 +- tools/web_monitor/templates/scan.html | 2 + 4 files changed, 34 insertions(+), 27 deletions(-) diff --git a/tools/web_monitor/app.py b/tools/web_monitor/app.py index 3a98743e..3d45debf 100644 --- a/tools/web_monitor/app.py +++ b/tools/web_monitor/app.py @@ -20,8 +20,8 @@ templates = Jinja2Templates(directory="templates") @app.get("/") -def index(): - return dashboard() +def index(request: Request): + return RedirectResponse(request.url_for('dashboard')) @app.get("/dashboard") diff --git a/tools/web_monitor/templates/index.html b/tools/web_monitor/templates/index.html index 939ec539..9b2e9e34 100644 --- a/tools/web_monitor/templates/index.html +++ b/tools/web_monitor/templates/index.html @@ -3,6 +3,9 @@ +{% if cur_miners|length == 0 %}Click here to add miners.{% endif %} + +