info.html 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543
  1. <!DOCTYPE html>
  2. <html lang="en" xml:lang="en">
  3. <head>
  4. <meta charset="UTF-8"/>
  5. <title>Info</title>
  6. <style>
  7. h1 {font-size: 2em;}
  8. h2 {font-size: 1.5em;}
  9. h3 {font-size: 1.2em;}
  10. p {font-size: 1em;}
  11. th, td {
  12. padding: 5px 5px 5px 5px;
  13. border-width: 1px;
  14. border-style: solid;
  15. border-color: rgb(240, 240, 240);
  16. }
  17. output {
  18. padding-left:5px;
  19. }
  20. table {
  21. width: 660px;
  22. padding: 5px;
  23. border-collapse:collapse;
  24. }
  25. </style>
  26. <script type="text/javascript" src="common.js?v=$COMMIT_HASH"></script>
  27. </head>
  28. <body style="font-family: arial; padding: 0px 10px;">
  29. <table>
  30. <colgroup>
  31. <col span="1" style="width: 35%;">
  32. <col span="1" style="width: 65%;">
  33. </colgroup>
  34. <tr>
  35. <h3>Runtime Information</h3>
  36. </tr>
  37. <tr>
  38. <td>Start time:</td>
  39. <td><output id="starttime"></output></td>
  40. </tr>
  41. <tr>
  42. <td>Uptime:</td>
  43. <td><output id="uptime"></output></td>
  44. </tr>
  45. </table>
  46. <table>
  47. <colgroup>
  48. <col span="1" style="width: 35%;">
  49. <col span="1" style="width: 65%;">
  50. </colgroup>
  51. <tr>
  52. <h3>Build Info</h3>
  53. </tr>
  54. <tr>
  55. <td>Firmware version:</td>
  56. <td>
  57. <output id="firmware"></output>
  58. </td>
  59. </tr>
  60. <tr>
  61. <td>Firmware build time:</td>
  62. <td>
  63. <output id="build-time"></output>
  64. </td>
  65. </tr>
  66. <tr>
  67. <td>Web interface version:</td>
  68. <td>
  69. <output id="web-ui"></output>
  70. </td>
  71. </tr>
  72. </table>
  73. <table>
  74. <colgroup>
  75. <col span="1" style="width: 35%;">
  76. <col span="1" style="width: 65%;">
  77. </colgroup>
  78. <tr>
  79. <h3>Device Info</h3>
  80. </tr>
  81. <tr>
  82. <td>Chip Cores:</td>
  83. <td>
  84. <output id="chip-cores"></output>
  85. </td>
  86. </tr>
  87. <tr>
  88. <td>Chip Revision:</td>
  89. <td>
  90. <output id="chip-revision"></output>
  91. </td>
  92. </tr>
  93. <tr>
  94. <td>Chip Features:</td>
  95. <td>
  96. <output id="chip-features"></output>
  97. </td>
  98. </tr>
  99. </table>
  100. <table>
  101. <colgroup>
  102. <col span="1" style="width: 35%;">
  103. <col span="1" style="width: 65%;">
  104. </colgroup>
  105. <tr>
  106. <h3>Host Info</h3>
  107. </tr>
  108. <tr>
  109. <td>Hostname:</td>
  110. <td>
  111. <output id="hostname"></output>
  112. </td>
  113. </tr>
  114. <tr>
  115. <td>IP Address:</td>
  116. <td>
  117. <output id="IP-address"></output>
  118. </td>
  119. </tr>
  120. <tr>
  121. <td>WLAN SSID:</td>
  122. <td>
  123. <output id="wlan-ssid"></output>
  124. </td>
  125. </tr>
  126. </table>
  127. <table>
  128. <colgroup>
  129. <col span="1" style="width: 35%;">
  130. <col span="1" style="width: 65%;">
  131. </colgroup>
  132. <tr>
  133. <h3>SD Card Info</h3>
  134. </tr>
  135. <tr>
  136. <td>SD card manufacturer:</td>
  137. <td>
  138. <output id="SDCardManufacturer"></output>
  139. </td>
  140. </tr>
  141. <tr>
  142. <td>SD card name:</td>
  143. <td>
  144. <output id="SDCardName"></output>
  145. </td>
  146. </tr>
  147. <tr>
  148. <td>SD card size:</td>
  149. <td>
  150. <output id="SDCardCapacity"></output>
  151. </td>
  152. </tr>
  153. <tr>
  154. <td>SD card sector size:</td>
  155. <td>
  156. <output id="SDCardSectorSize"></output>
  157. </td>
  158. </tr>
  159. <tr>
  160. <td>Partition size:</td>
  161. <td>
  162. <output id="SDCardPartitionSize"></output>
  163. </td>
  164. </tr>
  165. <tr>
  166. <td>Partition free space:</td>
  167. <td>
  168. <output id="SDCardFreePartitionSpace"></output>
  169. </td>
  170. </tr>
  171. <tr>
  172. <td>Partition allocation size:</td>
  173. <td>
  174. <output id="SDCardPartitionAllocationSize"></output>
  175. </td>
  176. </tr>
  177. </table>
  178. <table>
  179. <colgroup>
  180. <col span="1" style="width: 35%;">
  181. <col span="1" style="width: 65%;">
  182. </colgroup>
  183. <tr>
  184. <h3>Memory Info</h3>
  185. </tr>
  186. <tr>
  187. <td>Total Free (Int + Ext):</td>
  188. <td>
  189. <output id="RAMTotalFree"></output>
  190. </td>
  191. </tr>
  192. <tr>
  193. <td>Ext. RAM - Free:</td>
  194. <td>
  195. <output id="ExtRAMFree"></output>
  196. </td>
  197. </tr>
  198. <tr>
  199. <td>Ext. RAM - Largest Free Block:</td>
  200. <td>
  201. <output id="ExtRAMLargestFree"></output>
  202. </td>
  203. </tr>
  204. <tr>
  205. <td>Ext. RAM - Min Free:</td>
  206. <td>
  207. <output id="ExtRAMMinFree"></output>
  208. </td>
  209. </tr>
  210. <tr>
  211. <td>Int. RAM - Free:</td>
  212. <td>
  213. <output id="IntRAMFree"></output>
  214. </td>
  215. </tr>
  216. <tr>
  217. <td>Int. RAM - Largest Free Block:</td>
  218. <td>
  219. <output id="IntRAMLargestFree"></output>
  220. </td>
  221. </tr>
  222. <tr>
  223. <td>Int. RAM - Min Free:</td>
  224. <td>
  225. <output id="IntRAMMinFree"></output>
  226. </td>
  227. </tr>
  228. </table>
  229. <h3>Copyright</h3>
  230. Copyright &copy; 2020 - 2024 by <a href="https://github.com/jomjol/AI-on-the-edge-device" target=_blank>Jomjol</a> and others.
  231. </body>
  232. </html>
  233. <script type="text/javascript">
  234. function loadLastRestart()
  235. {
  236. url = getDomainname() + '/starttime';
  237. var xhttp = new XMLHttpRequest();
  238. xhttp.onreadystatechange = function() {
  239. if (this.readyState == 4 && this.status == 200) {
  240. //Input format: 19700101-010019
  241. var timestamp = xhttp.response.substr(6,2) + "." +
  242. xhttp.response.substr(4,2) + "." +
  243. xhttp.response.substr(0,4) + " " +
  244. xhttp.response.substr(9,2) + ":" +
  245. xhttp.response.substr(11,2) + ":" +
  246. xhttp.response.substr(13,2);
  247. document.getElementById("starttime").value = timestamp;
  248. }
  249. }
  250. xhttp.open("GET", url, true);
  251. xhttp.send();
  252. }
  253. function loadUptime()
  254. {
  255. url = getDomainname() + '/uptime';
  256. var xhttp = new XMLHttpRequest();
  257. xhttp.onreadystatechange = function() {
  258. if (this.readyState == 4 && this.status == 200) {
  259. document.getElementById("uptime").value = xhttp.response;
  260. }
  261. }
  262. xhttp.open("GET", url, true);
  263. xhttp.send();
  264. }
  265. function loadFWVersion()
  266. {
  267. url = getDomainname() + '/info?type=FirmwareVersion';
  268. var xhttp = new XMLHttpRequest();
  269. xhttp.onreadystatechange = function() {
  270. if (this.readyState == 4 && this.status == 200) {
  271. document.getElementById("firmware").value = xhttp.response;
  272. }
  273. }
  274. xhttp.open("GET", url, true);
  275. xhttp.send();
  276. }
  277. function loadFWBuildTime()
  278. {
  279. url = getDomainname() + '/info?type=BuildTime';
  280. var xhttp = new XMLHttpRequest();
  281. xhttp.onreadystatechange = function() {
  282. if (this.readyState == 4 && this.status == 200) {
  283. // Input format: 2023-04-02 10:56
  284. var timestamp = xhttp.response.substr(8,2) + "." +
  285. xhttp.response.substr(5,2) + "." +
  286. xhttp.response.substr(0,4) + " " +
  287. xhttp.response.substr(11,2) + ":" +
  288. xhttp.response.substr(14,2);
  289. document.getElementById("build-time").value = timestamp;
  290. }
  291. }
  292. xhttp.open("GET", url, true);
  293. xhttp.send();
  294. }
  295. function loadHTMLVersion()
  296. {
  297. url = getDomainname() + '/info?type=HTMLVersion';
  298. var xhttp = new XMLHttpRequest();
  299. xhttp.onreadystatechange = function() {
  300. if (this.readyState == 4 && this.status == 200) {
  301. document.getElementById("web-ui").value = xhttp.response;
  302. }
  303. }
  304. xhttp.open("GET", url, true);
  305. xhttp.send();
  306. }
  307. function loadHostname()
  308. {
  309. url = getDomainname() + '/info?type=Hostname';
  310. var xhttp = new XMLHttpRequest();
  311. xhttp.onreadystatechange = function() {
  312. if (this.readyState == 4 && this.status == 200) {
  313. document.getElementById("hostname").value = xhttp.response;
  314. }
  315. }
  316. xhttp.open("GET", url, true);
  317. xhttp.send();
  318. }
  319. function loadIPAddress()
  320. {
  321. url = getDomainname() + '/info?type=IP';
  322. var xhttp = new XMLHttpRequest();
  323. xhttp.onreadystatechange = function() {
  324. if (this.readyState == 4 && this.status == 200) {
  325. document.getElementById("IP-address").value = xhttp.response;
  326. }
  327. }
  328. xhttp.open("GET", url, true);
  329. xhttp.send();
  330. }
  331. function loadWLANSSID()
  332. {
  333. url = getDomainname() + '/info?type=SSID';
  334. var xhttp = new XMLHttpRequest();
  335. xhttp.onreadystatechange = function() {
  336. if (this.readyState == 4 && this.status == 200) {
  337. document.getElementById("wlan-ssid").value = xhttp.response;
  338. }
  339. }
  340. xhttp.open("GET", url, true);
  341. xhttp.send();
  342. }
  343. function loadSDCardManufacturer()
  344. {
  345. url = getDomainname() + '/info?type=SDCardManufacturer';
  346. var xhttp = new XMLHttpRequest();
  347. xhttp.onreadystatechange = function() {
  348. if (this.readyState == 4 && this.status == 200) {
  349. document.getElementById("SDCardManufacturer").value = xhttp.response;
  350. }
  351. }
  352. xhttp.open("GET", url, true);
  353. xhttp.send();
  354. }
  355. function loadSDCardName()
  356. {
  357. url = getDomainname() + '/info?type=SDCardName';
  358. var xhttp = new XMLHttpRequest();
  359. xhttp.onreadystatechange = function() {
  360. if (this.readyState == 4 && this.status == 200) {
  361. document.getElementById("SDCardName").value = xhttp.response;
  362. }
  363. }
  364. xhttp.open("GET", url, true);
  365. xhttp.send();
  366. }
  367. function loadSDCardCapacity()
  368. {
  369. url = getDomainname() + '/info?type=SDCardCapacity';
  370. var xhttp = new XMLHttpRequest();
  371. xhttp.onreadystatechange = function() {
  372. if (this.readyState == 4 && this.status == 200) {
  373. document.getElementById("SDCardCapacity").value = xhttp.response + " MB";
  374. }
  375. }
  376. xhttp.open("GET", url, true);
  377. xhttp.send();
  378. }
  379. function loadSDCardSectorSize()
  380. {
  381. url = getDomainname() + '/info?type=SDCardSectorSize';
  382. var xhttp = new XMLHttpRequest();
  383. xhttp.onreadystatechange = function() {
  384. if (this.readyState == 4 && this.status == 200) {
  385. document.getElementById("SDCardSectorSize").value = xhttp.response + " byte";
  386. }
  387. }
  388. xhttp.open("GET", url, true);
  389. xhttp.send();
  390. }
  391. function loadSDCardPartitionSize()
  392. {
  393. url = getDomainname() + '/info?type=SDCardPartitionSize';
  394. var xhttp = new XMLHttpRequest();
  395. xhttp.onreadystatechange = function() {
  396. if (this.readyState == 4 && this.status == 200) {
  397. document.getElementById("SDCardPartitionSize").value = xhttp.response + " MB";
  398. }
  399. }
  400. xhttp.open("GET", url, true);
  401. xhttp.send();
  402. }
  403. function loadSDCardFreePartitionSpace()
  404. {
  405. url = getDomainname() + '/info?type=SDCardFreePartitionSpace';
  406. var xhttp = new XMLHttpRequest();
  407. xhttp.onreadystatechange = function() {
  408. if (this.readyState == 4 && this.status == 200) {
  409. document.getElementById("SDCardFreePartitionSpace").value = xhttp.response + " MB";
  410. }
  411. }
  412. xhttp.open("GET", url, true);
  413. xhttp.send();
  414. }
  415. function loadSDCardPartitionAllocationSize()
  416. {
  417. url = getDomainname() + '/info?type=SDCardPartitionAllocationSize';
  418. var xhttp = new XMLHttpRequest();
  419. xhttp.onreadystatechange = function() {
  420. if (this.readyState == 4 && this.status == 200) {
  421. document.getElementById("SDCardPartitionAllocationSize").value = xhttp.response + " byte";
  422. }
  423. }
  424. xhttp.open("GET", url, true);
  425. xhttp.send();
  426. }
  427. function loadMemoryInfo()
  428. {
  429. url = getDomainname() + '/heap';
  430. var xhttp = new XMLHttpRequest();
  431. xhttp.onreadystatechange = function() {
  432. if (this.readyState == 4 && this.status == 200) {
  433. data = xhttp.response.split("|");
  434. document.getElementById("RAMTotalFree").value = data[0].split("l: ")[1] + " byte";
  435. document.getElementById("IntRAMFree").value = data[4].split(":")[1] + " byte";
  436. document.getElementById("IntRAMLargestFree").value = data[5].split(":")[1] + " byte";
  437. document.getElementById("IntRAMMinFree").value = data[6].split(":")[1] + " byte";
  438. document.getElementById("ExtRAMFree").value = data[1].split(":")[1] + " byte";
  439. document.getElementById("ExtRAMLargestFree").value = data[2].split(":")[1] + " byte";
  440. document.getElementById("ExtRAMMinFree").value = data[3].split(":")[1] + " byte";
  441. }
  442. }
  443. xhttp.open("GET", url, true);
  444. xhttp.send();
  445. }
  446. function loadChipCores()
  447. {
  448. url = getDomainname() + '/info?type=ChipCores';
  449. var xhttp = new XMLHttpRequest();
  450. xhttp.onreadystatechange = function() {
  451. if (this.readyState == 4 && this.status == 200) {
  452. document.getElementById("chip-cores").value = xhttp.response;
  453. }
  454. }
  455. xhttp.open("GET", url, true);
  456. xhttp.send();
  457. }
  458. function loadChipRevision()
  459. {
  460. url = getDomainname() + '/info?type=ChipRevision';
  461. var xhttp = new XMLHttpRequest();
  462. xhttp.onreadystatechange = function() {
  463. if (this.readyState == 4 && this.status == 200) {
  464. document.getElementById("chip-revision").value = xhttp.response;
  465. }
  466. }
  467. xhttp.open("GET", url, true);
  468. xhttp.send();
  469. }
  470. function loadChipFeatures()
  471. {
  472. url = getDomainname() + '/info?type=ChipFeatures';
  473. var xhttp = new XMLHttpRequest();
  474. xhttp.onreadystatechange = function() {
  475. if (this.readyState == 4 && this.status == 200) {
  476. document.getElementById("chip-features").value = xhttp.response;
  477. }
  478. }
  479. xhttp.open("GET", url, true);
  480. xhttp.send();
  481. }
  482. function init()
  483. {
  484. loadMemoryInfo();
  485. loadLastRestart();
  486. loadUptime();
  487. loadFWVersion();
  488. loadFWBuildTime();
  489. loadHTMLVersion();
  490. loadHostname();
  491. loadIPAddress();
  492. loadWLANSSID();
  493. loadSDCardManufacturer();
  494. loadSDCardName();
  495. loadSDCardCapacity();
  496. loadSDCardSectorSize();
  497. loadSDCardPartitionSize();
  498. loadSDCardFreePartitionSpace();
  499. loadSDCardPartitionAllocationSize();
  500. loadChipCores();
  501. loadChipRevision();
  502. loadChipFeatures();
  503. }
  504. init();
  505. </script>