mirror of https://github.com/craigerl/aprsd.git
Compare commits
4 Commits
a839dbd3c5
...
2e9cf3ce88
Author | SHA1 | Date |
---|---|---|
Hemna | 2e9cf3ce88 | |
Hemna | 8728926bf4 | |
Hemna | 2c5bc6c1f7 | |
Hemna | 80705cb341 |
|
@ -19,7 +19,8 @@ from aprsd import cli_helper, client, packets, plugin, threads
|
|||
from aprsd.main import cli
|
||||
from aprsd.packets import log as packet_log
|
||||
from aprsd.stats import collector
|
||||
from aprsd.threads import rx
|
||||
from aprsd.threads import keep_alive, rx
|
||||
from aprsd.threads import stats as stats_thread
|
||||
|
||||
|
||||
# setup the global logger
|
||||
|
@ -190,7 +191,7 @@ def listen(
|
|||
LOG.debug(f"Filter by '{filter}'")
|
||||
aprs_client.set_filter(filter)
|
||||
|
||||
keepalive = threads.KeepAliveThread()
|
||||
keepalive = keep_alive.KeepAliveThread()
|
||||
# keepalive.start()
|
||||
|
||||
pm = None
|
||||
|
@ -203,8 +204,8 @@ def listen(
|
|||
"Not Loading any plugins use --load-plugins to load what's "
|
||||
"defined in the config file.",
|
||||
)
|
||||
stats_thread = threads.APRSDStatsStoreThread()
|
||||
stats_thread.start()
|
||||
stats = stats_thread.APRSDStatsStoreThread()
|
||||
stats.start()
|
||||
|
||||
LOG.debug("Create APRSDListenThread")
|
||||
listen_thread = APRSDListenThread(
|
||||
|
@ -220,4 +221,4 @@ def listen(
|
|||
keepalive.join()
|
||||
LOG.debug("listen_thread Join")
|
||||
listen_thread.join()
|
||||
stats_thread.join()
|
||||
stats.join()
|
||||
|
|
|
@ -16,6 +16,7 @@ LOG = logging.getLogger("APRSD")
|
|||
class StatsStore(objectstore.ObjectStoreMixin):
|
||||
"""Container to save the stats from the collector."""
|
||||
lock = threading.Lock()
|
||||
data = {}
|
||||
|
||||
|
||||
class APRSDStatsStoreThread(APRSDThread):
|
||||
|
|
|
@ -26,6 +26,9 @@ function ord(str){return str.charCodeAt(0);}
|
|||
function update_watchlist( data ) {
|
||||
// Update the watch list
|
||||
stats = data["stats"];
|
||||
if (stats.hasOwnProperty("WatchList") == false) {
|
||||
return
|
||||
}
|
||||
var watchdiv = $("#watchDiv");
|
||||
var html_str = '<table class="ui celled striped table"><thead><tr><th>HAM Callsign</th><th>Age since last seen by APRSD</th></tr></thead><tbody>'
|
||||
watchdiv.html('')
|
||||
|
@ -62,6 +65,9 @@ function update_watchlist_from_packet(callsign, val) {
|
|||
|
||||
function update_seenlist( data ) {
|
||||
stats = data["stats"];
|
||||
if (stats.hasOwnProperty("SeenList") == false) {
|
||||
return
|
||||
}
|
||||
var seendiv = $("#seenDiv");
|
||||
var html_str = '<table class="ui celled striped table">'
|
||||
html_str += '<thead><tr><th>HAM Callsign</th><th>Age since last seen by APRSD</th>'
|
||||
|
@ -82,6 +88,9 @@ function update_seenlist( data ) {
|
|||
|
||||
function update_plugins( data ) {
|
||||
stats = data["stats"];
|
||||
if (stats.hasOwnProperty("PluginManager") == false) {
|
||||
return
|
||||
}
|
||||
var plugindiv = $("#pluginDiv");
|
||||
var html_str = '<table class="ui celled striped table"><thead><tr>'
|
||||
html_str += '<th>Plugin Name</th><th>Plugin Enabled?</th>'
|
||||
|
|
|
@ -413,7 +413,6 @@ function append_message(callsign, msg, msg_html) {
|
|||
}
|
||||
|
||||
// Find the right div to place the html
|
||||
|
||||
new_callsign = add_callsign(callsign, msg);
|
||||
update_callsign_path(callsign, msg);
|
||||
append_message_html(callsign, msg_html, new_callsign);
|
||||
|
@ -502,7 +501,7 @@ function sent_msg(msg) {
|
|||
msg_html = create_message_html(d, t, msg['from_call'], msg['to_call'], msg['message_text'], ack_id, msg, false);
|
||||
append_message(msg['to_call'], msg, msg_html);
|
||||
save_data();
|
||||
scroll_main_content(msg['from_call']);
|
||||
scroll_main_content(msg['to_call']);
|
||||
}
|
||||
|
||||
function from_msg(msg) {
|
||||
|
|
Loading…
Reference in New Issue