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

  UI for testing the LEDs and PLC connected to the field.
*/}}
{{define "title"}}LED and PLC Testing{{end}}
{{define "body"}}
<div class="row">
  <div class="col-lg-7">
    <div class="well">
      <legend>PLC</legend>
      <div class="row">
        <div class="col-lg-4">
          <table class="table">
            <tr>
              <th colspan="2">Inputs</th>
            </tr>
            {{range $i, $name := .InputNames}}
            <tr>
              <td>{{$name}}</td>
              <td id="input{{$i}}"></td>
            </tr>
            {{end}}
          </table>
        </div>
        <div class="col-lg-4">
          <table class="table">
            <tr>
              <th colspan="2">Registers</th>
            </tr>
            {{range $i, $name := .RegisterNames}}
            <tr>
              <td>{{$name}}</td>
              <td id="register{{$i}}"></td>
            </tr>
            {{end}}
          </table>
        </div>
        <div class="col-lg-4">
          <table class="table">
            <tr>
              <th colspan="2">Coils</th>
            </tr>
            {{range $i, $name := .CoilNames}}
            <tr>
              <td>{{$name}}</td>
              <td id="coil{{$i}}"></td>
            </tr>
            {{end}}
          </table>
        </div>
      </div>
    </div>
  </div>
</div>
{{end}}
{{define "script"}}
<script src="/static/js/setup_led_plc.js"></script>
{{end}}
