From 2c93f1f395a36d1cf02efb64bcde093c1de603db Mon Sep 17 00:00:00 2001 From: UpstreamData Date: Fri, 4 Mar 2022 14:36:43 -0700 Subject: [PATCH] updated some formatting on charts --- tools/web_monitor/app.py | 2 +- tools/web_monitor/templates/index.html | 2 +- tools/web_monitor/templates/miner.html | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/tools/web_monitor/app.py b/tools/web_monitor/app.py index 87e25594..3a98743e 100644 --- a/tools/web_monitor/app.py +++ b/tools/web_monitor/app.py @@ -154,7 +154,7 @@ async def miner_websocket(websocket: WebSocket, miner_ip): "fans": fan_speeds, "datetime": datetime.datetime.now().isoformat()} await websocket.send_json(data) - await asyncio.sleep(5) + await asyncio.sleep(1) except asyncio.exceptions.TimeoutError: data = {"error": "The miner is not responding."} await websocket.send_json(data) diff --git a/tools/web_monitor/templates/index.html b/tools/web_monitor/templates/index.html index 8b825197..939ec539 100644 --- a/tools/web_monitor/templates/index.html +++ b/tools/web_monitor/templates/index.html @@ -77,7 +77,7 @@ var minerDataChart = new Chart(document.getElementById("line-chart"), { options: { animation: { easing: 'easeInSine', - duration: 250 + duration: 0 }, plugins: { chartAreaBorder: { diff --git a/tools/web_monitor/templates/miner.html b/tools/web_monitor/templates/miner.html index 8b4db976..bbc24e3c 100644 --- a/tools/web_monitor/templates/miner.html +++ b/tools/web_monitor/templates/miner.html @@ -134,7 +134,7 @@ var minerDataChart = new Chart(document.getElementById("line-chart"), { options: { animation: { easing: 'easeInSine', - duration: 250 + duration: 0 }, plugins: { chartAreaBorder: { @@ -177,7 +177,8 @@ var minerDataChart = new Chart(document.getElementById("line-chart"), { var options_fans = { animation: { - duration: 0, + easing: 'easeInSine', + duration: 250, }, aspectRatio: 1.5, events: [],