aprsd 3.4.4__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.
Files changed (115) hide show
  1. aprsd/cli_helper.py +12 -5
  2. aprsd/client/aprsis.py +31 -9
  3. aprsd/client/base.py +13 -2
  4. aprsd/client/drivers/aprsis.py +6 -3
  5. aprsd/client/drivers/fake.py +15 -20
  6. aprsd/client/factory.py +0 -2
  7. aprsd/client/fake.py +0 -2
  8. aprsd/client/kiss.py +17 -2
  9. aprsd/client/stats.py +1 -3
  10. aprsd/cmds/completion.py +7 -4
  11. aprsd/cmds/dev.py +38 -42
  12. aprsd/cmds/fetch_stats.py +140 -143
  13. aprsd/cmds/healthcheck.py +5 -3
  14. aprsd/cmds/list_plugins.py +140 -134
  15. aprsd/cmds/listen.py +13 -9
  16. aprsd/cmds/server.py +53 -27
  17. aprsd/conf/__init__.py +1 -2
  18. aprsd/conf/client.py +3 -4
  19. aprsd/conf/common.py +19 -93
  20. aprsd/conf/log.py +2 -4
  21. aprsd/conf/opts.py +5 -4
  22. aprsd/conf/plugin_common.py +11 -121
  23. aprsd/exception.py +2 -0
  24. aprsd/log/log.py +7 -46
  25. aprsd/main.py +10 -4
  26. aprsd/packets/__init__.py +14 -4
  27. aprsd/packets/core.py +57 -67
  28. aprsd/packets/log.py +8 -8
  29. aprsd/packets/packet_list.py +9 -6
  30. aprsd/plugin.py +22 -11
  31. aprsd/plugins/notify.py +1 -4
  32. aprsd/plugins/weather.py +10 -8
  33. aprsd/stats/collector.py +5 -2
  34. aprsd/threads/__init__.py +3 -2
  35. aprsd/threads/aprsd.py +12 -7
  36. aprsd/threads/{keep_alive.py → keepalive.py} +14 -45
  37. aprsd/threads/registry.py +3 -3
  38. aprsd/threads/rx.py +9 -6
  39. aprsd/threads/stats.py +2 -2
  40. aprsd/threads/tx.py +3 -4
  41. aprsd/utils/__init__.py +42 -10
  42. aprsd/utils/json.py +9 -4
  43. aprsd/utils/keepalive_collector.py +55 -0
  44. aprsd/utils/trace.py +0 -2
  45. aprsd-4.0.0.dist-info/AUTHORS +1 -0
  46. aprsd-4.0.0.dist-info/METADATA +293 -0
  47. aprsd-4.0.0.dist-info/RECORD +74 -0
  48. {aprsd-3.4.4.dist-info → aprsd-4.0.0.dist-info}/WHEEL +1 -1
  49. aprsd/cmds/admin.py +0 -57
  50. aprsd/cmds/webchat.py +0 -662
  51. aprsd/conf/plugin_email.py +0 -105
  52. aprsd/plugins/email.py +0 -715
  53. aprsd/plugins/location.py +0 -181
  54. aprsd/threads/log_monitor.py +0 -121
  55. aprsd/web/__init__.py +0 -0
  56. aprsd/web/admin/__init__.py +0 -0
  57. aprsd/web/admin/static/css/index.css +0 -84
  58. aprsd/web/admin/static/css/prism.css +0 -4
  59. aprsd/web/admin/static/css/tabs.css +0 -35
  60. aprsd/web/admin/static/images/Untitled.png +0 -0
  61. aprsd/web/admin/static/images/aprs-symbols-16-0.png +0 -0
  62. aprsd/web/admin/static/images/aprs-symbols-16-1.png +0 -0
  63. aprsd/web/admin/static/images/aprs-symbols-64-0.png +0 -0
  64. aprsd/web/admin/static/images/aprs-symbols-64-1.png +0 -0
  65. aprsd/web/admin/static/images/aprs-symbols-64-2.png +0 -0
  66. aprsd/web/admin/static/js/charts.js +0 -235
  67. aprsd/web/admin/static/js/echarts.js +0 -465
  68. aprsd/web/admin/static/js/logs.js +0 -26
  69. aprsd/web/admin/static/js/main.js +0 -231
  70. aprsd/web/admin/static/js/prism.js +0 -12
  71. aprsd/web/admin/static/js/send-message.js +0 -114
  72. aprsd/web/admin/static/js/tabs.js +0 -28
  73. aprsd/web/admin/templates/index.html +0 -196
  74. aprsd/web/chat/static/css/chat.css +0 -115
  75. aprsd/web/chat/static/css/index.css +0 -66
  76. aprsd/web/chat/static/css/style.css.map +0 -1
  77. aprsd/web/chat/static/css/tabs.css +0 -41
  78. aprsd/web/chat/static/css/upstream/bootstrap.min.css +0 -6
  79. aprsd/web/chat/static/css/upstream/font.woff2 +0 -0
  80. aprsd/web/chat/static/css/upstream/google-fonts.css +0 -23
  81. aprsd/web/chat/static/css/upstream/jquery-ui.css +0 -1311
  82. aprsd/web/chat/static/css/upstream/jquery.toast.css +0 -28
  83. aprsd/web/chat/static/css/upstream/themes/default/assets/fonts/LatoLatin-Bold.woff +0 -0
  84. aprsd/web/chat/static/css/upstream/themes/default/assets/fonts/LatoLatin-Bold.woff2 +0 -0
  85. aprsd/web/chat/static/css/upstream/themes/default/assets/fonts/LatoLatin-Regular.woff +0 -0
  86. aprsd/web/chat/static/css/upstream/themes/default/assets/fonts/LatoLatin-Regular.woff2 +0 -0
  87. aprsd/web/chat/static/css/upstream/themes/default/assets/fonts/icons.woff +0 -0
  88. aprsd/web/chat/static/css/upstream/themes/default/assets/fonts/icons.woff2 +0 -0
  89. aprsd/web/chat/static/css/upstream/themes/default/assets/fonts/outline-icons.woff +0 -0
  90. aprsd/web/chat/static/css/upstream/themes/default/assets/fonts/outline-icons.woff2 +0 -0
  91. aprsd/web/chat/static/images/Untitled.png +0 -0
  92. aprsd/web/chat/static/images/aprs-symbols-16-0.png +0 -0
  93. aprsd/web/chat/static/images/aprs-symbols-16-1.png +0 -0
  94. aprsd/web/chat/static/images/aprs-symbols-64-0.png +0 -0
  95. aprsd/web/chat/static/images/aprs-symbols-64-1.png +0 -0
  96. aprsd/web/chat/static/images/aprs-symbols-64-2.png +0 -0
  97. aprsd/web/chat/static/images/globe.svg +0 -3
  98. aprsd/web/chat/static/js/gps.js +0 -84
  99. aprsd/web/chat/static/js/main.js +0 -45
  100. aprsd/web/chat/static/js/send-message.js +0 -612
  101. aprsd/web/chat/static/js/tabs.js +0 -28
  102. aprsd/web/chat/static/js/upstream/bootstrap.bundle.min.js +0 -7
  103. aprsd/web/chat/static/js/upstream/jquery-3.7.1.min.js +0 -2
  104. aprsd/web/chat/static/js/upstream/jquery-ui.min.js +0 -13
  105. aprsd/web/chat/static/js/upstream/jquery.toast.js +0 -374
  106. aprsd/web/chat/static/js/upstream/semantic.min.js +0 -11
  107. aprsd/web/chat/static/js/upstream/socket.io.min.js +0 -7
  108. aprsd/web/chat/templates/index.html +0 -139
  109. aprsd/wsgi.py +0 -322
  110. aprsd-3.4.4.dist-info/AUTHORS +0 -13
  111. aprsd-3.4.4.dist-info/METADATA +0 -849
  112. aprsd-3.4.4.dist-info/RECORD +0 -134
  113. {aprsd-3.4.4.dist-info → aprsd-4.0.0.dist-info}/LICENSE +0 -0
  114. {aprsd-3.4.4.dist-info → aprsd-4.0.0.dist-info}/entry_points.txt +0 -0
  115. {aprsd-3.4.4.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
- }