| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342 |
- <!DOCTYPE html>
- <html lang="en" xml:lang="en">
- <head>
- <title>Info</title>
- <meta charset="UTF-8" />
- <style>
- h1 {font-size: 2em;}
- h2 {font-size: 1.5em;}
- h3 {font-size: 1.2em;}
- p {font-size: 1em;}
- th, td {
- padding: 5px 5px 5px 5px;
- border-width: 1px;
- border-style: solid;
- border-color: rgb(240, 240, 240);
- }
- output {
- padding-left:5px;
- }
- table {
- width: 660px;
- padding: 5px;
- border-collapse:collapse;
- }
- </style>
- <script type="text/javascript" src="common.js?v=$COMMIT_HASH"></script>
- </head>
- <body style="font-family: arial; padding: 0px 10px;">
- <table>
- <caption><h3>Runtime Information</h3></caption>
- <colgroup>
- <col span="1" style="width: 35%;">
- <col span="1" style="width: 65%;">
- </colgroup>
- <tr>
- <td>Start time:</td>
- <td><output id="starttime"></output></td>
- </tr>
- <tr>
- <td>Uptime:</td>
- <td><output id="uptime"></output></td>
- </tr>
- </table>
- <table>
- <caption><h3>Build Info</h3></caption>
- <colgroup>
- <col span="1" style="width: 35%;">
- <col span="1" style="width: 65%;">
- </colgroup>
- <tr>
- <td>Firmware version:</td>
- <td>
- <output id="firmware"></output>
- </td>
- </tr>
- <tr>
- <td>Firmware build time:</td>
- <td>
- <output id="build-time"></output>
- </td>
- </tr>
- <tr>
- <td>Web interface version:</td>
- <td>
- <output id="web-ui"></output>
- </td>
- </tr>
- </table>
- <table>
- <caption><h3>Device Info</h3></caption>
- <colgroup>
- <col span="1" style="width: 35%;">
- <col span="1" style="width: 65%;">
- </colgroup>
- <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>
- <caption><h3>Host Info</h3></caption>
- <colgroup>
- <col span="1" style="width: 35%;">
- <col span="1" style="width: 65%;">
- </colgroup>
- <tr>
- <td>Hostname:</td>
- <td>
- <output id="hostname"></output>
- </td>
- </tr>
- <tr>
- <td>IP Address:</td>
- <td>
- <output id="IP-address"></output>
- </td>
- </tr>
- <tr>
- <td>WLAN SSID:</td>
- <td>
- <output id="wlan-ssid"></output>
- </td>
- </tr>
- </table>
- <table>
- <caption><h3>SD Card Info</h3></caption>
- <colgroup>
- <col span="1" style="width: 35%;">
- <col span="1" style="width: 65%;">
- </colgroup>
- <tr>
- <td>SD card manufacturer:</td>
- <td>
- <output id="SDCardManufacturer"></output>
- </td>
- </tr>
- <tr>
- <td>SD card name:</td>
- <td>
- <output id="SDCardName"></output>
- </td>
- </tr>
- <tr>
- <td>SD card size:</td>
- <td>
- <output id="SDCardCapacity"></output>
- </td>
- </tr>
- <tr>
- <td>SD card sector size:</td>
- <td>
- <output id="SDCardSectorSize"></output>
- </td>
- </tr>
- <tr>
- <td>Partition size:</td>
- <td>
- <output id="SDCardPartitionSize"></output>
- </td>
- </tr>
- <tr>
- <td>Partition free space:</td>
- <td>
- <output id="SDCardFreePartitionSpace"></output>
- </td>
- </tr>
- <tr>
- <td>Partition allocation size:</td>
- <td>
- <output id="SDCardPartitionAllocationSize"></output>
- </td>
- </tr>
- </table>
- <table>
- <caption><h3>Memory Info</h3></caption>
- <colgroup>
- <col span="1" style="width: 35%;">
- <col span="1" style="width: 65%;">
- </colgroup>
- <tr>
- <td>Total Free (Int + Ext):</td>
- <td>
- <output id="RAMTotalFree"></output>
- </td>
- </tr>
- <tr>
- <td>Ext. RAM - Free:</td>
- <td>
- <output id="ExtRAMFree"></output>
- </td>
- </tr>
- <tr>
- <td>Ext. RAM - Largest Free Block:</td>
- <td>
- <output id="ExtRAMLargestFree"></output>
- </td>
- </tr>
- <tr>
- <td>Ext. RAM - Min Free:</td>
- <td>
- <output id="ExtRAMMinFree"></output>
- </td>
- </tr>
- <tr>
- <td>Int. RAM - Free:</td>
- <td>
- <output id="IntRAMFree"></output>
- </td>
- </tr>
- <tr>
- <td>Int. RAM - Largest Free Block:</td>
- <td>
- <output id="IntRAMLargestFree"></output>
- </td>
- </tr>
- <tr>
- <td>Int. RAM - Min Free:</td>
- <td>
- <output id="IntRAMMinFree"></output>
- </td>
- </tr>
- </table>
- <h3>Copyright</h3>
- Copyright © 2020 - 2024 by <a href="https://github.com/jomjol/AI-on-the-edge-device" target=_blank>Jomjol</a> and others.
- <script type="text/javascript">
- function setOutput(id, value, suffix)
- {
- var field = document.getElementById(id);
- if (!field) {
- return;
- }
-
- if (value === undefined || value === null || value === "") {
- field.value = "N/A";
- } else {
- field.value = String(value) + (suffix || "");
- }
- }
-
- function formatStartTime(value)
- {
- if (!value || value.length < 15) {
- return value || "";
- }
-
- // Input format: YYYYMMDD-HHMMSS
- return value.substr(6, 2) + "." +
- value.substr(4, 2) + "." +
- value.substr(0, 4) + " " +
- value.substr(9, 2) + ":" +
- value.substr(11, 2) + ":" +
- value.substr(13, 2);
- }
-
- function formatBuildTime(value)
- {
- if (!value || value.length < 16) {
- return value || "";
- }
-
- // Input format: YYYY-MM-DD HH:MM
- return value.substr(8, 2) + "." +
- value.substr(5, 2) + "." +
- value.substr(0, 4) + " " +
- value.substr(11, 2) + ":" +
- value.substr(14, 2);
- }
-
- function loadSystemInfo()
- {
- var request = new XMLHttpRequest();
- request.onreadystatechange = function() {
- if (this.readyState !== 4) {
- return;
- }
-
- if (this.status !== 200) {
- console.error("Could not load system information:", this.status);
- return;
- }
-
- try {
- var response = JSON.parse(this.responseText);
- var info = Array.isArray(response) ? response[0] : response;
- if (!info || typeof info !== "object") {
- throw new Error("Invalid system information response");
- }
-
- setOutput("starttime", formatStartTime(info.starttime));
- setOutput("uptime", info.uptime);
- setOutput("firmware", info.firmware);
- setOutput("build-time", formatBuildTime(info.buildtime));
- setOutput("web-ui", info.html);
-
- setOutput("chip-cores", info.chipCores);
- setOutput("chip-revision", info.chipRevision);
- setOutput("chip-features", info.chipFeatures);
-
- setOutput("hostname", info.hostname);
- setOutput("IP-address", info.IPv4);
- setOutput("wlan-ssid", info.SSID);
-
- setOutput("SDCardManufacturer", info.sdCardManufacturer);
- setOutput("SDCardName", info.sdCardName);
- setOutput("SDCardCapacity", info.sdCardCapacity, " MB");
- setOutput("SDCardSectorSize", info.sdCardSectorSize, " byte");
- setOutput("SDCardPartitionSize", info.sdCardPartitionSize, " MB");
- setOutput("SDCardFreePartitionSpace", info.sdCardFreePartitionSpace, " MB");
- setOutput("SDCardPartitionAllocationSize", info.sdCardPartitionAllocationSize, " byte");
-
- setOutput("RAMTotalFree", info.RAMTotalFree, " byte");
- setOutput("ExtRAMFree", info.ExtRAMFree, " byte");
- setOutput("ExtRAMLargestFree", info.ExtRAMLargestFree, " byte");
- setOutput("ExtRAMMinFree", info.ExtRAMMinFree, " byte");
- setOutput("IntRAMFree", info.IntRAMFree, " byte");
- setOutput("IntRAMLargestFree", info.IntRAMLargestFree, " byte");
- setOutput("IntRAMMinFree", info.IntRAMMinFree, " byte");
- } catch (error) {
- console.error("Could not parse system information:", error);
- }
- };
-
- request.open("GET", getDomainname() + "/sysinfo", true);
- request.send();
- }
-
- loadSystemInfo();
- </script>
- </body>
- </html>
|