From 4757a2957dc1281058b934fe0e18492c8c2881fa Mon Sep 17 00:00:00 2001 From: piair Date: Fri, 25 Aug 2023 15:23:33 +0200 Subject: [PATCH] improvement --- Flask/static/js/main.js | 8 +++++++- Flask/templates/logs.html | 7 +++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/Flask/static/js/main.js b/Flask/static/js/main.js index 7f5a343..d221c46 100644 --- a/Flask/static/js/main.js +++ b/Flask/static/js/main.js @@ -70,4 +70,10 @@ function change_proxy(value) { document.getElementById("port").value = data[parseInt(value)]["port"]; document.getElementById("name").value = data[parseInt(value)]["name"]; } -} \ No newline at end of file +} + + +function change_logs(value) { + data = JSON.parse('{{data|tojson}}'); //convertit le dictionnaire data en JSON +} + diff --git a/Flask/templates/logs.html b/Flask/templates/logs.html index a692d75..124445b 100644 --- a/Flask/templates/logs.html +++ b/Flask/templates/logs.html @@ -40,15 +40,14 @@

Already logged in

{% else %} - + {% for i in data %} - - -{% endfor %} + {% endif %} {% endblock %} \ No newline at end of file