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 argparse
|
||||||
import cgi
|
import cgi
|
||||||
|
import errno
|
||||||
import http.server
|
import http.server
|
||||||
import json
|
import json
|
||||||
import logging
|
import logging
|
||||||
|
|
@ -637,7 +638,7 @@ def get_video_resolution():
|
||||||
if res == NOT_AVAILABLE:
|
if res == NOT_AVAILABLE:
|
||||||
return "-"
|
return "-"
|
||||||
|
|
||||||
return res.split(":")[1].strip()
|
return res.splitlines()[0].split(":")[1].strip()
|
||||||
|
|
||||||
|
|
||||||
def is_dual_system():
|
def is_dual_system():
|
||||||
|
|
|
||||||
|
|
@ -35,12 +35,12 @@ Digi Demo - Dashboard
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<div class="nav-right-container">
|
<div class="nav-right-container">
|
||||||
|
<div>
|
||||||
<div>
|
<img src="./static/images/board.png" class="device-title-img" title="Device">
|
||||||
<img src="./static/images/board.png" class="device-title-img" title="Device">
|
</div>
|
||||||
</div>
|
<div id="device-name">DEY DEVICE</div>
|
||||||
<div id="device-name">DEY DEVICE</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
|
|
@ -246,114 +246,40 @@ Digi Demo - Dashboard
|
||||||
</div>
|
</div>
|
||||||
<div class="device-card-content">
|
<div class="device-card-content">
|
||||||
<div class="cpu-info">
|
<div class="cpu-info">
|
||||||
<table>
|
<table>
|
||||||
<tr style="vertical-align: baseline;">
|
<tr style="vertical-align: baseline;">
|
||||||
<td>
|
<td>
|
||||||
<span class="device-card-content-text">Usage:</span>
|
<span class="device-card-content-text">Usage:</span>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<span id="cpu_load" class="device-card-content-value">-</span> %
|
<span id="cpu_load" class="device-card-content-value">-</span> %
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr style="vertical-align: baseline;">
|
<tr style="vertical-align: baseline;">
|
||||||
<td>
|
<td>
|
||||||
<span class="device-card-content-text">Uptime:</span>
|
<span class="device-card-content-text">Uptime:</span>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<span id="cpu_uptime" class="device-card-content-value">-</span>
|
<span id="cpu_uptime" class="device-card-content-value">-</span>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr style="vertical-align: baseline;">
|
<tr style="vertical-align: baseline;">
|
||||||
<td>
|
<td>
|
||||||
<span class="device-card-content-text">Frequency:</span>
|
<span class="device-card-content-text">Frequency:</span>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<span id="cpu_frequency" class="device-card-content-value">-</span> MHz
|
<span id="cpu_frequency" class="device-card-content-value">-</span> MHz
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr style="vertical-align: baseline;">
|
<tr style="vertical-align: baseline;">
|
||||||
<td>
|
<td>
|
||||||
<span class="device-card-content-text">Temperature:</span>
|
<span class="device-card-content-text">Temperature:</span>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<span id="cpu_temperature" class="device-card-content-value">-</span> C
|
<span id="cpu_temperature" class="device-card-content-value">-</span> C
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</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>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -658,6 +658,7 @@ function updateDataPointsValues(response) {
|
||||||
// Iterate the streams in the response.
|
// Iterate the streams in the response.
|
||||||
for (var key in response)
|
for (var key in response)
|
||||||
updateDataPointValue(key, response[key]);
|
updateDataPointValue(key, response[key]);
|
||||||
|
positionComponents();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Updates the given data stream value.
|
// Updates the given data stream value.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue