index.html 3.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. <!doctype html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>ArduPilot Custom Firmware Builder</title>
  6. <meta name="description"
  7. content="ArduPilot Custom Firmware Builder. It allows to build custom ArduPilot firmware by selecting the wanted features.">
  8. <meta name="author" content="ArduPilot Team">
  9. <meta name="viewport" content="width=device-width, initial-scale=1">
  10. <!-- OG Meta Tags to improve the way the post looks when you share the page on LinkedIn, Facebook, Google+ -->
  11. <meta property="og:site_name" content="ArduPilot"/>
  12. <meta property="og:site" content=""/>
  13. <meta property="og:title" content="ArduPilot Custom Firmware Builder"/>
  14. <meta property="og:description"
  15. content="ArduPilot Custom Firmware Builder. It allows to build custom ArduPilot firmware by selecting the wanted features."/>
  16. <!-- description shown in the actual shared post -->
  17. <meta property="og:type" content="website">
  18. <meta property="og:url" content="https://custom.ardupilot.org/">
  19. <meta property="og:image" content="https://ardupilot.org/application/files/6315/7552/1962/ArduPilot-Motto.png">
  20. <link rel="stylesheet" type="text/css" href="{{ url_for('static',filename='styles/main.css') }}">
  21. </head>
  22. <body onload="javascript: reload()">
  23. <div id="main">
  24. <a href="https://custom.ardupilot.org/">
  25. <div id="logo">
  26. </div>
  27. </a>
  28. <div id="menu">
  29. <h2>ArduPilot Custom Firmware Builder</h2>
  30. <br><b>This site is EXPERIMENTAL</b>
  31. <p>Please select the branch to build, then hit 'Next'.</p>
  32. <form action="/index2" method="post">
  33. <label for="branch">Choose a branch:
  34. <select name="branch">
  35. {% for branch in get_branches()[0] %}
  36. {% if branches == get_branches()[1] %}
  37. <option value="{{branch}}" selected>{{branch}}</option>
  38. {% else %}
  39. <option value="{{branch}}">{{branch}}</option>
  40. {% endif %}
  41. {% endfor %}
  42. </select>
  43. </label>
  44. <p></p>
  45. <label for="vehicle">Choose a vehicle:
  46. <select name="vehicle">
  47. {% for vehicle in get_vehicles()[0] %}
  48. {% if vehicle == get_vehicles()[1] %}
  49. <option value="{{vehicle}}" selected>{{vehicle}}</option>
  50. {% else %}
  51. <option value="{{vehicle}}">{{vehicle}}</option>
  52. {% endif %}
  53. {% endfor %}
  54. </select>
  55. </label>
  56. <br>
  57. <input type="submit" value="Next">
  58. </form>
  59. </div>
  60. <hr>
  61. <p>Exisiting builds (click on the status of a build to view it):</p>
  62. <div id="build_status"></div>
  63. <br/>
  64. <script>
  65. function reload() {
  66. var output = document.getElementById('build_status');
  67. var xhr = new XMLHttpRequest();
  68. xhr.open('GET', "/builds/status.html");
  69. // disable cache, thanks to: https://stackoverflow.com/questions/22356025/force-cache-control-no-cache-in-chrome-via-xmlhttprequest-on-f5-reload
  70. xhr.setRequestHeader("Cache-Control", "no-cache, no-store, max-age=0");
  71. xhr.setRequestHeader("Expires", "Tue, 01 Jan 1980 1:00:00 GMT");
  72. xhr.setRequestHeader("Pragma", "no-cache");
  73. xhr.onload = function () {
  74. if (xhr.status === 200) {
  75. output.innerHTML = xhr.responseText;
  76. }
  77. setTimeout(reload, 5000)
  78. }
  79. xhr.send();
  80. }
  81. </script>
  82. </div>
  83. </body>
  84. <hr>
  85. <footer>Created by Will Piper, <a href=https://github.com/ArduPilot/CustomBuild>Source Code</a>.</footer>
  86. </html>