From 9e5eb27132acac32088fef01098d3ab38ce75a4b Mon Sep 17 00:00:00 2001 From: David Escalona Date: Mon, 4 Jul 2022 18:12:15 +0200 Subject: [PATCH] connectcore-demo-example: general fixes and tweaks - Removed CPU core sections from 'index.html' - Fixed missing div in 'index.html' - Added missing 'errno' import in 'demoserver.py' - Reposition components when new data is received in 'dashboard.js' - Improved display resolution read for multiline files. Signed-off-by: David Escalona --- connectcore-demo-example/demoserver.py | 3 +- connectcore-demo-example/index.html | 154 +++++------------- .../static/js/dashboard.js | 1 + 3 files changed, 43 insertions(+), 115 deletions(-) diff --git a/connectcore-demo-example/demoserver.py b/connectcore-demo-example/demoserver.py index f595566..9f90277 100755 --- a/connectcore-demo-example/demoserver.py +++ b/connectcore-demo-example/demoserver.py @@ -16,6 +16,7 @@ import argparse import cgi +import errno import http.server import json import logging @@ -637,7 +638,7 @@ def get_video_resolution(): if res == NOT_AVAILABLE: return "-" - return res.split(":")[1].strip() + return res.splitlines()[0].split(":")[1].strip() def is_dual_system(): diff --git a/connectcore-demo-example/index.html b/connectcore-demo-example/index.html index 956e10c..d239de6 100644 --- a/connectcore-demo-example/index.html +++ b/connectcore-demo-example/index.html @@ -35,12 +35,12 @@ Digi Demo - Dashboard - @@ -246,114 +246,40 @@ Digi Demo - Dashboard
- - - - - - - - - - - - - - - - - -
- Usage: - - - % -
- Uptime: - - - -
- Frequency: - - - MHz -
- Temperature: - - - C -
-
-
-
- - - - - - - - - - -
-
- - Core 1 -
-
- %
- MHz
-
-
- - - - - - - - - - -
-
- - Core 2 -
-
- %
- MHz
-
-
- - - - - - - - - - -
-
- - Core 3 -
-
- %
- MHz
-
-
- - - - - - - - - - -
-
- - Core 4 -
-
- %
- MHz
-
+ + + + + + + + + + + + + + + + + +
+ Usage: + + - % +
+ Uptime: + + - +
+ Frequency: + + - MHz +
+ Temperature: + + - C +
diff --git a/connectcore-demo-example/static/js/dashboard.js b/connectcore-demo-example/static/js/dashboard.js index f75e38f..e6a31e1 100644 --- a/connectcore-demo-example/static/js/dashboard.js +++ b/connectcore-demo-example/static/js/dashboard.js @@ -658,6 +658,7 @@ function updateDataPointsValues(response) { // Iterate the streams in the response. for (var key in response) updateDataPointValue(key, response[key]); + positionComponents(); } // Updates the given data stream value.