Compare commits
3 Commits
b9bffb8a9f
...
34de9145e6
| Author | SHA1 | Date |
|---|---|---|
|
|
34de9145e6 | |
|
|
404db099fd | |
|
|
23377fcd8b |
|
|
@ -0,0 +1,3 @@
|
|||
Keeping old stuff around.
|
||||
If no one send a request to bring these stuff back, they will be removed.
|
||||
|
||||
|
|
@ -88,7 +88,7 @@ fi
|
|||
if [ "${BUILD_DIGIHAM:-}" == "y" ]; then
|
||||
BUILD_CODECSERVER=y
|
||||
fi
|
||||
if [ "${BUILD_PYCSDR:-}" == "y" ] || [ "${BUILD_OWRXCONNECTOR:-}" == "y" ] || [ "${BUILD_CSDR_ETI:-}" == "y" ]; then
|
||||
if [ "${BUILD_PYCSDR:-}" == "y" ] || [ "${BUILD_OWRXCONNECTOR:-}" == "y" ] || [ "${BUILD_CSDR_ETI:-}" == "y" || [ "${BUILD_CWSKIMMER:-}" == "y" ] ]; then
|
||||
BUILD_CSDR=y
|
||||
fi
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,25 @@
|
|||
// Plugin loader.
|
||||
// Receiver plugins initialization.
|
||||
// everything after '//' is a comment.
|
||||
|
||||
// First load the utils, needed for some plugins
|
||||
Plugins.load('utils').then(function () {
|
||||
// load local plugins
|
||||
Plugins.load('example');
|
||||
Plugins.load('example_theme');
|
||||
Plugins.load('sort_profiles');
|
||||
// !!! IMPORTANT !!! More information about the plugins can be found here:
|
||||
// https://0xaf.github.io/openwebrxplus-plugins/
|
||||
|
||||
// load remote plugins
|
||||
Plugins.load('https://0xaf.github.io/openwebrxplus-plugins/receiver/keyboard_shortcuts/keyboard_shortcuts.js');
|
||||
// uncomment the next line to enable plugin debugging in browser console.
|
||||
// Plugins._enable_debug = true;
|
||||
|
||||
// base URL for remote plugins
|
||||
const rp_url = 'https://0xaf.github.io/openwebrxplus-plugins/receiver';
|
||||
|
||||
// First load the utils, needed for most plugins
|
||||
Plugins.load(rp_url + '/utils/utils.js').then(async function () {
|
||||
// to load local plugins use a plugin folder name directly
|
||||
//Plugins.load('example');
|
||||
|
||||
// otherwise, you can load the remote plugins like this:
|
||||
|
||||
// Load the notification plugin, used by some plugins. await to ensure it is loaded before the rest.
|
||||
await Plugins.load(rp_url + '/notify/notify.js');
|
||||
|
||||
Plugins.load(rp_url + '/colorful_spectrum/colorful_spectrum.js');
|
||||
Plugins.load(rp_url + '/connect_notify/connect_notify.js');
|
||||
});
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ from owrx.service import Services
|
|||
from owrx.repeaters import Repeaters
|
||||
from owrx.eibi import EIBI
|
||||
from datetime import datetime
|
||||
|
||||
import json
|
||||
import re
|
||||
|
||||
|
|
@ -44,18 +45,22 @@ class ServiceController(AuthorizationMixin, WebpageController):
|
|||
@staticmethod
|
||||
def renderStatus():
|
||||
result = ""
|
||||
ts = Repeaters.lastDownloaded()
|
||||
if ts > 0:
|
||||
ts = datetime.fromtimestamp(ts).strftime("%H:%M:%S, %m/%d/%Y")
|
||||
result += "<div style='color:#00FF00;text-align:center;'>Repeaters database downloaded at {0}.</div>\n".format(ts)
|
||||
else:
|
||||
result += "<div style='color:#FF0000;text-align:center;'>Repeaters database not downloaded.</div>\n"
|
||||
ts = datetime.fromtimestamp(EIBI.lastStarted())
|
||||
td = str(datetime.now() - ts).split(".", 1)[0]
|
||||
ts = ts.astimezone().strftime("%H:%M:%S %Z, %d %b %Y")
|
||||
result += "<div style='color:#00FF00;text-align:center;'>Server started at {0}, {1} ago.</div>\n".format(ts, td)
|
||||
ts = EIBI.lastDownloaded()
|
||||
if ts > 0:
|
||||
ts = datetime.fromtimestamp(ts).strftime("%H:%M:%S, %m/%d/%Y")
|
||||
ts = datetime.fromtimestamp(ts).astimezone().strftime("%H:%M:%S %Z, %d %b %Y")
|
||||
result += "<div style='color:#00FF00;text-align:center;'>Shortwave schedule downloaded at {0}.</div>\n".format(ts)
|
||||
else:
|
||||
result += "<div style='color:#FF0000;text-align:center;'>Shortwave schedule not downloaded.</div>\n"
|
||||
ts = Repeaters.lastDownloaded()
|
||||
if ts > 0:
|
||||
ts = datetime.fromtimestamp(ts).astimezone().strftime("%H:%M:%S %Z, %d %b %Y")
|
||||
result += "<div style='color:#00FF00;text-align:center;'>Repeaters database downloaded at {0}.</div>\n".format(ts)
|
||||
else:
|
||||
result += "<div style='color:#FF0000;text-align:center;'>Repeaters database not downloaded.</div>\n"
|
||||
return result
|
||||
|
||||
@staticmethod
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ MAX_DISTANCE = 25000
|
|||
class EIBI(object):
|
||||
sharedInstance = None
|
||||
creationLock = threading.Lock()
|
||||
timeStarted = time.time()
|
||||
|
||||
@staticmethod
|
||||
def getSharedInstance():
|
||||
|
|
@ -37,6 +38,11 @@ class EIBI(object):
|
|||
coreConfig = CoreConfig()
|
||||
return "{data_directory}/eibi.json".format(data_directory=coreConfig.get_data_directory())
|
||||
|
||||
# Get last started timestamp
|
||||
@staticmethod
|
||||
def lastStarted():
|
||||
return EIBI.timeStarted
|
||||
|
||||
# Get last downloaded timestamp or 0 for none
|
||||
@staticmethod
|
||||
def lastDownloaded():
|
||||
|
|
|
|||
Loading…
Reference in New Issue