aprsd 3.4.3__py3-none-any.whl → 4.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- aprsd/cli_helper.py +12 -5
- aprsd/client/aprsis.py +68 -17
- aprsd/client/base.py +60 -12
- aprsd/client/drivers/aprsis.py +11 -5
- aprsd/client/drivers/fake.py +15 -20
- aprsd/client/factory.py +6 -3
- aprsd/client/fake.py +5 -4
- aprsd/client/kiss.py +43 -7
- aprsd/client/stats.py +2 -22
- aprsd/cmds/completion.py +7 -4
- aprsd/cmds/dev.py +39 -43
- aprsd/cmds/fetch_stats.py +221 -69
- aprsd/cmds/healthcheck.py +7 -5
- aprsd/cmds/list_plugins.py +140 -134
- aprsd/cmds/listen.py +102 -11
- aprsd/cmds/server.py +71 -37
- aprsd/conf/__init__.py +1 -2
- aprsd/conf/client.py +3 -4
- aprsd/conf/common.py +29 -92
- aprsd/conf/log.py +2 -4
- aprsd/conf/opts.py +5 -4
- aprsd/conf/plugin_common.py +11 -121
- aprsd/exception.py +2 -0
- aprsd/log/log.py +7 -46
- aprsd/main.py +19 -9
- aprsd/packets/__init__.py +14 -4
- aprsd/packets/core.py +82 -91
- aprsd/packets/log.py +8 -8
- aprsd/packets/packet_list.py +18 -25
- aprsd/plugin.py +33 -15
- aprsd/plugins/fortune.py +2 -2
- aprsd/plugins/notify.py +1 -4
- aprsd/plugins/weather.py +10 -8
- aprsd/stats/__init__.py +0 -2
- aprsd/stats/collector.py +11 -3
- aprsd/threads/__init__.py +3 -2
- aprsd/threads/aprsd.py +57 -10
- aprsd/threads/{keep_alive.py → keepalive.py} +14 -37
- aprsd/threads/registry.py +3 -3
- aprsd/threads/rx.py +48 -17
- aprsd/threads/stats.py +2 -2
- aprsd/threads/tx.py +34 -10
- aprsd/utils/__init__.py +62 -15
- aprsd/utils/counter.py +15 -12
- aprsd/utils/json.py +9 -4
- aprsd/utils/keepalive_collector.py +55 -0
- aprsd/utils/trace.py +4 -4
- aprsd-4.0.0.dist-info/AUTHORS +1 -0
- aprsd-4.0.0.dist-info/METADATA +293 -0
- aprsd-4.0.0.dist-info/RECORD +74 -0
- {aprsd-3.4.3.dist-info → aprsd-4.0.0.dist-info}/WHEEL +1 -1
- aprsd/cmds/webchat.py +0 -674
- aprsd/conf/plugin_email.py +0 -105
- aprsd/plugins/email.py +0 -709
- aprsd/plugins/location.py +0 -179
- aprsd/threads/log_monitor.py +0 -121
- aprsd/web/__init__.py +0 -0
- aprsd/web/admin/__init__.py +0 -0
- aprsd/web/admin/static/css/index.css +0 -84
- aprsd/web/admin/static/css/prism.css +0 -4
- aprsd/web/admin/static/css/tabs.css +0 -35
- aprsd/web/admin/static/images/Untitled.png +0 -0
- aprsd/web/admin/static/images/aprs-symbols-16-0.png +0 -0
- aprsd/web/admin/static/images/aprs-symbols-16-1.png +0 -0
- aprsd/web/admin/static/images/aprs-symbols-64-0.png +0 -0
- aprsd/web/admin/static/images/aprs-symbols-64-1.png +0 -0
- aprsd/web/admin/static/images/aprs-symbols-64-2.png +0 -0
- aprsd/web/admin/static/js/charts.js +0 -235
- aprsd/web/admin/static/js/echarts.js +0 -465
- aprsd/web/admin/static/js/logs.js +0 -26
- aprsd/web/admin/static/js/main.js +0 -231
- aprsd/web/admin/static/js/prism.js +0 -12
- aprsd/web/admin/static/js/send-message.js +0 -114
- aprsd/web/admin/static/js/tabs.js +0 -28
- aprsd/web/admin/templates/index.html +0 -196
- aprsd/web/chat/static/css/chat.css +0 -115
- aprsd/web/chat/static/css/index.css +0 -66
- aprsd/web/chat/static/css/style.css.map +0 -1
- aprsd/web/chat/static/css/tabs.css +0 -41
- aprsd/web/chat/static/css/upstream/bootstrap.min.css +0 -6
- aprsd/web/chat/static/css/upstream/font.woff2 +0 -0
- aprsd/web/chat/static/css/upstream/google-fonts.css +0 -23
- aprsd/web/chat/static/css/upstream/jquery-ui.css +0 -1311
- aprsd/web/chat/static/css/upstream/jquery.toast.css +0 -28
- aprsd/web/chat/static/css/upstream/themes/default/assets/fonts/LatoLatin-Bold.woff +0 -0
- aprsd/web/chat/static/css/upstream/themes/default/assets/fonts/LatoLatin-Bold.woff2 +0 -0
- aprsd/web/chat/static/css/upstream/themes/default/assets/fonts/LatoLatin-Regular.woff +0 -0
- aprsd/web/chat/static/css/upstream/themes/default/assets/fonts/LatoLatin-Regular.woff2 +0 -0
- aprsd/web/chat/static/css/upstream/themes/default/assets/fonts/icons.woff +0 -0
- aprsd/web/chat/static/css/upstream/themes/default/assets/fonts/icons.woff2 +0 -0
- aprsd/web/chat/static/css/upstream/themes/default/assets/fonts/outline-icons.woff +0 -0
- aprsd/web/chat/static/css/upstream/themes/default/assets/fonts/outline-icons.woff2 +0 -0
- aprsd/web/chat/static/images/Untitled.png +0 -0
- aprsd/web/chat/static/images/aprs-symbols-16-0.png +0 -0
- aprsd/web/chat/static/images/aprs-symbols-16-1.png +0 -0
- aprsd/web/chat/static/images/aprs-symbols-64-0.png +0 -0
- aprsd/web/chat/static/images/aprs-symbols-64-1.png +0 -0
- aprsd/web/chat/static/images/aprs-symbols-64-2.png +0 -0
- aprsd/web/chat/static/images/globe.svg +0 -3
- aprsd/web/chat/static/js/gps.js +0 -84
- aprsd/web/chat/static/js/main.js +0 -45
- aprsd/web/chat/static/js/send-message.js +0 -585
- aprsd/web/chat/static/js/tabs.js +0 -28
- aprsd/web/chat/static/js/upstream/bootstrap.bundle.min.js +0 -7
- aprsd/web/chat/static/js/upstream/jquery-3.7.1.min.js +0 -2
- aprsd/web/chat/static/js/upstream/jquery-ui.min.js +0 -13
- aprsd/web/chat/static/js/upstream/jquery.toast.js +0 -374
- aprsd/web/chat/static/js/upstream/semantic.min.js +0 -11
- aprsd/web/chat/static/js/upstream/socket.io.min.js +0 -7
- aprsd/web/chat/templates/index.html +0 -139
- aprsd/wsgi.py +0 -315
- aprsd-3.4.3.dist-info/AUTHORS +0 -13
- aprsd-3.4.3.dist-info/METADATA +0 -793
- aprsd-3.4.3.dist-info/RECORD +0 -133
- {aprsd-3.4.3.dist-info → aprsd-4.0.0.dist-info}/LICENSE +0 -0
- {aprsd-3.4.3.dist-info → aprsd-4.0.0.dist-info}/entry_points.txt +0 -0
- {aprsd-3.4.3.dist-info → aprsd-4.0.0.dist-info}/top_level.txt +0 -0
@@ -1,465 +0,0 @@
|
|
1
|
-
var packet_list = {};
|
2
|
-
|
3
|
-
var tx_data = [];
|
4
|
-
var rx_data = [];
|
5
|
-
|
6
|
-
var packet_types_data = {};
|
7
|
-
|
8
|
-
var mem_current = []
|
9
|
-
var mem_peak = []
|
10
|
-
|
11
|
-
var thread_current = []
|
12
|
-
|
13
|
-
|
14
|
-
function start_charts() {
|
15
|
-
console.log("start_charts() called");
|
16
|
-
// Initialize the echarts instance based on the prepared dom
|
17
|
-
create_packets_chart();
|
18
|
-
create_packets_types_chart();
|
19
|
-
create_messages_chart();
|
20
|
-
create_ack_chart();
|
21
|
-
create_memory_chart();
|
22
|
-
create_thread_chart();
|
23
|
-
}
|
24
|
-
|
25
|
-
|
26
|
-
function create_packets_chart() {
|
27
|
-
// The packets totals TX/RX chart.
|
28
|
-
pkt_c_canvas = document.getElementById('packetsChart');
|
29
|
-
packets_chart = echarts.init(pkt_c_canvas);
|
30
|
-
|
31
|
-
// Specify the configuration items and data for the chart
|
32
|
-
var option = {
|
33
|
-
title: {
|
34
|
-
text: 'APRS Packet totals'
|
35
|
-
},
|
36
|
-
legend: {},
|
37
|
-
tooltip : {
|
38
|
-
trigger: 'axis'
|
39
|
-
},
|
40
|
-
toolbox: {
|
41
|
-
show : true,
|
42
|
-
feature : {
|
43
|
-
mark : {show: true},
|
44
|
-
dataView : {show: true, readOnly: true},
|
45
|
-
magicType : {show: true, type: ['line', 'bar']},
|
46
|
-
restore : {show: true},
|
47
|
-
saveAsImage : {show: true}
|
48
|
-
}
|
49
|
-
},
|
50
|
-
calculable : true,
|
51
|
-
xAxis: { type: 'time' },
|
52
|
-
yAxis: { },
|
53
|
-
series: [
|
54
|
-
{
|
55
|
-
name: 'tx',
|
56
|
-
type: 'line',
|
57
|
-
smooth: true,
|
58
|
-
color: 'red',
|
59
|
-
encode: {
|
60
|
-
x: 'timestamp',
|
61
|
-
y: 'tx' // refer sensor 1 value
|
62
|
-
}
|
63
|
-
},{
|
64
|
-
name: 'rx',
|
65
|
-
type: 'line',
|
66
|
-
smooth: true,
|
67
|
-
encode: {
|
68
|
-
x: 'timestamp',
|
69
|
-
y: 'rx'
|
70
|
-
}
|
71
|
-
}]
|
72
|
-
};
|
73
|
-
|
74
|
-
// Display the chart using the configuration items and data just specified.
|
75
|
-
packets_chart.setOption(option);
|
76
|
-
}
|
77
|
-
|
78
|
-
|
79
|
-
function create_packets_types_chart() {
|
80
|
-
// The packets types chart
|
81
|
-
pkt_types_canvas = document.getElementById('packetTypesChart');
|
82
|
-
packet_types_chart = echarts.init(pkt_types_canvas);
|
83
|
-
|
84
|
-
// The series and data are built and updated on the fly
|
85
|
-
// as packets come in.
|
86
|
-
var option = {
|
87
|
-
title: {
|
88
|
-
text: 'Packet Types'
|
89
|
-
},
|
90
|
-
legend: {},
|
91
|
-
tooltip : {
|
92
|
-
trigger: 'axis'
|
93
|
-
},
|
94
|
-
toolbox: {
|
95
|
-
show : true,
|
96
|
-
feature : {
|
97
|
-
mark : {show: true},
|
98
|
-
dataView : {show: true, readOnly: true},
|
99
|
-
magicType : {show: true, type: ['line', 'bar']},
|
100
|
-
restore : {show: true},
|
101
|
-
saveAsImage : {show: true}
|
102
|
-
}
|
103
|
-
},
|
104
|
-
calculable : true,
|
105
|
-
xAxis: { type: 'time' },
|
106
|
-
yAxis: { },
|
107
|
-
}
|
108
|
-
|
109
|
-
packet_types_chart.setOption(option);
|
110
|
-
}
|
111
|
-
|
112
|
-
|
113
|
-
function create_messages_chart() {
|
114
|
-
msg_c_canvas = document.getElementById('messagesChart');
|
115
|
-
message_chart = echarts.init(msg_c_canvas);
|
116
|
-
|
117
|
-
// Specify the configuration items and data for the chart
|
118
|
-
var option = {
|
119
|
-
title: {
|
120
|
-
text: 'Message Packets'
|
121
|
-
},
|
122
|
-
legend: {},
|
123
|
-
tooltip: {
|
124
|
-
trigger: 'axis'
|
125
|
-
},
|
126
|
-
toolbox: {
|
127
|
-
show: true,
|
128
|
-
feature: {
|
129
|
-
mark : {show: true},
|
130
|
-
dataView : {show: true, readOnly: true},
|
131
|
-
magicType : {show: true, type: ['line', 'bar']},
|
132
|
-
restore : {show: true},
|
133
|
-
saveAsImage : {show: true}
|
134
|
-
}
|
135
|
-
},
|
136
|
-
calculable: true,
|
137
|
-
xAxis: { type: 'time' },
|
138
|
-
yAxis: { },
|
139
|
-
series: [
|
140
|
-
{
|
141
|
-
name: 'tx',
|
142
|
-
type: 'line',
|
143
|
-
smooth: true,
|
144
|
-
color: 'red',
|
145
|
-
encode: {
|
146
|
-
x: 'timestamp',
|
147
|
-
y: 'tx' // refer sensor 1 value
|
148
|
-
}
|
149
|
-
},{
|
150
|
-
name: 'rx',
|
151
|
-
type: 'line',
|
152
|
-
smooth: true,
|
153
|
-
encode: {
|
154
|
-
x: 'timestamp',
|
155
|
-
y: 'rx'
|
156
|
-
}
|
157
|
-
}]
|
158
|
-
};
|
159
|
-
|
160
|
-
// Display the chart using the configuration items and data just specified.
|
161
|
-
message_chart.setOption(option);
|
162
|
-
}
|
163
|
-
|
164
|
-
function create_ack_chart() {
|
165
|
-
ack_canvas = document.getElementById('acksChart');
|
166
|
-
ack_chart = echarts.init(ack_canvas);
|
167
|
-
|
168
|
-
// Specify the configuration items and data for the chart
|
169
|
-
var option = {
|
170
|
-
title: {
|
171
|
-
text: 'Ack Packets'
|
172
|
-
},
|
173
|
-
legend: {},
|
174
|
-
tooltip: {
|
175
|
-
trigger: 'axis'
|
176
|
-
},
|
177
|
-
toolbox: {
|
178
|
-
show: true,
|
179
|
-
feature: {
|
180
|
-
mark : {show: true},
|
181
|
-
dataView : {show: true, readOnly: false},
|
182
|
-
magicType : {show: true, type: ['line', 'bar']},
|
183
|
-
restore : {show: true},
|
184
|
-
saveAsImage : {show: true}
|
185
|
-
}
|
186
|
-
},
|
187
|
-
calculable: true,
|
188
|
-
xAxis: { type: 'time' },
|
189
|
-
yAxis: { },
|
190
|
-
series: [
|
191
|
-
{
|
192
|
-
name: 'tx',
|
193
|
-
type: 'line',
|
194
|
-
smooth: true,
|
195
|
-
color: 'red',
|
196
|
-
encode: {
|
197
|
-
x: 'timestamp',
|
198
|
-
y: 'tx' // refer sensor 1 value
|
199
|
-
}
|
200
|
-
},{
|
201
|
-
name: 'rx',
|
202
|
-
type: 'line',
|
203
|
-
smooth: true,
|
204
|
-
encode: {
|
205
|
-
x: 'timestamp',
|
206
|
-
y: 'rx'
|
207
|
-
}
|
208
|
-
}]
|
209
|
-
};
|
210
|
-
|
211
|
-
ack_chart.setOption(option);
|
212
|
-
}
|
213
|
-
|
214
|
-
function create_memory_chart() {
|
215
|
-
ack_canvas = document.getElementById('memChart');
|
216
|
-
memory_chart = echarts.init(ack_canvas);
|
217
|
-
|
218
|
-
// Specify the configuration items and data for the chart
|
219
|
-
var option = {
|
220
|
-
title: {
|
221
|
-
text: 'Memory Usage'
|
222
|
-
},
|
223
|
-
legend: {},
|
224
|
-
tooltip: {
|
225
|
-
trigger: 'axis'
|
226
|
-
},
|
227
|
-
toolbox: {
|
228
|
-
show: true,
|
229
|
-
feature: {
|
230
|
-
mark : {show: true},
|
231
|
-
dataView : {show: true, readOnly: false},
|
232
|
-
magicType : {show: true, type: ['line', 'bar']},
|
233
|
-
restore : {show: true},
|
234
|
-
saveAsImage : {show: true}
|
235
|
-
}
|
236
|
-
},
|
237
|
-
calculable: true,
|
238
|
-
xAxis: { type: 'time' },
|
239
|
-
yAxis: { },
|
240
|
-
series: [
|
241
|
-
{
|
242
|
-
name: 'current',
|
243
|
-
type: 'line',
|
244
|
-
smooth: true,
|
245
|
-
color: 'red',
|
246
|
-
encode: {
|
247
|
-
x: 'timestamp',
|
248
|
-
y: 'current' // refer sensor 1 value
|
249
|
-
}
|
250
|
-
},{
|
251
|
-
name: 'peak',
|
252
|
-
type: 'line',
|
253
|
-
smooth: true,
|
254
|
-
encode: {
|
255
|
-
x: 'timestamp',
|
256
|
-
y: 'peak'
|
257
|
-
}
|
258
|
-
}]
|
259
|
-
};
|
260
|
-
|
261
|
-
memory_chart.setOption(option);
|
262
|
-
}
|
263
|
-
|
264
|
-
function create_thread_chart() {
|
265
|
-
thread_canvas = document.getElementById('threadChart');
|
266
|
-
thread_chart = echarts.init(thread_canvas);
|
267
|
-
|
268
|
-
// Specify the configuration items and data for the chart
|
269
|
-
var option = {
|
270
|
-
title: {
|
271
|
-
text: 'Active Threads'
|
272
|
-
},
|
273
|
-
legend: {},
|
274
|
-
tooltip: {
|
275
|
-
trigger: 'axis'
|
276
|
-
},
|
277
|
-
toolbox: {
|
278
|
-
show: true,
|
279
|
-
feature: {
|
280
|
-
mark : {show: true},
|
281
|
-
dataView : {show: true, readOnly: false},
|
282
|
-
magicType : {show: true, type: ['line', 'bar']},
|
283
|
-
restore : {show: true},
|
284
|
-
saveAsImage : {show: true}
|
285
|
-
}
|
286
|
-
},
|
287
|
-
calculable: true,
|
288
|
-
xAxis: { type: 'time' },
|
289
|
-
yAxis: { },
|
290
|
-
series: [
|
291
|
-
{
|
292
|
-
name: 'current',
|
293
|
-
type: 'line',
|
294
|
-
smooth: true,
|
295
|
-
color: 'red',
|
296
|
-
encode: {
|
297
|
-
x: 'timestamp',
|
298
|
-
y: 'current' // refer sensor 1 value
|
299
|
-
}
|
300
|
-
}
|
301
|
-
]
|
302
|
-
};
|
303
|
-
|
304
|
-
thread_chart.setOption(option);
|
305
|
-
}
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
function updatePacketData(chart, time, first, second) {
|
311
|
-
tx_data.push([time, first]);
|
312
|
-
rx_data.push([time, second]);
|
313
|
-
option = {
|
314
|
-
series: [
|
315
|
-
{
|
316
|
-
name: 'tx',
|
317
|
-
data: tx_data,
|
318
|
-
},
|
319
|
-
{
|
320
|
-
name: 'rx',
|
321
|
-
data: rx_data,
|
322
|
-
}
|
323
|
-
]
|
324
|
-
}
|
325
|
-
chart.setOption(option);
|
326
|
-
}
|
327
|
-
|
328
|
-
function updatePacketTypesData(time, typesdata) {
|
329
|
-
//The options series is created on the fly each time based on
|
330
|
-
//the packet types we have in the data
|
331
|
-
var series = []
|
332
|
-
|
333
|
-
for (const k in typesdata) {
|
334
|
-
tx = [time, typesdata[k]["tx"]]
|
335
|
-
rx = [time, typesdata[k]["rx"]]
|
336
|
-
|
337
|
-
if (packet_types_data.hasOwnProperty(k)) {
|
338
|
-
packet_types_data[k]["tx"].push(tx)
|
339
|
-
packet_types_data[k]["rx"].push(rx)
|
340
|
-
} else {
|
341
|
-
packet_types_data[k] = {'tx': [tx], 'rx': [rx]}
|
342
|
-
}
|
343
|
-
}
|
344
|
-
}
|
345
|
-
|
346
|
-
function updatePacketTypesChart() {
|
347
|
-
series = []
|
348
|
-
for (const k in packet_types_data) {
|
349
|
-
entry = {
|
350
|
-
name: k+"tx",
|
351
|
-
data: packet_types_data[k]["tx"],
|
352
|
-
type: 'line',
|
353
|
-
smooth: true,
|
354
|
-
encode: {
|
355
|
-
x: 'timestamp',
|
356
|
-
y: k+'tx' // refer sensor 1 value
|
357
|
-
}
|
358
|
-
}
|
359
|
-
series.push(entry)
|
360
|
-
entry = {
|
361
|
-
name: k+"rx",
|
362
|
-
data: packet_types_data[k]["rx"],
|
363
|
-
type: 'line',
|
364
|
-
smooth: true,
|
365
|
-
encode: {
|
366
|
-
x: 'timestamp',
|
367
|
-
y: k+'rx' // refer sensor 1 value
|
368
|
-
}
|
369
|
-
}
|
370
|
-
series.push(entry)
|
371
|
-
}
|
372
|
-
|
373
|
-
option = {
|
374
|
-
series: series
|
375
|
-
}
|
376
|
-
packet_types_chart.setOption(option);
|
377
|
-
}
|
378
|
-
|
379
|
-
function updateTypeChart(chart, key) {
|
380
|
-
//Generic function to update a packet type chart
|
381
|
-
if (! packet_types_data.hasOwnProperty(key)) {
|
382
|
-
return;
|
383
|
-
}
|
384
|
-
|
385
|
-
if (! packet_types_data[key].hasOwnProperty('tx')) {
|
386
|
-
return;
|
387
|
-
}
|
388
|
-
var option = {
|
389
|
-
series: [{
|
390
|
-
name: "tx",
|
391
|
-
data: packet_types_data[key]["tx"],
|
392
|
-
},
|
393
|
-
{
|
394
|
-
name: "rx",
|
395
|
-
data: packet_types_data[key]["rx"]
|
396
|
-
}]
|
397
|
-
}
|
398
|
-
|
399
|
-
chart.setOption(option);
|
400
|
-
}
|
401
|
-
|
402
|
-
function updateMemChart(time, current, peak) {
|
403
|
-
mem_current.push([time, current]);
|
404
|
-
mem_peak.push([time, peak]);
|
405
|
-
option = {
|
406
|
-
series: [
|
407
|
-
{
|
408
|
-
name: 'current',
|
409
|
-
data: mem_current,
|
410
|
-
},
|
411
|
-
{
|
412
|
-
name: 'peak',
|
413
|
-
data: mem_peak,
|
414
|
-
}
|
415
|
-
]
|
416
|
-
}
|
417
|
-
memory_chart.setOption(option);
|
418
|
-
}
|
419
|
-
|
420
|
-
function updateThreadChart(time, threads) {
|
421
|
-
keys = Object.keys(threads);
|
422
|
-
thread_count = keys.length;
|
423
|
-
thread_current.push([time, thread_count]);
|
424
|
-
option = {
|
425
|
-
series: [
|
426
|
-
{
|
427
|
-
name: 'current',
|
428
|
-
data: thread_current,
|
429
|
-
}
|
430
|
-
]
|
431
|
-
}
|
432
|
-
thread_chart.setOption(option);
|
433
|
-
}
|
434
|
-
|
435
|
-
function updateMessagesChart() {
|
436
|
-
updateTypeChart(message_chart, "MessagePacket")
|
437
|
-
}
|
438
|
-
|
439
|
-
function updateAcksChart() {
|
440
|
-
updateTypeChart(ack_chart, "AckPacket")
|
441
|
-
}
|
442
|
-
|
443
|
-
function update_stats( data ) {
|
444
|
-
console.log("update_stats() echarts.js called")
|
445
|
-
stats = data["stats"];
|
446
|
-
our_callsign = stats["APRSDStats"]["callsign"];
|
447
|
-
$("#version").text( stats["APRSDStats"]["version"] );
|
448
|
-
$("#aprs_connection").html( stats["aprs_connection"] );
|
449
|
-
$("#uptime").text( "uptime: " + stats["APRSDStats"]["uptime"] );
|
450
|
-
const html_pretty = Prism.highlight(JSON.stringify(data, null, '\t'), Prism.languages.json, 'json');
|
451
|
-
$("#jsonstats").html(html_pretty);
|
452
|
-
|
453
|
-
t = Date.parse(data["time"]);
|
454
|
-
ts = new Date(t);
|
455
|
-
updatePacketData(packets_chart, ts, stats["PacketList"]["tx"], stats["PacketList"]["rx"]);
|
456
|
-
updatePacketTypesData(ts, stats["PacketList"]["types"]);
|
457
|
-
updatePacketTypesChart();
|
458
|
-
updateMessagesChart();
|
459
|
-
updateAcksChart();
|
460
|
-
updateMemChart(ts, stats["APRSDStats"]["memory_current"], stats["APRSDStats"]["memory_peak"]);
|
461
|
-
updateThreadChart(ts, stats["APRSDThreadList"]);
|
462
|
-
//updateQuadData(message_chart, short_time, data["stats"]["messages"]["sent"], data["stats"]["messages"]["received"], data["stats"]["messages"]["ack_sent"], data["stats"]["messages"]["ack_recieved"]);
|
463
|
-
//updateDualData(email_chart, short_time, data["stats"]["email"]["sent"], data["stats"]["email"]["recieved"]);
|
464
|
-
//updateDualData(memory_chart, short_time, data["stats"]["aprsd"]["memory_peak"], data["stats"]["aprsd"]["memory_current"]);
|
465
|
-
}
|
@@ -1,26 +0,0 @@
|
|
1
|
-
function init_logs() {
|
2
|
-
const socket = io("/logs");
|
3
|
-
socket.on('connect', function () {
|
4
|
-
console.log("Connected to logs socketio");
|
5
|
-
});
|
6
|
-
|
7
|
-
socket.on('connected', function(msg) {
|
8
|
-
console.log("Connected to /logs");
|
9
|
-
console.log(msg);
|
10
|
-
});
|
11
|
-
|
12
|
-
socket.on('log_entry', function(data) {
|
13
|
-
update_logs(data);
|
14
|
-
});
|
15
|
-
|
16
|
-
};
|
17
|
-
|
18
|
-
|
19
|
-
function update_logs(data) {
|
20
|
-
var code_block = $('#logtext')
|
21
|
-
entry = data["message"]
|
22
|
-
const html_pretty = Prism.highlight(entry, Prism.languages.log, 'log');
|
23
|
-
code_block.append(html_pretty + "<br>");
|
24
|
-
var div = document.getElementById('logContainer');
|
25
|
-
div.scrollTop = div.scrollHeight;
|
26
|
-
}
|