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 <david.escalona@digi.com>
This commit is contained in:
parent
ab0be5c698
commit
9e5eb27132
|
|
@ -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():
|
||||
|
|
|
|||
|
|
@ -35,12 +35,12 @@ Digi Demo - Dashboard
|
|||
</div>
|
||||
</a>
|
||||
|
||||
<div class="nav-right-container">
|
||||
|
||||
<div>
|
||||
<img src="./static/images/board.png" class="device-title-img" title="Device">
|
||||
</div>
|
||||
<div id="device-name">DEY DEVICE</div>
|
||||
<div class="nav-right-container">
|
||||
<div>
|
||||
<img src="./static/images/board.png" class="device-title-img" title="Device">
|
||||
</div>
|
||||
<div id="device-name">DEY DEVICE</div>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
|
|
@ -246,114 +246,40 @@ Digi Demo - Dashboard
|
|||
</div>
|
||||
<div class="device-card-content">
|
||||
<div class="cpu-info">
|
||||
<table>
|
||||
<tr style="vertical-align: baseline;">
|
||||
<td>
|
||||
<span class="device-card-content-text">Usage:</span>
|
||||
</td>
|
||||
<td>
|
||||
<span id="cpu_load" class="device-card-content-value">-</span> %
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="vertical-align: baseline;">
|
||||
<td>
|
||||
<span class="device-card-content-text">Uptime:</span>
|
||||
</td>
|
||||
<td>
|
||||
<span id="cpu_uptime" class="device-card-content-value">-</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="vertical-align: baseline;">
|
||||
<td>
|
||||
<span class="device-card-content-text">Frequency:</span>
|
||||
</td>
|
||||
<td>
|
||||
<span id="cpu_frequency" class="device-card-content-value">-</span> MHz
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="vertical-align: baseline;">
|
||||
<td>
|
||||
<span class="device-card-content-text">Temperature:</span>
|
||||
</td>
|
||||
<td>
|
||||
<span id="cpu_temperature" class="device-card-content-value">-</span> C
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="cores">
|
||||
<div id="core-1" class="core">
|
||||
<table class="core-table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td rowspan="2">
|
||||
<div class="core-name-container">
|
||||
<span class="digi-icon-color fas fa-microchip fa-2x"></span>
|
||||
<span>Core 1</span>
|
||||
</div>
|
||||
</td>
|
||||
<td><span id="core-1-usage">-</span> %</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><span id="core-1-speed">-</span> MHz</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div id="core-2" class="core">
|
||||
<table class="core-table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td rowspan="2">
|
||||
<div class="core-name-container">
|
||||
<span class="digi-icon-color fas fa-microchip fa-2x"></span>
|
||||
<span>Core 2</span>
|
||||
</div>
|
||||
</td>
|
||||
<td><span id="core-2-usage">-</span> %</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><span id="core-2-speed">-</span> MHz</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div id="core-3" class="core">
|
||||
<table class="core-table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td rowspan="2">
|
||||
<div class="core-name-container">
|
||||
<span class="digi-icon-color fas fa-microchip fa-2x"></span>
|
||||
<span>Core 3</span>
|
||||
</div>
|
||||
</td>
|
||||
<td><span id="core-3-usage">-</span> %</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><span id="core-3-speed">-</span> MHz</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div id="core-4" class="core">
|
||||
<table class="core-table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td rowspan="2">
|
||||
<div class="core-name-container">
|
||||
<span class="digi-icon-color fas fa-microchip fa-2x"></span>
|
||||
<span>Core 4</span>
|
||||
</div>
|
||||
</td>
|
||||
<td><span id="core-4-usage">-</span> %</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><span id="core-4-speed">-</span> MHz</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<table>
|
||||
<tr style="vertical-align: baseline;">
|
||||
<td>
|
||||
<span class="device-card-content-text">Usage:</span>
|
||||
</td>
|
||||
<td>
|
||||
<span id="cpu_load" class="device-card-content-value">-</span> %
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="vertical-align: baseline;">
|
||||
<td>
|
||||
<span class="device-card-content-text">Uptime:</span>
|
||||
</td>
|
||||
<td>
|
||||
<span id="cpu_uptime" class="device-card-content-value">-</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="vertical-align: baseline;">
|
||||
<td>
|
||||
<span class="device-card-content-text">Frequency:</span>
|
||||
</td>
|
||||
<td>
|
||||
<span id="cpu_frequency" class="device-card-content-value">-</span> MHz
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="vertical-align: baseline;">
|
||||
<td>
|
||||
<span class="device-card-content-text">Temperature:</span>
|
||||
</td>
|
||||
<td>
|
||||
<span id="cpu_temperature" class="device-card-content-value">-</span> C
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Reference in New Issue