-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlive_read.html
139 lines (129 loc) · 6.02 KB
/
live_read.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
<link href="https://fonts.googleapis.com/css?family=Corben:bold" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css2?family=Roboto&display=swap" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="live_read.css">
</head>
<body style="text-align:center;">
<div id="narrow-container">
<!-- The header and the navbar -->
<h3 id="customHeader">CanDense</h3>
<div class="row">
<div class="col-12">
<nav class="navbar justify-content-center">
<ul class="list-inline">
<li class="list-inline-item">
<a href="live_read.html" class="navbar-link" onclick="endPage()">Live Read</a>
</li>
<li class="list-inline-item">
<a href="file_read.html" class="navbar-link" onclick="endPage()">File Read</a>
</li>
<li class="list-inline-item">
<a href="transmit.html" class="navbar-link" onclick="endPage()">Transmit</a>
</li>
</ul>
</nav>
</div>
</div>
<div class="row">
<div class="col-12">
<hr id="navbar-rule">
</div>
</div>
<!-- Vehicle profile -->
<div class="row justify-content-center">
<div class="col-md-auto">
<div class="root-div">
<div>
<h5 class="center">Vehicle Profile</h5>
</div> <br>
<div class="horizontal-container">
<div class="horizontal-5050-div">
<label id="vehicle-profile-label">Vehicle <br>
<select type="file" id="vehicle-profile-name" onChange="vehicleSelectionChanged(event)"></select></label>
<br>
<button id="add-vehicle-btn">+</button>
<button id="remove-vehicle-btn">-</button>
<br>
</div>
<div class="horizontal-5050-div">
<!-- DOM elements relevant to adding labels to IDs -->
<label for="id-input">ID<br><input type="text" id="id-input" name="id-input" length=3></label>
<label for="label-input">Label<br><input type="text" id="label-input" name="label-input" length=16></label> <br>
<button id="add-label-btn" title="Adds the given label to the given ID" onclick="addLabel()">+</button>
<button id="remove-label-btn" title="Removes the given label" onclick="removeLabel()">-</button>
</div>
</div>
</div>
<!--Data-->
<div id="knownIdsTable" align="center" hidden>
<h4>Known IDs</h4>
<!--Container for the table of ids and labels-->
<div id="tableID"></div>
</div><br>
</div>
</div>
<div class="row justify-content-center">
<div class="col-md-auto">
<div class="root-div">
<h4>Reading</h4>
<!-- Start/Pause the reading -->
<button id="toggleReadBtn" onclick="toggleReadBtnPressed()">Start reading</button><br><br>
<!-- Set the log path-->
<label for="logfile-path" title="The location to place the log and name of the log to create, will overwrite if name matches existing log">Log Location</label>
<div id="log-path"><input type="text" id="logfile-path" placeholder="path/to/logfile.log"></input>
<button onclick="setupLogger()" id="setLogPathBtn">Set log path</button></div>
<br>
<!-- Start/pause and stop logging buttons -->
<button id="toggleLogBtn" onclick="toggleLogBtnPressed()">Start Logging</button>
<button onclick="endLogger()">Save Log</button>
<br><br><br>
<!-- DOM elements for filtering -->
<h4>Filters</h4>
<label for="id-filter" title="A particular ID to search for">ID</label>
<input type="text" name="id-filter" id="id-filter" size="2"></input>
<label for="msg-freq-filter" title="Shows messages that occured this often" style="padding-left: 20px;">ID Frequency</label>
<input type="text" name="msg-freq-filter" id="msg-freq-filter" size="5"></input><br>
<div>
<label style="padding-right: 2px;">OR <input type="radio" value="OR" name="table-count-filter-operator" checked onclick="orClick()"></label>
<label>AND <input type="radio" value="AND" name="table-count-filter-operator" onclick="andClick()"></label>
</div>
<label class="label-inline" for="msg-freq-tolerance" title="Turns the given frequency into a range of Freq +/- tolerance">Tolerance</label>
<input type="number" name="msg-freq-tolerance" id="msg-freq-tolerance" size="5"></input>
<br>
<label class="label-inline" for="time-filter" title="Filters messages that have occured in the last seconds">Time (s)</label>
<input type="text" name="time-filter" id="time-filter"></input><br>
<label class="label-inline" for="data-val-filter" title="Filters messages for specific data values">Data Field</label>
<input type="text" name="data-val-filter" id="data-val-filter"></input>
<br>
<!--Apply and clear fitlers-->
<button id="apply-filter-btn" onclick="filter()">Filter</button>
<button id="clear-filter-btn" onclick="clearFilter()">Clear</button>
<br>
<br>
</div>
</div>
</div>
<!--Data-->
<div id="live-messages" align="center" hidden>
<h4>Messages</h4>
<!--Container for the table of last occurences-->
<div id="table"></div>
</div>
<!-- The Modal -->
<div class="row d-flex justify-content-center">
<div id="myModal" class="modal">
<!-- Modal content -->
<div class="modal-content">
<label for="vehicle-name">Enter a vehicle:</label>
<input type="text" name="vehicle-name" id="vehicle-name">
<button class="close" onclick="hideModal()">Enter</button>
</div>
</div>
</div>
</div>
</body>
<script src="./live_read.js"></script>
</html>