Add device info info page (#2789)

Signed-off-by: Florian Grabmeier <flo.grabmeier@gmail.com>
This commit is contained in:
flox_x
2024-01-08 23:23:57 +01:00
committed by GitHub
parent eb7f2b3705
commit 252c399a76
2 changed files with 85 additions and 0 deletions

View File

@@ -79,6 +79,34 @@ table {
</tr>
</table>
<table>
<colgroup>
<col span="1" style="width: 35%;">
<col span="1" style="width: 65%;">
</colgroup>
<tr>
<h3>Device Info</h3>
</tr>
<tr>
<td>Chip Cores:</td>
<td>
<output id="chip-cores"></output>
</td>
</tr>
<tr>
<td>Chip Revision:</td>
<td>
<output id="chip-revision"></output>
</td>
</tr>
<tr>
<td>Chip Features:</td>
<td>
<output id="chip-features"></output>
</td>
</tr>
</table>
<table>
<colgroup>
@@ -475,6 +503,45 @@ Copyright &copy; 2020 - 2023 by <a href="https://github.com/jomjol/AI-on-the-edg
xhttp.send();
}
function loadChipCores()
{
url = getDomainname() + '/info?type=ChipCores';
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
document.getElementById("chip-cores").value = xhttp.response;
}
}
xhttp.open("GET", url, true);
xhttp.send();
}
function loadChipRevision()
{
url = getDomainname() + '/info?type=ChipRevision';
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
document.getElementById("chip-revision").value = xhttp.response;
}
}
xhttp.open("GET", url, true);
xhttp.send();
}
function loadChipFeatures()
{
url = getDomainname() + '/info?type=ChipFeatures';
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
document.getElementById("chip-features").value = xhttp.response;
}
}
xhttp.open("GET", url, true);
xhttp.send();
}
function init()
{
loadMemoryInfo();
@@ -493,6 +560,9 @@ Copyright &copy; 2020 - 2023 by <a href="https://github.com/jomjol/AI-on-the-edg
loadSDCardPartitionSize();
loadSDCardFreePartitionSpace();
loadSDCardPartitionAllocationSize();
loadChipCores();
loadChipRevision();
loadChipFeatures();
}
init();