mirror of
https://github.com/ha7ilm/openwebrx.git
synced 2026-04-05 22:45:26 +00:00
more work on extracting airplane infos
This commit is contained in:
parent
018104617d
commit
095bdf38bf
7 changed files with 186 additions and 39 deletions
|
|
@ -469,6 +469,9 @@ AircraftMessagePanel = function(el) {
|
|||
AircraftMessagePanel.prototype = Object.create(MessagePanel.prototype);
|
||||
|
||||
AircraftMessagePanel.prototype.renderAcars = function(acars) {
|
||||
if (acars['more']) {
|
||||
return '<h4>Partial ACARS message</h4>';
|
||||
}
|
||||
var details = '<h4>ACARS message</h4>';
|
||||
if ('flight' in acars) {
|
||||
details += '<div>Flight: ' + acars['flight'] + '</div>';
|
||||
|
|
@ -505,6 +508,7 @@ AircraftMessagePanel.prototype.renderAcars = function(acars) {
|
|||
}
|
||||
} else {
|
||||
// plain text
|
||||
details += '<div>Label: ' + acars['label'] + '</div>';
|
||||
details += '<div class="acars-message">' + acars['msg_text'] + '</div>';
|
||||
}
|
||||
return details;
|
||||
|
|
|
|||
|
|
@ -404,10 +404,11 @@ $(function(){
|
|||
};
|
||||
|
||||
var linkifyAircraft = function(source, identification) {
|
||||
var aircraftString = identification || source.icao || source.flight;
|
||||
var aircraftString = identification || source.humanReadable || source.flight || source.icao;
|
||||
var link = false;
|
||||
switch (aircraft_tracking_service) {
|
||||
case 'flightaware':
|
||||
if (!source.icao) break;
|
||||
link = 'https://flightaware.com/live/modes/' + source.icao;
|
||||
if (identification) link += "/ident/" + identification
|
||||
link += '/redirect';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue