2014-09-06 17:38:21 -07:00
|
|
|
|
{{/*
|
|
|
|
|
|
Copyright 2014 Team 254. All Rights Reserved.
|
|
|
|
|
|
Author: pat@patfairbank.com (Patrick Fairbank)
|
|
|
|
|
|
|
|
|
|
|
|
UI for configuring event settings.
|
|
|
|
|
|
*/}}
|
2014-06-06 21:26:55 -07:00
|
|
|
|
{{define "title"}}Settings{{end}}
|
|
|
|
|
|
{{define "body"}}
|
|
|
|
|
|
<div class="row">
|
2014-06-07 02:02:12 -07:00
|
|
|
|
{{if .ErrorMessage}}
|
|
|
|
|
|
<div class="alert alert-dismissable alert-danger">
|
|
|
|
|
|
<button type="button" class="close" data-dismiss="alert">×</button>
|
|
|
|
|
|
{{.ErrorMessage}}
|
|
|
|
|
|
</div>
|
|
|
|
|
|
{{end}}
|
|
|
|
|
|
<div class="col-lg-6 col-lg-offset-1">
|
2014-06-06 21:26:55 -07:00
|
|
|
|
<div class="well">
|
|
|
|
|
|
<form class="form-horizontal" action="/setup/settings" method="POST">
|
|
|
|
|
|
<fieldset>
|
|
|
|
|
|
<legend>Event Settings</legend>
|
|
|
|
|
|
<div class="form-group">
|
2014-06-08 21:47:31 -07:00
|
|
|
|
<label class="col-lg-5 control-label">Name</label>
|
2014-06-06 21:26:55 -07:00
|
|
|
|
<div class="col-lg-7">
|
|
|
|
|
|
<input type="text" class="form-control" name="name" value="{{.Name}}">
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="form-group">
|
2014-06-08 21:47:31 -07:00
|
|
|
|
<label class="col-lg-5 control-label">Display Background Color</label>
|
2014-06-06 21:26:55 -07:00
|
|
|
|
<div class="col-lg-7">
|
|
|
|
|
|
<div class="input-group" id="displayBackgroundColor">
|
|
|
|
|
|
<input type="text" class="form-control" name="displayBackgroundColor"
|
|
|
|
|
|
value="{{.DisplayBackgroundColor}}">
|
|
|
|
|
|
<span class="input-group-addon"><i></i></span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="form-group">
|
2014-06-08 21:47:31 -07:00
|
|
|
|
<label class="col-lg-5 control-label">Number of Alliances</label>
|
2014-06-06 21:26:55 -07:00
|
|
|
|
<div class="col-lg-7">
|
|
|
|
|
|
<input type="text" class="form-control" name="numElimAlliances" value="{{.NumElimAlliances}}">
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="form-group">
|
2014-06-08 21:47:31 -07:00
|
|
|
|
<label class="col-lg-5 control-label">Round 2 Selection Order</label>
|
2014-06-06 21:26:55 -07:00
|
|
|
|
<div class="col-lg-7">
|
|
|
|
|
|
<div class="radio">
|
|
|
|
|
|
<label>
|
|
|
|
|
|
<input type="radio" name="selectionRound2Order" value="F"
|
|
|
|
|
|
{{if eq .SelectionRound2Order "F"}}checked{{end}}>
|
|
|
|
|
|
First to Last
|
|
|
|
|
|
</label>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="radio">
|
|
|
|
|
|
<label>
|
|
|
|
|
|
<input type="radio" name="selectionRound2Order" value="L"
|
|
|
|
|
|
{{if eq .SelectionRound2Order "L"}}checked{{end}}>
|
|
|
|
|
|
Last to First
|
|
|
|
|
|
</label>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="form-group">
|
2014-06-08 21:47:31 -07:00
|
|
|
|
<label class="col-lg-5 control-label">Round 3 Selection Order</label>
|
2014-06-06 21:26:55 -07:00
|
|
|
|
<div class="col-lg-7">
|
|
|
|
|
|
<div class="radio">
|
|
|
|
|
|
<label>
|
|
|
|
|
|
<input type="radio" name="selectionRound3Order" value="F"
|
|
|
|
|
|
{{if eq .SelectionRound3Order "F"}}checked{{end}}>
|
|
|
|
|
|
First to Last
|
|
|
|
|
|
</label>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="radio">
|
|
|
|
|
|
<label>
|
|
|
|
|
|
<input type="radio" name="selectionRound3Order" value="L"
|
|
|
|
|
|
{{if eq .SelectionRound3Order "L"}}checked{{end}}>
|
|
|
|
|
|
Last to First
|
|
|
|
|
|
</label>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="radio">
|
|
|
|
|
|
<label>
|
|
|
|
|
|
<input type="radio" name="selectionRound3Order" value=""
|
|
|
|
|
|
{{if eq .SelectionRound3Order ""}}checked{{end}}>
|
|
|
|
|
|
None
|
|
|
|
|
|
</label>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
2015-03-24 20:52:11 -07:00
|
|
|
|
</fieldset>
|
|
|
|
|
|
<fieldset>
|
2015-04-01 14:19:14 -07:00
|
|
|
|
<legend>Automatic Team Info Download</legend>
|
2014-08-17 17:58:17 -07:00
|
|
|
|
<div class="form-group">
|
2015-04-01 14:19:14 -07:00
|
|
|
|
<label class="col-lg-9 control-label">Enable Automatic Team Info Download (From TBA)</label>
|
2014-08-17 17:58:17 -07:00
|
|
|
|
<div class="col-lg-1 checkbox">
|
2015-04-01 14:19:14 -07:00
|
|
|
|
<input type="checkbox" name="TBADownloadEnabled"{{if .TBADownloadEnabled}} checked{{end}}>
|
2015-03-24 20:52:11 -07:00
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
2014-07-30 00:16:09 -07:00
|
|
|
|
</fieldset>
|
|
|
|
|
|
<fieldset>
|
|
|
|
|
|
<legend>Publishing</legend>
|
2014-09-06 18:00:45 -07:00
|
|
|
|
<p>Contact The Blue Alliance to obtain an event code and credentials.</p>
|
2014-07-30 00:16:09 -07:00
|
|
|
|
<div class="form-group">
|
|
|
|
|
|
<label class="col-lg-7 control-label">Enable The Blue Alliance publishing</label>
|
|
|
|
|
|
<div class="col-lg-1 checkbox">
|
|
|
|
|
|
<input type="checkbox" name="tbaPublishingEnabled"{{if .TbaPublishingEnabled}} checked{{end}}>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
2014-06-06 21:26:55 -07:00
|
|
|
|
<div class="form-group">
|
2014-07-30 00:16:09 -07:00
|
|
|
|
<label class="col-lg-5 control-label">TBA Event Code</label>
|
|
|
|
|
|
<div class="col-lg-7">
|
|
|
|
|
|
<input type="text" class="form-control" name="tbaEventCode" value="{{.TbaEventCode}}">
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="form-group">
|
2014-08-17 11:43:42 -07:00
|
|
|
|
<label class="col-lg-5 control-label">TBA Auth ID</label>
|
2014-07-30 00:16:09 -07:00
|
|
|
|
<div class="col-lg-7">
|
|
|
|
|
|
<input type="text" class="form-control" name="tbaSecretId" value="{{.TbaSecretId}}">
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
|
<label class="col-lg-5 control-label">TBA Secret</label>
|
|
|
|
|
|
<div class="col-lg-7">
|
|
|
|
|
|
<input type="text" class="form-control" name="tbaSecret" value="{{.TbaSecret}}">
|
2014-06-06 21:26:55 -07:00
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
2016-08-28 00:49:52 -07:00
|
|
|
|
<p>Contact STEMtv to obtain an event code.</p>
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
|
<label class="col-lg-7 control-label">Enable STEMtv publishing</label>
|
|
|
|
|
|
<div class="col-lg-1 checkbox">
|
|
|
|
|
|
<input type="checkbox" name="stemTvPublishingEnabled"{{if .StemTvPublishingEnabled}} checked{{end}}>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
|
<label class="col-lg-5 control-label">STEMtv Event Code</label>
|
|
|
|
|
|
<div class="col-lg-7">
|
|
|
|
|
|
<input type="text" class="form-control" name="stemTvEventCode" value="{{.StemTvEventCode}}">
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
2014-06-06 21:26:55 -07:00
|
|
|
|
</fieldset>
|
2015-08-22 23:33:38 -07:00
|
|
|
|
<fieldset>
|
|
|
|
|
|
<legend>Authentication</legend>
|
|
|
|
|
|
<p>Configure passwords to enable HTTP Basic authentication, or leave blank to disable.</p>
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
|
<label class="col-lg-5 control-label">Password for 'admin' user</label>
|
|
|
|
|
|
<div class="col-lg-7">
|
|
|
|
|
|
<input type="password" class="form-control" name="adminPassword" value="{{.AdminPassword}}">
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
|
<label class="col-lg-5 control-label">Password for 'reader' user</label>
|
|
|
|
|
|
<div class="col-lg-7">
|
|
|
|
|
|
<input type="password" class="form-control" name="readerPassword" value="{{.ReaderPassword}}">
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</fieldset>
|
2014-08-15 22:47:12 -07:00
|
|
|
|
<fieldset>
|
2014-08-23 21:42:23 -07:00
|
|
|
|
<legend>Networking</legend>
|
2017-07-22 00:08:55 -07:00
|
|
|
|
<p>Enable this setting if you have a Linksys WRT1900ACS access point and Catalyst 3500-series
|
2014-08-15 22:47:12 -07:00
|
|
|
|
switch available, for isolating each team to its own SSID and VLAN.</p>
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
|
<label class="col-lg-7 control-label">Enable advanced network security</label>
|
|
|
|
|
|
<div class="col-lg-1 checkbox">
|
|
|
|
|
|
<input type="checkbox" name="networkSecurityEnabled"{{if .NetworkSecurityEnabled}} checked{{end}}>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
|
<label class="col-lg-5 control-label">AP Address</label>
|
|
|
|
|
|
<div class="col-lg-7">
|
|
|
|
|
|
<input type="text" class="form-control" name="apAddress" value="{{.ApAddress}}">
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
|
<label class="col-lg-5 control-label">AP Username</label>
|
|
|
|
|
|
<div class="col-lg-7">
|
|
|
|
|
|
<input type="text" class="form-control" name="apUsername" value="{{.ApUsername}}">
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
|
<label class="col-lg-5 control-label">AP Password</label>
|
|
|
|
|
|
<div class="col-lg-7">
|
|
|
|
|
|
<input type="password" class="form-control" name="apPassword" value="{{.ApPassword}}">
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
2014-08-16 12:31:46 -07:00
|
|
|
|
<div class="form-group">
|
|
|
|
|
|
<label class="col-lg-5 control-label">Switch Address</label>
|
|
|
|
|
|
<div class="col-lg-7">
|
|
|
|
|
|
<input type="text" class="form-control" name="switchAddress" value="{{.SwitchAddress}}">
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
|
<label class="col-lg-5 control-label">Switch Password</label>
|
|
|
|
|
|
<div class="col-lg-7">
|
|
|
|
|
|
<input type="password" class="form-control" name="switchPassword" value="{{.SwitchPassword}}">
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
2015-06-20 23:54:14 -07:00
|
|
|
|
<div class="form-group">
|
|
|
|
|
|
<label class="col-lg-7 control-label">Enable bandwidth monitoring</label>
|
|
|
|
|
|
<div class="col-lg-1 checkbox">
|
|
|
|
|
|
<input type="checkbox" name="bandwidthMonitoringEnabled"{{if .BandwidthMonitoringEnabled}} checked{{end}}>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
2014-08-15 22:47:12 -07:00
|
|
|
|
</fieldset>
|
2017-09-03 20:51:20 -07:00
|
|
|
|
<fieldset>
|
|
|
|
|
|
<legend>PLC</legend>
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
|
<label class="col-lg-5 control-label">PLC Address</label>
|
|
|
|
|
|
<div class="col-lg-7">
|
|
|
|
|
|
<input type="text" class="form-control" name="plcAddress" value="{{.PlcAddress}}">
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</fieldset>
|
2014-07-30 00:16:09 -07:00
|
|
|
|
<div class="form-group">
|
|
|
|
|
|
<div class="col-lg-7 col-lg-offset-5">
|
|
|
|
|
|
<button type="submit" class="btn btn-info">Save</button>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
2014-06-06 21:26:55 -07:00
|
|
|
|
</form>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
2014-06-07 02:02:12 -07:00
|
|
|
|
<div class="col-lg-4">
|
|
|
|
|
|
<div class="well">
|
|
|
|
|
|
<legend>Database</legend>
|
|
|
|
|
|
<p>
|
|
|
|
|
|
<a href="/setup/db/save"><button class="btn btn-info">Save Copy of Database</button></a>
|
|
|
|
|
|
</p>
|
|
|
|
|
|
<p>
|
2014-07-07 21:20:05 -07:00
|
|
|
|
<button type="button" class="btn btn-primary" onclick="$('#uploadDatabase').modal('show');">
|
2014-06-07 02:02:12 -07:00
|
|
|
|
Load Database from Backup
|
|
|
|
|
|
</button>
|
|
|
|
|
|
</p>
|
|
|
|
|
|
<p>
|
2014-07-07 21:20:05 -07:00
|
|
|
|
<button type="button" class="btn btn-primary" onclick="$('#confirmClearData').modal('show');">
|
2014-06-07 02:02:12 -07:00
|
|
|
|
Clear All Match Data
|
|
|
|
|
|
</button>
|
|
|
|
|
|
</p>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div id="uploadDatabase" class="modal" style="top: 20%;">
|
|
|
|
|
|
<div class="modal-dialog">
|
|
|
|
|
|
<div class="modal-content">
|
|
|
|
|
|
<div class="modal-header">
|
|
|
|
|
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
|
|
|
|
|
<h4 class="modal-title">Choose Backup File</h4>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<form class="form-horizontal" action="/setup/db/restore" enctype="multipart/form-data" method="POST">
|
|
|
|
|
|
<div class="modal-body">
|
|
|
|
|
|
<p>Select the database file to load from. <b>This will overwrite any existing data.</b></p>
|
|
|
|
|
|
<input type="file" name="databaseFile">
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="modal-footer">
|
|
|
|
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
|
|
|
|
|
|
<button type="submit" class="btn btn-primary">Load Database from Backup</button>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</form>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div id="confirmClearData" class="modal" style="top: 20%;">
|
|
|
|
|
|
<div class="modal-dialog">
|
|
|
|
|
|
<div class="modal-content">
|
|
|
|
|
|
<div class="modal-header">
|
|
|
|
|
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
|
|
|
|
|
<h4 class="modal-title">Confirm</h4>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="modal-body">
|
|
|
|
|
|
<p>Are you sure you want to clear all match, ranking, and alliance selection data?</p>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="modal-footer">
|
|
|
|
|
|
<form class="form-horizontal" action="/setup/db/clear" method="POST">
|
|
|
|
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
|
|
|
|
|
|
<button type="submit" class="btn btn-primary">Clear All Match Data</button>
|
|
|
|
|
|
</form>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
2014-06-06 21:26:55 -07:00
|
|
|
|
</div>
|
|
|
|
|
|
{{end}}
|
|
|
|
|
|
{{define "script"}}
|
|
|
|
|
|
<script>
|
|
|
|
|
|
$(function() {
|
|
|
|
|
|
$("#displayBackgroundColor").colorpicker();
|
|
|
|
|
|
});
|
|
|
|
|
|
</script>
|
|
|
|
|
|
{{end}}
|