mirror of
https://github.com/Team254/cheesy-arena-lite.git
synced 2026-03-09 13:46:44 -04:00
146 lines
5.2 KiB
HTML
146 lines
5.2 KiB
HTML
{{/*
|
|
Copyright 2014 Team 254. All Rights Reserved.
|
|
Author: pat@patfairbank.com (Patrick Fairbank)
|
|
|
|
UI for controlling ephemeral aspects of the playing field.
|
|
*/}}
|
|
{{define "title"}}Field Configuration{{end}}
|
|
{{define "body"}}
|
|
<div class="row">
|
|
<div class="col-lg-4 col-lg-offset-2">
|
|
<div class="well">
|
|
<legend>Alliance Station Displays</legend>
|
|
{{range $displayId, $station := .AllianceStationDisplays}}
|
|
<form class="form-horizontal" action="/setup/field" method="POST">
|
|
<div class="form-group">
|
|
<label class="col-lg-5 control-label">Display {{$displayId}}</label>
|
|
<div class="col-lg-7">
|
|
<input type="hidden" name="displayId" value="{{$displayId}}" />
|
|
<select class="form-control" name="allianceStation" onchange="this.form.submit();">
|
|
<option value=""></option>
|
|
<option value="R1"{{if eq $station "R1"}} selected{{end}}>Red 1</option>
|
|
<option value="R2"{{if eq $station "R2"}} selected{{end}}>Red 2</option>
|
|
<option value="R3"{{if eq $station "R3"}} selected{{end}}>Red 3</option>
|
|
<option value="B1"{{if eq $station "B1"}} selected{{end}}>Blue 1</option>
|
|
<option value="B2"{{if eq $station "B2"}} selected{{end}}>Blue 2</option>
|
|
<option value="B3"{{if eq $station "B3"}} selected{{end}}>Blue 3</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
{{end}}
|
|
<legend>Reload All Displays</legend>
|
|
<div class="form-group">
|
|
<a href="/setup/field/reload_displays" class="btn btn-primary">Force Reload of All Displays</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-lg-4">
|
|
<div class="well">
|
|
<legend>PLC</legend>
|
|
<form class="" action="/setup/field/test" method="POST">
|
|
<div class="form-group">
|
|
<div class="radio">
|
|
<label>
|
|
<input type="radio" name="mode" value="" onclick="this.form.submit()"
|
|
{{if eq .FieldTestMode ""}}checked{{end}}>Off
|
|
</label>
|
|
</div>
|
|
<div class="radio">
|
|
<label>
|
|
<input type="radio" name="mode" value="boiler" onclick="this.form.submit()"
|
|
{{if eq .FieldTestMode "boiler"}}checked{{end}}>Boilers On
|
|
</label>
|
|
</div>
|
|
<div class="radio">
|
|
<label>
|
|
<input type="radio" name="mode" value="rotor1" onclick="this.form.submit()"
|
|
{{if eq .FieldTestMode "rotor1"}}checked{{end}}>1 Rotor/Touchpad 1 On
|
|
</label>
|
|
</div>
|
|
<div class="radio">
|
|
<label>
|
|
<input type="radio" name="mode" value="rotor2" onclick="this.form.submit()"
|
|
{{if eq .FieldTestMode "rotor2"}}checked{{end}}>2 Rotors/Touchpad 2 On
|
|
</label>
|
|
</div>
|
|
<div class="radio">
|
|
<label>
|
|
<input type="radio" name="mode" value="rotor3" onclick="this.form.submit()"
|
|
{{if eq .FieldTestMode "rotor3"}}checked{{end}}>3 Rotors/Touchpad 3 On
|
|
</label>
|
|
</div>
|
|
<div class="radio">
|
|
<label>
|
|
<input type="radio" name="mode" value="rotor4" onclick="this.form.submit()"
|
|
{{if eq .FieldTestMode "rotor4"}}checked{{end}}>4 Rotors On
|
|
</label>
|
|
</div>
|
|
<div class="radio">
|
|
<label>
|
|
<input type="radio" name="mode" value="red" onclick="this.form.submit()"
|
|
{{if eq .FieldTestMode "red"}}checked{{end}}>All Red On
|
|
</label>
|
|
</div>
|
|
<div class="radio">
|
|
<label>
|
|
<input type="radio" name="mode" value="blue" onclick="this.form.submit()"
|
|
{{if eq .FieldTestMode "blue"}}checked{{end}}>All Blue On
|
|
</label>
|
|
</div>
|
|
<div class="radio">
|
|
<label>
|
|
<input type="radio" name="mode" value="flash" onclick="this.form.submit()"
|
|
{{if eq .FieldTestMode "flash"}}checked{{end}}>Flash Touchpads
|
|
</label>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
<div class="row">
|
|
<div class="col-lg-4">
|
|
<table>
|
|
<tr>
|
|
<th>Inputs</th>
|
|
</tr>
|
|
{{range $i, $value := .Inputs}}
|
|
<tr>
|
|
<td>{{$i}}</td>
|
|
<td>{{$value}}</td>
|
|
</tr>
|
|
{{end}}
|
|
</table>
|
|
</div>
|
|
<div class="col-lg-4">
|
|
<table>
|
|
<tr>
|
|
<th>Counters</th>
|
|
</tr>
|
|
{{range $i, $value := .Counters}}
|
|
<tr>
|
|
<td>{{$i}}</td>
|
|
<td>{{$value}}</td>
|
|
</tr>
|
|
{{end}}
|
|
</table>
|
|
</div>
|
|
<div class="col-lg-4">
|
|
<table>
|
|
<tr>
|
|
<th>Coils</th>
|
|
</tr>
|
|
{{range $i, $value := .Coils}}
|
|
<tr>
|
|
<td>{{$i}}</td>
|
|
<td>{{$value}}</td>
|
|
</tr>
|
|
{{end}}
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{{end}}
|
|
{{define "script"}}
|
|
{{end}}
|