From 26b35036ec737e740af805963a0a789242b3bb74 Mon Sep 17 00:00:00 2001 From: Sam Hos Date: Fri, 29 Mar 2024 16:16:08 +0100 Subject: [PATCH] Added graph --- web/newWebsite/GaugGroup.js | 4 +++- web/newWebsite/index.html | 1 + web/newWebsite/main.js | 8 ++++++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/web/newWebsite/GaugGroup.js b/web/newWebsite/GaugGroup.js index 31da446..8b9e427 100644 --- a/web/newWebsite/GaugGroup.js +++ b/web/newWebsite/GaugGroup.js @@ -24,8 +24,10 @@ class GaugeGroup { `).join('')} -
+
+
`; // Append the new div to the body diff --git a/web/newWebsite/index.html b/web/newWebsite/index.html index 52122e5..05f02b7 100644 --- a/web/newWebsite/index.html +++ b/web/newWebsite/index.html @@ -27,6 +27,7 @@ + diff --git a/web/newWebsite/main.js b/web/newWebsite/main.js index a62e059..a97fd96 100644 --- a/web/newWebsite/main.js +++ b/web/newWebsite/main.js @@ -98,9 +98,17 @@ async function nodeAdressHandler(node, dataTypes) { let gaugeGroup = new GaugeGroup(nodeName, nodeLocation, dataTypes.length, maxGaugeValues, dataTypes); sensorData[node] = gaugeGroup; + gaugeGroup.graph = new liveGraph(nodeName); + sensorData[node] = gaugeGroup; + gaugeGroup.graph.makeGraph(); + sensorData[node] = gaugeGroup; + + } } + + function getNodeInfo(node){ return fetch("http://145.92.8.114/getNodeInfo?macAdress=" + node) .then(response => {