@@ -56,5 +56,5 @@
{{end}}
{{define "script"}}
-
+
{{end}}
diff --git a/web/setup_led_plc.go b/web/setup_field_testing.go
similarity index 69%
rename from web/setup_led_plc.go
rename to web/setup_field_testing.go
index 4b156a6..af3e34d 100644
--- a/web/setup_led_plc.go
+++ b/web/setup_field_testing.go
@@ -1,7 +1,7 @@
// Copyright 2018 Team 254. All Rights Reserved.
// Author: pat@patfairbank.com (Patrick Fairbank)
//
-// Web routes for testing the field LEDs and PLC.
+// Web routes for testing the field sounds, LEDs, and PLC.
package web
@@ -11,13 +11,13 @@ import (
"net/http"
)
-// Shows the LED/PLC test page.
-func (web *Web) ledPlcGetHandler(w http.ResponseWriter, r *http.Request) {
+// Shows the Field Testing page.
+func (web *Web) fieldTestingGetHandler(w http.ResponseWriter, r *http.Request) {
if !web.userIsAdmin(w, r) {
return
}
- template, err := web.parseFiles("templates/setup_led_plc.html", "templates/base.html")
+ template, err := web.parseFiles("templates/setup_field_testing.html", "templates/base.html")
if err != nil {
handleWebErr(w, err)
return
@@ -36,8 +36,8 @@ func (web *Web) ledPlcGetHandler(w http.ResponseWriter, r *http.Request) {
}
}
-// The websocket endpoint for sending realtime updates to the LED/PLC test page.
-func (web *Web) ledPlcWebsocketHandler(w http.ResponseWriter, r *http.Request) {
+// The websocket endpoint for sending realtime updates to the Field Testing page.
+func (web *Web) fieldTestingWebsocketHandler(w http.ResponseWriter, r *http.Request) {
if !web.userIsAdmin(w, r) {
return
}
diff --git a/web/setup_led_plc_test.go b/web/setup_field_testing_test.go
similarity index 87%
rename from web/setup_led_plc_test.go
rename to web/setup_field_testing_test.go
index 6f903fa..b5553c0 100644
--- a/web/setup_led_plc_test.go
+++ b/web/setup_field_testing_test.go
@@ -10,12 +10,12 @@ import (
"testing"
)
-func TestSetupLedPlcWebsocket(t *testing.T) {
+func TestSetupFieldTestingWebsocket(t *testing.T) {
web := setupTestWeb(t)
server, wsUrl := web.startTestServer()
defer server.Close()
- conn, _, err := gorillawebsocket.DefaultDialer.Dial(wsUrl+"/setup/led_plc/websocket", nil)
+ conn, _, err := gorillawebsocket.DefaultDialer.Dial(wsUrl+"/setup/field_testing/websocket", nil)
assert.Nil(t, err)
defer conn.Close()
ws := websocket.NewTestWebsocket(conn)
diff --git a/web/web.go b/web/web.go
index 566c542..b609ad8 100644
--- a/web/web.go
+++ b/web/web.go
@@ -159,8 +159,8 @@ func (web *Web) newHandler() http.Handler {
router.HandleFunc("/setup/db/save", web.saveDbHandler).Methods("GET")
router.HandleFunc("/setup/displays", web.displaysGetHandler).Methods("GET")
router.HandleFunc("/setup/displays/websocket", web.displaysWebsocketHandler).Methods("GET")
- router.HandleFunc("/setup/led_plc", web.ledPlcGetHandler).Methods("GET")
- router.HandleFunc("/setup/led_plc/websocket", web.ledPlcWebsocketHandler).Methods("GET")
+ router.HandleFunc("/setup/field_testing", web.fieldTestingGetHandler).Methods("GET")
+ router.HandleFunc("/setup/field_testing/websocket", web.fieldTestingWebsocketHandler).Methods("GET")
router.HandleFunc("/setup/lower_thirds", web.lowerThirdsGetHandler).Methods("GET")
router.HandleFunc("/setup/lower_thirds/websocket", web.lowerThirdsWebsocketHandler).Methods("GET")
router.HandleFunc("/setup/schedule", web.scheduleGetHandler).Methods("GET")