No longer using separate aircraft URL.
This commit is contained in:
parent
eeedcaa4df
commit
59695652d1
|
|
@ -333,7 +333,6 @@ $.fn.pageMessagePanel = function() {
|
|||
HfdlMessagePanel = function(el) {
|
||||
MessagePanel.call(this, el);
|
||||
this.initClearTimer();
|
||||
this.aircraft_url = null;
|
||||
this.flight_url = null;
|
||||
}
|
||||
|
||||
|
|
@ -343,10 +342,6 @@ HfdlMessagePanel.prototype.supportsMessage = function(message) {
|
|||
return message['mode'] === 'HFDL';
|
||||
};
|
||||
|
||||
HfdlMessagePanel.prototype.setAircraftUrl = function(url) {
|
||||
this.aircraft_url = url;
|
||||
};
|
||||
|
||||
HfdlMessagePanel.prototype.setFlightUrl = function(url) {
|
||||
this.flight_url = url;
|
||||
};
|
||||
|
|
@ -355,17 +350,13 @@ HfdlMessagePanel.prototype.linkify = function(id) {
|
|||
var url = null;
|
||||
|
||||
// Do not linkify empty strings
|
||||
if (id.len<=0) return(id);
|
||||
if (id.len<=0) return id;
|
||||
|
||||
// 6 hexadecimal digits are an ICAO aircraft ID, not linkifying
|
||||
if (id.match(new RegExp('^[0-9A-F]{6}$'))) return id;
|
||||
|
||||
// 6 hexadecimal digits are an ICAO aircraft ID
|
||||
if (id.match(new RegExp('^[0-9A-F]{6}$')))
|
||||
url = this.aircraft_url;
|
||||
// Dot with a name is an aircraft ID
|
||||
else if (id.match(new RegExp('^\.[0-9A-Z]{1,3}-[0-9A-Z]{1,5}$')))
|
||||
url = this.aircraft_url;
|
||||
// Everything else is a flight ID
|
||||
else
|
||||
url = this.flight_url;
|
||||
url = this.flight_url;
|
||||
|
||||
// Must have valid lookup URL
|
||||
if ((url == null) || (url == ''))
|
||||
|
|
|
|||
|
|
@ -39,7 +39,6 @@ $(function(){
|
|||
var fillOpacity = 0.35;
|
||||
var callsign_url = null;
|
||||
var vessel_url = null;
|
||||
var aircraft_url = null;
|
||||
var flight_url = null;
|
||||
|
||||
var colorKeys = {};
|
||||
|
|
@ -307,9 +306,6 @@ $(function(){
|
|||
if ('vessel_url' in config) {
|
||||
vessel_url = config['vessel_url'];
|
||||
}
|
||||
if ('aircraft_url' in config) {
|
||||
aircraft_url = config['aircraft_url'];
|
||||
}
|
||||
if ('flight_url' in config) {
|
||||
flight_url = config['flight_url'];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1102,11 +1102,6 @@ function on_ws_recv(evt) {
|
|||
panel.setFlightUrl(config['flight_url']);
|
||||
}
|
||||
|
||||
if ('aircraft_url' in config) {
|
||||
var panel = $('#openwebrx-panel-hfdl-message').hfdlMessagePanel();
|
||||
panel.setAircraftUrl(config['aircraft_url']);
|
||||
}
|
||||
|
||||
break;
|
||||
case "secondary_config":
|
||||
var s = json['value'];
|
||||
|
|
|
|||
|
|
@ -168,7 +168,6 @@ defaultConfig = PropertyLayer(
|
|||
map_ignore_indirect_reports=False,
|
||||
callsign_url="https://www.qrzcq.com/call/{}",
|
||||
vessel_url="https://www.vesselfinder.com/vessels/details/{}",
|
||||
aircraft_url="https://www.planespotters.net/search?q={}",
|
||||
flight_url="https://flightaware.com/live/flight/{}",
|
||||
usage_policy_url="policy",
|
||||
session_timeout=0,
|
||||
|
|
|
|||
|
|
@ -142,7 +142,6 @@ class OpenWebRxReceiverClient(OpenWebRxClient, SdrSourceEventClient):
|
|||
"allow_center_freq_changes",
|
||||
"allow_audio_recording",
|
||||
"magic_key",
|
||||
"aircraft_url",
|
||||
"flight_url",
|
||||
]
|
||||
|
||||
|
|
@ -477,7 +476,6 @@ class MapConnection(OpenWebRxClient):
|
|||
"map_prefer_recent_reports",
|
||||
"callsign_url",
|
||||
"vessel_url",
|
||||
"aircraft_url",
|
||||
"flight_url",
|
||||
"receiver_name",
|
||||
)
|
||||
|
|
|
|||
|
|
@ -238,20 +238,12 @@ class GeneralSettingsController(SettingsFormController):
|
|||
+ "allowing to look up vessel information by its AIS MMSI number. "
|
||||
+ "Place curly brackers ({}) where MMSI is supposed to be.",
|
||||
),
|
||||
TextInput(
|
||||
"aircraft_url",
|
||||
"Aircraft database URL",
|
||||
infotext="Specifies aircraft lookup URL, such as PLAINSPOTTERS.NET, "
|
||||
+ "allowing to look up aircraft information by its registration number "
|
||||
+ "or ICAO MODE-S code. Place curly brackers ({}) where the aircraft "
|
||||
+ "identifier is supposed to be.",
|
||||
),
|
||||
TextInput(
|
||||
"flight_url",
|
||||
"Flight database URL",
|
||||
infotext="Specifies flight lookup URL, such as FLIGHTAWARE.COM, "
|
||||
+ "allowing to look up aircraft flights. Place curly brackers ({}) "
|
||||
+ "where flight identifier is supposed to be.",
|
||||
+ "allowing to look up flights and aircraft. Place curly brackers ({}) "
|
||||
+ "where flight or aircraft identifier is supposed to be.",
|
||||
),
|
||||
),
|
||||
]
|
||||
|
|
|
|||
|
|
@ -119,6 +119,11 @@ class TextParser(ThreadModule):
|
|||
# By default, do not parse, just return the string
|
||||
return msg
|
||||
|
||||
# ONLY IMPLEMENT THIS FUNCTION WHEN REPORTING LOCATION FROM SERVICE!
|
||||
def updateLocation(self, msg: str):
|
||||
# By default, do nothing
|
||||
pass
|
||||
|
||||
def run(self):
|
||||
logger.debug("%s starting..." % self.myName())
|
||||
# Run while there is input data
|
||||
|
|
@ -161,6 +166,8 @@ class TextParser(ThreadModule):
|
|||
if self.service:
|
||||
# Write message into open log file, including end-of-line
|
||||
self.writeFile(self.data[0:eol+1])
|
||||
# Optionally, parse and report location
|
||||
self.updateLocation(msg)
|
||||
# Empty result
|
||||
out = {}
|
||||
else:
|
||||
|
|
|
|||
Loading…
Reference in New Issue