<!doctype html>
<html>
<head>
  <title>Cyberwave Dashboard</title>
  <script src="{{ url_for('static', filename='dashboard.js') }}"></script>
</head>
<body>
  <h1>Cyberwave Dashboard</h1>
  <div id="robots">
    {% for r in robots %}
    <div class="robot" data-alias="{{ r.alias }}">
      <h2>{{ r.alias }} ({{ r.type }})</h2>
      <div>Battery: <span class="battery">?</span></div>
      <button onclick="sendCommand('{{ r.alias }}','takeoff')">Takeoff</button>
      <button onclick="sendCommand('{{ r.alias }}','land')">Land</button>
      <img src="/robot/{{ r.alias }}/video" width="320">
    </div>
    {% endfor %}
  </div>
</body>
</html>
