index.html 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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. <br>
  45. <input type="submit" value="Next">
  46. </form>
  47. </div>
  48. <hr>
  49. <p>Exisiting builds (click on the status of a build to view it):</p>
  50. <div id="build_status"></div>
  51. <br/>
  52. <script>
  53. function reload() {
  54. var output = document.getElementById('build_status');
  55. var xhr = new XMLHttpRequest();
  56. xhr.open('GET', "/builds/status.html");
  57. // disable cache, thanks to: https://stackoverflow.com/questions/22356025/force-cache-control-no-cache-in-chrome-via-xmlhttprequest-on-f5-reload
  58. xhr.setRequestHeader("Cache-Control", "no-cache, no-store, max-age=0");
  59. xhr.setRequestHeader("Expires", "Tue, 01 Jan 1980 1:00:00 GMT");
  60. xhr.setRequestHeader("Pragma", "no-cache");
  61. xhr.onload = function () {
  62. if (xhr.status === 200) {
  63. output.innerHTML = xhr.responseText;
  64. }
  65. setTimeout(reload, 5000)
  66. }
  67. xhr.send();
  68. }
  69. </script>
  70. </div>
  71. </body>
  72. <hr>
  73. <footer>Created by Will Piper, <a href=https://github.com/ArduPilot/CustomBuild>Source Code</a>.</footer>
  74. </html>