{{/*
  Copyright 2014 Team 254. All Rights Reserved.
  Author: pat@patfairbank.com (Patrick Fairbank)

  Display showing team diagnostics for FTA/FTAA use.
*/}}
{{define "title"}}Field Monitor{{end}}
{{define "body"}}
<div class="row">
  <div class="col-lg-12">
    <div class="row text-center">
      <div class="col-lg-6 well well-darkred">
        <div class="row form-group">
          <div class="col-xs-3">Red Teams</div>
          <div class="col-xs-1" data-toggle="tooltip" title="Driver Station (Tx/Rx Mbits/s)">DS</div>
          <div class="col-xs-1" data-toggle="tooltip" title="Radio Status">Rad</div>
          <div class="col-xs-1" data-toggle="tooltip" title="Robot Status/Time Since Last Link">Rio</div>
          <div class="col-xs-1" data-toggle="tooltip" title="Battery">Bat</div>
          <div class="col-xs-1" data-toggle="tooltip" title="Bypassed/Disabled">Byp</div>
          <div class="col-xs-2" data-toggle="tooltip" title="Average Trip Time">Trip Time</div>
          <div class="col-xs-2" data-toggle="tooltip" title="Packet Loss">Lost Pack</div>
        </div>
        {{template "ftaTeam" dict "color" "R" "position" 1 "data" .}}
        {{template "ftaTeam" dict "color" "R" "position" 2 "data" .}}
        {{template "ftaTeam" dict "color" "R" "position" 3 "data" .}}
      </div>
      <div class="col-lg-6 well well-darkblue">
        <div class="row form-group hidden-xs">
          <div class="col-xs-3">Blue Teams</div>
          <div class="col-xs-1" data-toggle="tooltip" title="Driver Station (Tx/Rx Mbits/s)">DS</div>
          <div class="col-xs-1" data-toggle="tooltip" title="Radio Status">Rad</div>
          <div class="col-xs-1" data-toggle="tooltip" title="Robot Status/Time Since Last Link">Rio</div>
          <div class="col-xs-1" data-toggle="tooltip" title="Battery">Bat</div>
          <div class="col-xs-1" data-toggle="tooltip" title="Bypassed/Disabled">Byp</div>
          <div class="col-xs-2" data-toggle="tooltip" title="Average Trip Time">Trip Time</div>
          <div class="col-xs-2" data-toggle="tooltip" title="Packet Loss">Lost Pack</div>
        </div>
        {{template "ftaTeam" dict "color" "B" "position" 1 "data" .}}
        {{template "ftaTeam" dict "color" "B" "position" 2 "data" .}}
        {{template "ftaTeam" dict "color" "B" "position" 3 "data" .}}
      </div>
    </div>
    <br />
  </div>
</div>
{{end}}
{{define "script"}}
<script src="/static/js/match_timing.js"></script>
<script src="/static/js/fta_display.js"></script>
{{end}}
{{define "ftaTeam"}}
<div class="row form-group" id="status{{.color}}{{.position}}">
  <div class="col-xs-1">{{.position}} </div>
  <div class="col-xs-2"><div class="team"></div></div>
  <div class="col-xs-1 col-no-padding"><div class="ds-status"></div></div>
  <div class="col-xs-1 col-no-padding"><div class="radio-status"></div></div>
  <div class="col-xs-1 col-no-padding"><div class="robot-status"></div></div>
  <div class="col-xs-1 col-no-padding"><div class="battery-status"></div></div>
  <div class="col-xs-1 col-no-padding"><div class="bypass-status-fta"></div></div>
  <div class="col-xs-2 col-no-padding"><div class="trip-time" ></div></div>
  <div class="col-xs-2 col-no-padding"><div class="packet-loss" ></div></div>
</div>
{{end}}
