info.html 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <!DOCTYPE html>
  2. <html ng-app="App">
  3. <head>
  4. <title>IoT Control Panel</title>
  5. <meta charset="UTF-8">
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0 user-scalable=no">
  7. <link rel="stylesheet" href="../../script/semantic/semantic.min.css">
  8. <script type="text/javascript" src="../../script/jquery.min.js"></script>
  9. <script type="text/javascript" src="../../script/semantic/semantic.min.js"></script>
  10. </head>
  11. <body>
  12. <div class="ui container">
  13. <div class="ui basic segment">
  14. <h3 class="ui header">
  15. IoT Hub
  16. <div class="sub header">List of supported IoT protocol scanners for this Host</div>
  17. </h3>
  18. </div>
  19. <div>
  20. <table class="ui celled very basic compact table">
  21. <thead>
  22. <tr><th>Protocol Name</th>
  23. <th>Description</th>
  24. <th>Version (Protocol)</th>
  25. <th>Author</th>
  26. <th>Release Date</th>
  27. </tr></thead>
  28. <tbody id="protocolScannerList">
  29. <tr>
  30. <td data-label="">Home Dynamic v2</td>
  31. <td data-label="">A basic IoT communication protocol for ESP8266 made by Makers</td>
  32. <td data-label="">v2 (v2)</td>
  33. <td data-label=""><i class="user icon"></i>tobychui
  34. <br><i class="mail icon"></i><a href="mailto:[email protected]">[email protected]</a>
  35. <br><i class="globe icon"></i><a href="hds.arozos.com">hds.arozos.com</a></td>
  36. <td data-label=""></td>
  37. </tr>
  38. </tbody>
  39. </table>
  40. </div>
  41. </div>
  42. <script>
  43. initScannerHandlerList();
  44. function initScannerHandlerList(){
  45. $.get("../../system/iot/listScanner", function(data){
  46. if (data.error !== undefined){
  47. alert(data.error);
  48. }else{
  49. $("#protocolScannerList").html("");
  50. data.forEach(ph => {
  51. var releaseDate = new Date(ph.ReleaseDate * 1000);
  52. var year = releaseDate.getFullYear();
  53. var months = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'];
  54. var month = months[releaseDate.getMonth()];
  55. var date = releaseDate.getDate();
  56. var displayReleaseDate = date + " " + month + " " + year;
  57. $("#protocolScannerList").append(`<tr>
  58. <td data-label="">${ph.Name}</td>
  59. <td data-label="">${ph.Desc}</td>
  60. <td data-label="">v${ph.Version} (v${ph.ProtocolVer})</td>
  61. <td data-label=""><i class="user icon"></i>${ph.Author}
  62. <br><i class="mail icon"></i><a href="mailto:${ph.AuthorEmail}">${ph.AuthorEmail}</a>
  63. <br><i class="globe icon"></i><a href="${ph.AuthorWebsite}">${ph.AuthorWebsite}</a></td>
  64. <td data-label="">${displayReleaseDate}</td>
  65. </tr>`);
  66. });
  67. }
  68. })
  69. }
  70. </script>
  71. </body>
  72. </html>