config.html 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6. <meta name="viewport" content="width=device-width, initial-scale=1">
  7. <title>MeteoControl WiFi Station</title>
  8. <!-- Bootstrap core -->
  9. <link href="bootstrap.css" rel="stylesheet">
  10. <script src="jquery.js"></script>
  11. <style>
  12. .main { font-size: 63px; }
  13. </style>
  14. <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
  15. <!--[if lt IE 9]>
  16. <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
  17. <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
  18. <![endif]-->
  19. </head>
  20. <body>
  21. <div class="container">
  22. <div class="header">
  23. <nav>
  24. <ul class="nav nav-pills pull-right">
  25. <li role="presentation"><a href="/">Home</a></li>
  26. <li role="presentation" class="active"><a href="/config">Configuration</a></li>
  27. <li role="presentation"><a href="/api">API</a></li>
  28. </ul>
  29. </nav>
  30. <h3 class="text-muted">MeteoControl</h3>
  31. </div>
  32. <div class="row">
  33. <h2>&nbsp;</h2>
  34. <div class="col-xs-offset-2 col-xs-8">
  35. <!-- Network config -->
  36. <div>
  37. <div class="panel panel-default">
  38. <div class="panel-heading">
  39. <h3 class="panel-title">Network</h3>
  40. </div>
  41. <div class="panel-body">
  42. <form method="POST">
  43. <div class="form-group">
  44. <label>Name</label>
  45. <input type="text" name="SSID" class="form-control" placeholder="Enter SSID" value="{SSID}">
  46. </div>
  47. <div class="form-group">
  48. <label for="exampleInputPassword1">Password</label>
  49. <input type="password" name="Password" class="form-control" placeholder="Password">
  50. </div>
  51. <button type="submit" class="btn btn-success">Save network</button>
  52. <button type="cancel" class="btn btn-link">Cancel</button>
  53. </form>
  54. </div>
  55. </div>
  56. </div>
  57. <!-- Sensor adjustment config -->
  58. <div>
  59. <div class="panel panel-default">
  60. <div class="panel-heading">
  61. <h3 class="panel-title">Adjustments and sensor corrections</h3>
  62. </div>
  63. <div class="panel-body">
  64. <form method="POST">
  65. <div class="form-group">
  66. <label for="exampleInputEmail1">Temperature adjustment, &#x00B1; &deg;C</label>
  67. <input type="text" name="T" class="form-control" value="{T}">
  68. </div>
  69. <div class="form-group">
  70. <label for="exampleInputPassword1">Humidity adjustment, &#x00B1; %</label>
  71. <input type="text" name="RH" class="form-control" value="{RH}">
  72. </div>
  73. <div class="form-group">
  74. <label for="exampleInputPassword1">Local time, &#x00B1; hours from GMT</label>
  75. <input type="text" name="TZ" class="form-control" value="{TZ}">
  76. </div>
  77. <button type="submit" class="btn btn-success">Save correction</button>
  78. <button type="cancel" class="btn btn-link">Cancel</button>
  79. </form>
  80. </div>
  81. </div>
  82. </div>
  83. <!-- Trigger config -->
  84. <div>
  85. <div class="panel panel-default">
  86. <div class="panel-heading">
  87. <h3 class="panel-title">Sensor automatic trigger</h3>
  88. </div>
  89. <div class="panel-body">
  90. <form method="POST">
  91. <div class="form-group">
  92. <div class="radio">
  93. <label><input type="radio" name="Trigger" value="0">Disabled</label>
  94. </div>
  95. <div class="radio">
  96. <label><input type="radio" name="Trigger" value="1">By Temperature</label>
  97. </div>
  98. <div class="radio">
  99. <label><input type="radio" name="Trigger" value="2">By Humidity</label>
  100. </div>
  101. <script>$( document ).ready( ($("input:radio[name=Trigger]"))[ {Trigger} ].click() )</script>
  102. </div>
  103. <fieldset>
  104. <legend>Value range</legend>
  105. <div class='row'>
  106. <div class='col-sm-4'>
  107. <div class='form-group'>
  108. <label>Minimum</label>
  109. <input type="text" name="RMin" class="form-control" value="{RMin}">
  110. </div>
  111. </div>
  112. <div class='col-sm-4'>
  113. <div class='form-group'>
  114. <label>Maximum</label>
  115. <input type="text" name="RMax" class="form-control" value="{RMax}">
  116. </div>
  117. </div>
  118. </div>
  119. <span id="helpBlock" class="help-block">* The trigger will fire when the value is less than the minimum or greater than the maximum</span>
  120. </fieldset>
  121. <button type="submit" class="btn btn-success">Save trigger</button>
  122. <button type="cancel" class="btn btn-link">Cancel</button>
  123. </form>
  124. </div>
  125. </div>
  126. </div>
  127. </div>
  128. </div>
  129. </div> <!-- /container -->
  130. </body>
  131. </html>