Skip to content

Commit 68c1803

Browse files
authored
Merge pull request #181 from lbussy/style_fs
Style fs
2 parents 7acb633 + 139a060 commit 68c1803

File tree

15 files changed

+710
-141
lines changed

15 files changed

+710
-141
lines changed

TODO.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# TODO:
2+
3+
[ ] - Consider a more generic MQTT (Like: https://github.com/lbussy/brew-bubbles/issues/50)
4+
[ ] - Document `/fs/`
5+
[ ] - Make sure we are using secret on `/fs/` stuff
6+
[ ] - Fix progress on uploads
7+
[ ] - Add configration parameter to use Telnet
8+
[ ] - Switch to LittleFS
9+
[ ] - Make a config/flowmeter backup
10+
11+
Crash:
12+
13+
```
14+
2023-04-26T18:07:37Z V: KegScreen reporting not enabled, skipping (Tap Info).
15+
2023-04-26T18:07:50Z N: Tap 0 is kicked.
16+
2023-04-26T18:07:50Z V: 2023-04-26T18:07:50Z Flowmeter Config Save: Saving configuratV: ion.
17+
KegScreen reporting not enabled, skipping (Kick Report).
18+
Guru Meditation Error: Core 0 panic'ed (Unhandled debug exception).
19+
Debug exception reason: Stack canary watchpoint triggered (esp_timer)
20+
Core 0 register dump:
21+
PC : 0x400dfd22 PS : 0x00060a36 A0 : 0x800e1d12 A1 : 0x3ffbabe0
22+
A2 : 0x3ffc4f98 A3 : 0x3ffbbc88 A4 : 0x3ffbb0c0 A5 : 0x3ffbac24
23+
A6 : 0x00000001 A7 : 0x3ffbbc88 A8 : 0x00000001 A9 : 0x3ffbab70
24+
A10 : 0x3f40351c A11 : 0x00000001 A12 : 0x000000ff A13 : 0x0000ff00
25+
A14 : 0x00ff0000 A15 : 0xff000000 SAR : 0x00000017 EXCCAUSE: 0x00000001
26+
EXCVADDR: 0x00000000 LBEG : 0x4008b62d LEND : 0x4008b63d LCOUNT : 0xfffffffc
27+
28+
Backtrace: 0x400dfd1f:0x3ffbabe0 0x400e1d0f:0x3ffbaf90 0x400e46e2:0x3ffbb0a0 0x400e4755:0x3ffbbd10 0x400e4bfb:0x3ffbbd50 0x4016687f:0x3ffbbd70
29+
30+
#0 0x400dfd1f:0x3ffbabe0 in ArduinoJson6194_F1::VariantRef ArduinoJson6194_F1::ObjectRef::getOrAddMember<char const>(char const*) const at .pio/libdeps/lolin_d32/ArduinoJson/src/ArduinoJson/Object/ObjectRef.hpp:210
31+
(inlined by) ArduinoJson6194_F1::MemberProxy<ArduinoJson6194_F1::ObjectRef, char const*>::getOrAddUpstreamMember() const at .pio/libdeps/lolin_d32/ArduinoJson/src/ArduinoJson/Object/MemberProxy.hpp:191
32+
(inlined by) ArduinoJson6194_F1::enable_if<!ArduinoJson6194_F1::is_array<int>::value, ArduinoJson6194_F1::MemberProxy<ArduinoJson6194_F1::ObjectRef, char const*>&>::type ArduinoJson6194_F1::MemberProxy<ArduinoJson6194_F1::ObjectRef, char const*>::operator=<int>(int const&) at .pio/libdeps/lolin_d32/ArduinoJson/src/ArduinoJson/Object/MemberProxy.hpp:49
33+
(inlined by) Taps::save(ArduinoJson6194_F1::ObjectRef) const at src/flowconfig.cpp:143
34+
#1 0x400e1d0f:0x3ffbaf90 in Flowmeter::save(ArduinoJson6194_F1::ObjectRef) const at src/flowconfig.cpp:267
35+
#2 0x400e46e2:0x3ffbb0a0 in serializeFlowConfig(Print&) at src/flowconfig.cpp:133
36+
#3 0x400e4755:0x3ffbbd10 in saveFlowConfig() at src/flowconfig.cpp:85
37+
#4 0x400e4bfb:0x3ffbbd50 in logFlow() at src/flowmeter.cpp:127
38+
#5 0x4016687f:0x3ffbbd70 in timer_process_alarm at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/esp_timer/src/esp_timer.c:360
39+
(inlined by) timer_task at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/esp_timer/src/esp_timer.c:386
40+
41+
ELF file SHA256: a595e9a8a5537282
42+
43+
Rebooting...
44+
```

data_source/about.htm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ <h4 >
127127
</tr>
128128
</tbody>
129129
</table>
130+
<p>Access <a href="/fs/">filesystem information<a>.</p>
130131
</div>
131132
</div> <!-- About Keg Cop Information -->
132133

data_source/favicon-16x16.png

1.39 KB
Loading

data_source/flowconfig.json

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
"taps":[
44
{
55
"tapid":0,
6-
"taplabel": 1,
6+
"label": 1,
7+
"taplistioTap": 0,
78
"pin":0,
89
"ppu":21120,
910
"name":"Pudswiller Doors",
@@ -14,7 +15,8 @@
1415
},
1516
{
1617
"tapid":1,
17-
"taplabel": 2,
18+
"label": 2,
19+
"taplistioTap": 1,
1820
"pin":4,
1921
"ppu":21120,
2022
"name":"Bug's House Ale",
@@ -25,7 +27,8 @@
2527
},
2628
{
2729
"tapid":2,
28-
"taplabel": 3,
30+
"label": 3,
31+
"taplistioTap": 2,
2932
"pin":17,
3033
"ppu":21120,
3134
"name":"Navelgazer IPA",
@@ -36,7 +39,8 @@
3639
},
3740
{
3841
"tapid":3,
39-
"taplabel": 4,
42+
"label": 4,
43+
"taplistioTap": 3,
4044
"pin":18,
4145
"ppu":21120,
4246
"name":"Tanked 7",
@@ -47,7 +51,8 @@
4751
},
4852
{
4953
"tapid":4,
50-
"taplabel": 5,
54+
"label": 5,
55+
"taplistioTap": 4,
5156
"pin":19,
5257
"ppu":21120,
5358
"name":"Ringaling Lager",
@@ -58,7 +63,8 @@
5863
},
5964
{
6065
"tapid":5,
61-
"taplabel": 6,
66+
"label": 6,
67+
"taplistioTap": 5,
6268
"pin":21,
6369
"ppu":21120,
6470
"name":"Peter Skee",
@@ -69,7 +75,8 @@
6975
},
7076
{
7177
"tapid":6,
72-
"taplabel": 7,
78+
"label": 7,
79+
"taplistioTap": 6,
7380
"pin":22,
7481
"ppu":21120,
7582
"name":"Undead Guy",
@@ -80,7 +87,8 @@
8087
},
8188
{
8289
"tapid":7,
83-
"taplabel": 8,
90+
"label": 8,
91+
"taplistioTap": 7,
8492
"pin":23,
8593
"ppu":21120,
8694
"name":"Who's Garden",
@@ -91,7 +99,8 @@
9199
},
92100
{
93101
"tapid":8,
94-
"taplabel": 9,
102+
"label": 9,
103+
"taplistioTap": 8,
95104
"pin":12,
96105
"ppu":21120,
97106
"name":"Mystery Mead",

data_source/fs.htm

Lines changed: 95 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@
6060
</ul>
6161
<ul class="navbar-nav ms-auto">
6262
<li class="nav-item">
63-
<a id="noChange" class="navbar-brand nav-link active" target="_blank" href="https://docs.kegcop.com/en/latest/context/help/index.html">?</a>
63+
<a id="noChange" class="navbar-brand nav-link active" target="_blank"
64+
href="https://docs.kegcop.com/en/latest/context/help/index.html">?</a>
6465
</li>
6566
</ul>
6667
</div>
@@ -77,29 +78,102 @@
7778

7879
<div class="card-header d-flex"> <!-- Keg Cop Filesystem -->
7980
<ul class="navbar me-auto">
80-
<h4 >Keg Cop Filesystem</h4>
81+
<h4>Keg Cop Filesystem</h4>
8182
</ul>
8283
</div>
8384
<div class="card-body">
8485

8586
<h5>File System Info:</h5>
86-
<p id="fsinfo">
87-
Free Storage: <span id="freespiffs"></span> <br />
88-
Used Storage: <span id="usedspiffs"></span> <br />
89-
Total Storage: <span id="totalspiffs"></span>
90-
</p>
91-
<p>
92-
<button onclick="listFiles()">List Files</button>
93-
<button onclick="showUpload()">Upload File</button>
94-
</p>
95-
<p id="status"></p>
96-
<p id="detailsHeader"></p>
97-
<p id="details"></p>
98-
99-
</div>
100-
</div> <!-- Keg Cop Filesystem -->
10187

102-
</div> <!-- Container -->
88+
<table id="fsinfo" class="table table-hover">
89+
<tbody>
90+
<tr class="table-firmware table-primary">
91+
<th></th>
92+
<th scope="row">Free Storage:</th>
93+
<td>
94+
<div id="freespiffs">... loading</div>
95+
</td>
96+
</tr>
97+
<tr class="table-firmware table-default">
98+
<th></th>
99+
<th scope="row">Used Storage:</th>
100+
<td>
101+
<div id="usedspiffs">... loading</div>
102+
</td>
103+
</tr>
104+
<tr class="table-firmware table-primary">
105+
<th></th>
106+
<th scope="row">Total Storage:</th>
107+
<td>
108+
<div id="totalspiffs">... loading</div>
109+
</td>
110+
</tr>
111+
</tbody>
112+
</table>
113+
114+
<div>
115+
<button id="listFiles" type="button" class="btn btn-primary internal-action">
116+
List Files
117+
</button>
118+
<button id="uploadFile" type="button" class="btn btn-secondary internal-action">
119+
Upload File
120+
</button>
121+
</div>
122+
123+
<!-- File Upload Div: -->
124+
<div id="uploadForm" style="display:none;">
125+
<p></p>
126+
<div>
127+
<h5>Upload File:</h5>
128+
</div>
129+
<div>
130+
<form enctype="multipart/form-data" method="post">
131+
132+
<div class="input-group mb-3">
133+
<input type="file" name="uploadFile" id="uploadFile" class="form-control"
134+
onchange="fileChange()">
135+
<div class="input-group-append">
136+
<span id="uploadButton" type="button" class="btn btn-info internal-action"
137+
onclick="uploadFile()">
138+
Upload
139+
</span>
140+
<span id="cancelButton" type="button" class="btn btn-warning internal-action"
141+
onclick="cancelUpload()">
142+
Cancel
143+
</span>
144+
</div>
145+
</div>
146+
147+
<p id="status"></p>
148+
149+
<div class="progress">
150+
<div class="progress-bar progress-bar-striped progress-bar-animated"
151+
role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100"
152+
style="width: 75%"></div>
153+
</div>
154+
155+
<p id="loaded_n_total"></p>
156+
</form>
157+
</div>
158+
</div>
159+
<!-- File Upload Div^ -->
160+
161+
<!-- File Details Div: -->
162+
<div id="fileList" style="display:none;">
163+
<p>&nbsp;</p>
164+
<hr>
165+
<div>
166+
<span id="fileHeader"></span>
167+
&nbsp;
168+
<span id="fileStatus"></span>
169+
</div>
170+
<div id="fileDetails"></div>
171+
</div>
172+
<!-- File Details Div^ -->
173+
174+
</div> <!-- Keg Cop Filesystem -->
175+
176+
</div> <!-- Container -->
103177

104178
</main>
105179

@@ -111,13 +185,13 @@ <h5>File System Info:</h5>
111185

112186
<script src="https://code.jquery.com/jquery-3.4.1.min.js"
113187
integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous">
114-
</script>
188+
</script>
115189
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"
116190
integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous">
117-
</script>
191+
</script>
118192
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"
119193
integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous">
120-
</script>
194+
</script>
121195

122196
<script src="/kegcop_post.js"></script>
123197
<script src="/fs.js"></script>

0 commit comments

Comments
 (0)