diff --git a/app/flask_app/static/history.svg b/app/flask_app/static/history.svg new file mode 100644 index 0000000..6a94fee --- /dev/null +++ b/app/flask_app/static/history.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/flask_app/templates/home.html b/app/flask_app/templates/home.html index c7dbddc..271fce7 100644 --- a/app/flask_app/templates/home.html +++ b/app/flask_app/templates/home.html @@ -30,12 +30,12 @@ const interval = 5000; // 5 seconds between requests const progressBar = document.getElementById('progressBar'); + const chartURL = "{{ url_for("main.chart", id=0) }}" function fetchData() { fetch(url, { cache: 'no-store' }) .then(response => response.json()) .then(data => { - console.log(data) updateWebpage(data) }) .catch(error => console.error("Error fetching data", error)) @@ -75,8 +75,8 @@ // Build all service divs as a single string main_body.innerHTML = services.map(s => ` - -
+
+

${s.label}

@@ -89,14 +89,33 @@
${s.ping ? s.ping + "ms" : ""}
- - + + + + + `).join(''); // join into a single string } fetchData(); // start the loop + + +