-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update match logs page for Bootstrap 5.
- Loading branch information
Showing
5 changed files
with
101 additions
and
122 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,85 +1,68 @@ | ||
{{/* | ||
Copyright 2018 Team 254. All Rights Reserved. | ||
Copyright 2024 Team 254. All Rights Reserved. | ||
Author: pat@patfairbank.com (Patrick Fairbank) | ||
|
||
Display showing robot connection status. | ||
Page showing the logs of a single match for a single team. | ||
*/}} | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Match Log - {{.Match.ShortName}} - {{ .MatchLogs.TeamId}}({{.MatchLogs.AllianceStation}}) - Cheesy Arena</title> | ||
<meta name="apple-mobile-web-app-capable" content="yes"> | ||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"> | ||
<meta name="viewport" content="width=device-width, maximum-scale=1.0, user-scalable=no" /> | ||
<link rel="shortcut icon" href="/static/img/favicon.ico"> | ||
<link rel="stylesheet" href="/static/css/lib/bootstrap.min.css" /> | ||
<link rel="stylesheet" href="/static/css/cheesy-arena.css" /> | ||
<link rel="stylesheet" href="/static/css/view_match_log.css" /> | ||
{{template "script" .}} | ||
</head> | ||
<body> | ||
<div class="container"> | ||
<h1>{{.Match.ShortName}} - {{ .MatchLogs.TeamId}}({{.MatchLogs.AllianceStation}}) Log </h1> | ||
<ul id="matchTabs" class="nav nav-tabs" style="margin-bottom: 15px;"> | ||
{{define "title"}}Match Log - {{.Match.ShortName}} - {{ .MatchLogs.TeamId}} ({{.MatchLogs.AllianceStation}}){{end}} | ||
{{define "body"}} | ||
<h3>Match Log: {{.Match.ShortName}} - {{ .MatchLogs.TeamId}} ({{.MatchLogs.AllianceStation}})</h3> | ||
<ul id="matchTabs" class="nav nav-tabs mt-4"> | ||
{{range $logs := .MatchLogs.Logs}} | ||
<li{{if eq $logs.StartTime $.FirstMatch }} class="active"{{end}}> | ||
<a href="#{{$logs.StartTime}}" data-toggle="tab">{{$logs.StartTime}}</a> | ||
<li> | ||
<a href="#{{$logs.StartTime}}" class="nav-link{{if eq $logs.StartTime $.FirstMatch }} active{{end}}" | ||
data-bs-toggle="tab">{{$logs.StartTime}}</a> | ||
</li> | ||
{{end}} | ||
</ul> | ||
<div class="tab-content"> | ||
{{range $logs := .MatchLogs.Logs}} | ||
<div class="tab-pane {{if eq $.FirstMatch $logs.StartTime}} active{{end}}" id="{{$logs.StartTime}}"> | ||
<table class="table"> | ||
<thead class="thead-dark"> | ||
</ul> | ||
<div class="tab-content"> | ||
{{range $logs := .MatchLogs.Logs}} | ||
<div class="tab-pane {{if eq $.FirstMatch $logs.StartTime}} active{{end}}" id="{{$logs.StartTime}}"> | ||
<table class="table"> | ||
<thead class="thead-dark" style="position: sticky; top: 0px;"> | ||
<tr> | ||
<th>Match Time</th> | ||
<th>DS Linked</th> | ||
<th>Radio Linked</th> | ||
<th>Rio Linked</th> | ||
<th>Robot Linked</th> | ||
<th>Mode</th> | ||
<th>Enabled</th> | ||
<th>E-Stop</th> | ||
<th>Voltage</th> | ||
<th>Missed Packets</th> | ||
<th>Latency</th> | ||
<th>TX Rate</th> | ||
<th>RX Rate</th> | ||
<th>SNR</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
{{range $row := $logs.Rows}} | ||
<tr> | ||
<th>Match Time</th> | ||
<th>DS Linked</th> | ||
<th>Radio Linked</th> | ||
<th>Rio Linked</th> | ||
<th>Robot Linked</th> | ||
<th>Mode</th> | ||
<th>Enabled</th> | ||
<th>E-Stop</th> | ||
<th>Voltage</th> | ||
<th>Missed Packets</th> | ||
<th>Latency</th> | ||
<th>TX Rate</th> | ||
<th>RX Rate</th> | ||
<th>SNR</th> | ||
<td class="{{if and $row.DsLinked $row.RadioLinked $row.RobotLinked}}bg-green{{else}}bg-red{{end}}"> | ||
{{printf "%.2f" $row.MatchTimeSec}} | ||
</td> | ||
<td>{{$row.DsLinked}}</td> | ||
<td>{{if $row.DsLinked}}{{$row.RadioLinked}}{{else}}*****{{end}}</td> | ||
<td>{{if and $row.DsLinked $row.RadioLinked}}{{$row.RioLinked}}{{else}}*****{{end}}</td> | ||
<td>{{if and $row.DsLinked $row.RadioLinked $row.RioLinked}}{{$row.RobotLinked}}{{else}}*****{{end}}</td> | ||
<td>{{if $row.Auto}}Auto{{else}}Telop{{end}}</td> | ||
<td>{{$row.Enabled}}</td> | ||
<td>{{$row.EmergencyStop}}</td> | ||
<td>{{printf "%.3f" $row.BatteryVoltage}}</td> | ||
<td>{{$row.MissedPacketCount}}</td> | ||
<td>{{$row.DsRobotTripTimeMs}}</td> | ||
<td>{{$row.TxRate}}</td> | ||
<td>{{$row.RxRate}}</td> | ||
<td>{{$row.SignalNoiseRatio}}</td> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
{{range $row := $logs.Rows}} | ||
<tr> | ||
<td data-status-ok="{{and $row.DsLinked $row.RadioLinked $row.RobotLinked}}">{{printf "%.2f" $row.MatchTimeSec}}</td> | ||
<td>{{$row.DsLinked}}</td> | ||
<td>{{if $row.DsLinked}}{{$row.RadioLinked}}{{else}}*****{{end}}</td> | ||
<td>{{if and $row.DsLinked $row.RadioLinked}}{{$row.RioLinked}}{{else}}*****{{end}}</td> | ||
<td>{{if and $row.DsLinked $row.RadioLinked $row.RioLinked}}{{$row.RobotLinked}}{{else}}*****{{end}}</td> | ||
<td>{{if $row.Auto}}Auto{{else}}Telop{{end}}</td> | ||
<td>{{$row.Enabled}}</td> | ||
<td>{{$row.EmergencyStop}}</td> | ||
<td>{{printf "%.3f" $row.BatteryVoltage}}</td> | ||
<td>{{$row.MissedPacketCount}}</td> | ||
<td>{{$row.DsRobotTripTimeMs}}</td> | ||
<td>{{$row.TxRate}}</td> | ||
<td>{{$row.RxRate}}</td> | ||
<td>{{$row.SignalNoiseRatio}}</td> | ||
</tr> | ||
{{end}} | ||
</tbody> | ||
</table> | ||
</div> | ||
{{end}} | ||
{{end}} | ||
</tbody> | ||
</table> | ||
</div> | ||
</body> | ||
</html> | ||
{{end}} | ||
</div> | ||
{{end}} | ||
{{define "script"}} | ||
|
||
<script src="/static/js/lib/jquery.min.js"></script> | ||
<script src="/static/js/lib/bootstrap.min.js"></script> | ||
<script src="/static/js/lib/moment.min.js"></script> | ||
<script src="/static/js/lib/bootstrap-datetimepicker.min.js"></script> | ||
<script src="/static/js/lib/handlebars-1.3.0.js"></script> | ||
{{end}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters