Merge branch 'additional_filtering' into dev
This commit is contained in:
commit
af4951a494
|
|
@ -212,109 +212,126 @@
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div> <!-- dump1090_infoblock -->
|
</div> <!-- dump1090_infoblock -->
|
||||||
|
|
||||||
<form id="altitude_filter_form">
|
<div class="config_button_row">
|
||||||
<label><span class="infoBlockTitleText">Filter by Altitude:</span></label>
|
<button id="filter_button" class="config_button">Filters</button>
|
||||||
<input id="altitude_filter_min" name="minAltitude" type="text" class="altitudeFilterInput" maxlength="5">
|
<button id="column_select_button" class="config_button">Select Columns</button>
|
||||||
<label for="minAltitude" class="altitudeUnit"></label>
|
<button id="stats_page_button" class="config_button">Go to My ADS-B Statistics Page</button>
|
||||||
<span> to </span>
|
|
||||||
<input id="altitude_filter_max" name="maxAltitude" type="text" class="altitudeFilterInput" maxlength="5">
|
|
||||||
<label for="maxAltitude" class="altitudeUnit"></label>
|
|
||||||
<button type="submit">Filter</button>
|
|
||||||
<button id="altitude_filter_reset_button">Reset</button>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<button id="column_select">Select Columns</button>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="column_select_window" class="hidden">
|
<div id="filter_panel" class="panel">
|
||||||
<div id="column_select_close_box"></div>
|
<form id="altitude_filter_form">
|
||||||
<div id="column_select_header">Columns</div>
|
<label><span class="infoBlockTitleText">Filter by Altitude:</span></label>
|
||||||
<div class="columnOptionSelectAllContainer">
|
<input id="altitude_filter_min" name="minAltitude" type="text" class="altitudeFilterInput" maxlength="5">
|
||||||
<div class="columnSelectAllCheckbox" id="select_all_column_checkbox"></div>
|
<label for="minAltitude" class="altitudeUnit"></label>
|
||||||
<div class="columnOptionText">Select/Deselect All</div>
|
<span> to </span>
|
||||||
</div>
|
<input id="altitude_filter_max" name="maxAltitude" type="text" class="altitudeFilterInput" maxlength="5">
|
||||||
<div class="columnOptionContainer">
|
<label for="maxAltitude" class="altitudeUnit"></label>
|
||||||
<div class="columnSelectCheckbox" id="icao_col_checkbox"></div>
|
<button type="submit">Filter</button>
|
||||||
<div class="columnOptionText">Icao</div>
|
<button id="altitude_filter_reset_button">Reset</button>
|
||||||
</div>
|
</form>
|
||||||
<div class="columnOptionContainer">
|
<form id="aircraft_type_filter_form">
|
||||||
<div class="columnSelectCheckbox" id="flag_col_checkbox"></div>
|
<label><span class="infoBlockTitleText">Filter by Aircraft Type:</span></label>
|
||||||
<div class="columnOptionText">Flag</div>
|
<input id="aircraft_type_filter" name="aircraftTypeFilter" type="text" class="aircraftFilterInput" maxlength="5">
|
||||||
</div>
|
<button type="submit">Filter</button>
|
||||||
<div class="columnOptionContainer">
|
<button id="aircraft_type_filter_reset_button">Reset</button>
|
||||||
<div class="columnSelectCheckbox" id="ident_col_checkbox"></div>
|
</form>
|
||||||
<div class="columnOptionText">Ident</div>
|
|
||||||
</div>
|
<form id="aircraft_ident_filter_form">
|
||||||
<div class="columnOptionContainer">
|
<label><span class="infoBlockTitleText">Filter by Aircraft Ident:</span></label>
|
||||||
<div class="columnSelectCheckbox" id="reg_col_checkbox"></div>
|
<input id="aircraft_ident_filter" name="aircraftIdentFilter" type="text" class="aircraftFilterInput" maxlength="10">
|
||||||
<div class="columnOptionText">Registration</div>
|
<button type="submit">Filter</button>
|
||||||
</div>
|
<button id="aircraft_ident_filter_reset_button">Reset</button>
|
||||||
<div class="columnOptionContainer">
|
</form>
|
||||||
<div class="columnSelectCheckbox" id="ac_col_checkbox"></div>
|
</div>
|
||||||
<div class="columnOptionText">Aircraft Type</div>
|
|
||||||
</div>
|
<div id="column_select_panel" class="panel">
|
||||||
<div class="columnOptionContainer">
|
<div class="columnOptionSelectAllContainer">
|
||||||
<div class="columnSelectCheckbox" id="squawk_col_checkbox"></div>
|
<div class="columnSelectAllCheckbox" id="select_all_column_checkbox"></div>
|
||||||
<div class="columnOptionText">Squawk</div>
|
<div class="columnOptionText">Select/Deselect All</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="columnOptionContainer">
|
<div class="wrapper">
|
||||||
<div class="columnSelectCheckbox" id="alt_col_checkbox"></div>
|
<div class="columnOptionContainer">
|
||||||
<div class="columnOptionText">Altitude</div>
|
<div class="columnSelectCheckbox" id="icao_col_checkbox"></div>
|
||||||
</div>
|
<div class="columnOptionText">Icao</div>
|
||||||
<div class="columnOptionContainer">
|
</div>
|
||||||
<div class="columnSelectCheckbox" id="speed_col_checkbox"></div>
|
<div class="columnOptionContainer">
|
||||||
<div class="columnOptionText">Speed</div>
|
<div class="columnSelectCheckbox" id="flag_col_checkbox"></div>
|
||||||
</div>
|
<div class="columnOptionText">Flag</div>
|
||||||
<div class="columnOptionContainer">
|
</div>
|
||||||
<div class="columnSelectCheckbox" id="vrate_col_checkbox"></div>
|
<div class="columnOptionContainer">
|
||||||
<div class="columnOptionText">Vertical Rate</div>
|
<div class="columnSelectCheckbox" id="ident_col_checkbox"></div>
|
||||||
</div>
|
<div class="columnOptionText">Ident</div>
|
||||||
<div class="columnOptionContainer">
|
</div>
|
||||||
<div class="columnSelectCheckbox" id="distance_col_checkbox"></div>
|
<div class="columnOptionContainer">
|
||||||
<div class="columnOptionText">Distance</div>
|
<div class="columnSelectCheckbox" id="reg_col_checkbox"></div>
|
||||||
</div>
|
<div class="columnOptionText">Registration</div>
|
||||||
<div class="columnOptionContainer">
|
</div>
|
||||||
<div class="columnSelectCheckbox" id="heading_col_checkbox"></div>
|
<div class="columnOptionContainer">
|
||||||
<div class="columnOptionText">Heading</div>
|
<div class="columnSelectCheckbox" id="ac_col_checkbox"></div>
|
||||||
</div>
|
<div class="columnOptionText">Aircraft Type</div>
|
||||||
<div class="columnOptionContainer">
|
</div>
|
||||||
<div class="columnSelectCheckbox" id="messages_col_checkbox"></div>
|
<div class="columnOptionContainer">
|
||||||
<div class="columnOptionText">Messages</div>
|
<div class="columnSelectCheckbox" id="squawk_col_checkbox"></div>
|
||||||
</div>
|
<div class="columnOptionText">Squawk</div>
|
||||||
<div class="columnOptionContainer">
|
</div>
|
||||||
<div class="columnSelectCheckbox" id="msg_age_col_checkbox"></div>
|
<div class="columnOptionContainer">
|
||||||
<div class="columnOptionText">Message Age</div>
|
<div class="columnSelectCheckbox" id="alt_col_checkbox"></div>
|
||||||
</div>
|
<div class="columnOptionText">Altitude</div>
|
||||||
<div class="columnOptionContainer">
|
</div>
|
||||||
<div class="columnSelectCheckbox" id="rssi_col_checkbox"></div>
|
<div class="columnOptionContainer">
|
||||||
<div class="columnOptionText">RSSI</div>
|
<div class="columnSelectCheckbox" id="speed_col_checkbox"></div>
|
||||||
</div>
|
<div class="columnOptionText">Speed</div>
|
||||||
<div class="columnOptionContainer">
|
</div>
|
||||||
<div class="columnSelectCheckbox" id="lat_col_checkbox"></div>
|
<div class="columnOptionContainer">
|
||||||
<div class="columnOptionText">Latitude</div>
|
<div class="columnSelectCheckbox" id="vrate_col_checkbox"></div>
|
||||||
</div>
|
<div class="columnOptionText">Vertical Rate</div>
|
||||||
<div class="columnOptionContainer">
|
</div>
|
||||||
<div class="columnSelectCheckbox" id="lon_col_checkbox"></div>
|
<div class="columnOptionContainer">
|
||||||
<div class="columnOptionText">Longitude</div>
|
<div class="columnSelectCheckbox" id="distance_col_checkbox"></div>
|
||||||
</div>
|
<div class="columnOptionText">Distance</div>
|
||||||
<div class="columnOptionContainer">
|
</div>
|
||||||
<div class="columnSelectCheckbox" id="datasource_col_checkbox"></div>
|
<div class="columnOptionContainer">
|
||||||
<div class="columnOptionText">Data Source</div>
|
<div class="columnSelectCheckbox" id="heading_col_checkbox"></div>
|
||||||
</div>
|
<div class="columnOptionText">Heading</div>
|
||||||
<div class="columnOptionContainer">
|
</div>
|
||||||
<div class="columnSelectCheckbox" id="airframes_col_checkbox"></div>
|
<div class="columnOptionContainer">
|
||||||
<div class="columnOptionText">Airframes.org</div>
|
<div class="columnSelectCheckbox" id="messages_col_checkbox"></div>
|
||||||
</div>
|
<div class="columnOptionText">Messages</div>
|
||||||
<div class="columnOptionContainer">
|
</div>
|
||||||
<div class="columnSelectCheckbox" id="fa_modes_link_checkbox"></div>
|
<div class="columnOptionContainer">
|
||||||
<div class="columnOptionText">FlightAware</div>
|
<div class="columnSelectCheckbox" id="msg_age_col_checkbox"></div>
|
||||||
</div>
|
<div class="columnOptionText">Message Age</div>
|
||||||
<div class="columnOptionContainer">
|
</div>
|
||||||
<div class="columnSelectCheckbox" id="fa_photo_link_checkbox"></div>
|
<div class="columnOptionContainer">
|
||||||
<div class="columnOptionText">Photos</div>
|
<div class="columnSelectCheckbox" id="rssi_col_checkbox"></div>
|
||||||
</div>
|
<div class="columnOptionText">RSSI</div>
|
||||||
|
</div>
|
||||||
|
<div class="columnOptionContainer">
|
||||||
|
<div class="columnSelectCheckbox" id="lat_col_checkbox"></div>
|
||||||
|
<div class="columnOptionText">Latitude</div>
|
||||||
|
</div>
|
||||||
|
<div class="columnOptionContainer">
|
||||||
|
<div class="columnSelectCheckbox" id="lon_col_checkbox"></div>
|
||||||
|
<div class="columnOptionText">Longitude</div>
|
||||||
|
</div>
|
||||||
|
<div class="columnOptionContainer">
|
||||||
|
<div class="columnSelectCheckbox" id="datasource_col_checkbox"></div>
|
||||||
|
<div class="columnOptionText">Data Source</div>
|
||||||
|
</div>
|
||||||
|
<div class="columnOptionContainer">
|
||||||
|
<div class="columnSelectCheckbox" id="airframes_col_checkbox"></div>
|
||||||
|
<div class="columnOptionText">Airframes.org</div>
|
||||||
|
</div>
|
||||||
|
<div class="columnOptionContainer">
|
||||||
|
<div class="columnSelectCheckbox" id="fa_modes_link_checkbox"></div>
|
||||||
|
<div class="columnOptionText">FlightAware</div>
|
||||||
|
</div>
|
||||||
|
<div class="columnOptionContainer">
|
||||||
|
<div class="columnSelectCheckbox" id="fa_photo_link_checkbox"></div>
|
||||||
|
<div class="columnOptionText">Photos</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="planes_table_container">
|
<div id="planes_table_container">
|
||||||
|
|
@ -372,14 +389,14 @@
|
||||||
</div> <!-- planes_table -->
|
</div> <!-- planes_table -->
|
||||||
<div>
|
<div>
|
||||||
<div class="legend">
|
<div class="legend">
|
||||||
<div class="legendBox vPosition"></div>
|
<div class="sourceCheckbox" id="adsb_datasource_checkbox"></div>
|
||||||
<div class="legendTitle">ADS-B</div>
|
<div class="legendTitle vPosition">ADS-B</div>
|
||||||
<div class="legendBox mlat"></div>
|
<div class="sourceCheckbox" id="mlat_datasource_checkbox"></div>
|
||||||
<div class="legendTitle">MLAT</div>
|
<div class="legendTitle mlat">MLAT</div>
|
||||||
<div class="legendBox other"></div>
|
<div class="sourceCheckbox" id="other_datasource_checkbox"></div>
|
||||||
<div class="legendTitle">Other</div>
|
<div class="legendTitle other">Other</div>
|
||||||
<div class="legendBox tisb"></div>
|
<div class="sourceCheckbox" id="tisb_datasource_checkbox"></div>
|
||||||
<div class="legendTitle">TIS-B</div>
|
<div class="legendTitle tisb">TIS-B</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div> <!-- planes_table_container -->
|
</div> <!-- planes_table_container -->
|
||||||
|
|
|
||||||
|
|
@ -109,6 +109,31 @@ function PlaneObject(icao) {
|
||||||
}
|
}
|
||||||
|
|
||||||
PlaneObject.prototype.isFiltered = function() {
|
PlaneObject.prototype.isFiltered = function() {
|
||||||
|
// aircraft type filter
|
||||||
|
if (this.filter.aircraftTypeCode) {
|
||||||
|
if (this.icaotype === null || (typeof this.icaotype === 'string' && !this.icaotype.toUpperCase().trim().match(this.filter.aircraftTypeCode))) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// aircraft ident filter
|
||||||
|
if (this.filter.aircraftIdent) {
|
||||||
|
if (this.flight === null || (typeof this.flight === 'string' && !this.flight.toUpperCase().trim().match(this.filter.aircraftIdent))) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var dataSource = this.getDataSource();
|
||||||
|
if (dataSource === 'adsb_icao') {
|
||||||
|
if (!this.filter.ADSB) return true;
|
||||||
|
} else if (dataSource === 'mlat') {
|
||||||
|
if (!this.filter.MLAT) return true;
|
||||||
|
} else if (dataSource === 'tisb_trackfile' || dataSource === 'tisb_icao' || dataSource === 'tisb_other') {
|
||||||
|
if (!this.filter.TISB) return true;
|
||||||
|
} else {
|
||||||
|
if (!this.filter.Other) return true;
|
||||||
|
}
|
||||||
|
|
||||||
if (this.filter.minAltitude !== undefined && this.filter.maxAltitude !== undefined) {
|
if (this.filter.minAltitude !== undefined && this.filter.maxAltitude !== undefined) {
|
||||||
if (this.altitude === null || this.altitude === undefined) {
|
if (this.altitude === null || this.altitude === undefined) {
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@ var HighlightedPlane = null;
|
||||||
var FollowSelected = false;
|
var FollowSelected = false;
|
||||||
var infoBoxOriginalPosition = {};
|
var infoBoxOriginalPosition = {};
|
||||||
var customAltitudeColors = true;
|
var customAltitudeColors = true;
|
||||||
|
var myAdsbStatsSiteUrl = null;
|
||||||
|
|
||||||
var SpecialSquawks = {
|
var SpecialSquawks = {
|
||||||
'7500' : { cssClass: 'squawk7500', markerColor: 'rgb(255, 85, 85)', text: 'Aircraft Hijacking' },
|
'7500' : { cssClass: 'squawk7500', markerColor: 'rgb(255, 85, 85)', text: 'Aircraft Hijacking' },
|
||||||
|
|
@ -217,6 +218,8 @@ function initialize() {
|
||||||
|
|
||||||
flightFeederCheck();
|
flightFeederCheck();
|
||||||
|
|
||||||
|
setStatsLink();
|
||||||
|
|
||||||
PlaneRowTemplate = document.getElementById("plane_row_template");
|
PlaneRowTemplate = document.getElementById("plane_row_template");
|
||||||
|
|
||||||
refreshClock();
|
refreshClock();
|
||||||
|
|
@ -321,20 +324,21 @@ function initialize() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$("#altitude_filter_reset_button").click(onResetAltitudeFilter);
|
$("#altitude_filter_reset_button").click(onResetAltitudeFilter);
|
||||||
|
|
||||||
|
$("#aircraft_type_filter_form").submit(onFilterByAircraftType);
|
||||||
|
$("#aircraft_type_filter_reset_button").click(onResetAircraftTypeFilter);
|
||||||
|
|
||||||
|
|
||||||
|
$("#aircraft_ident_filter_form").submit(onFilterByAircraftIdent);
|
||||||
|
$("#aircraft_ident_filter_reset_button").click(onResetAircraftIdentFilter);
|
||||||
|
|
||||||
|
|
||||||
$('#settingsCog').on('click', function() {
|
$('#settingsCog').on('click', function() {
|
||||||
$('#settings_infoblock').toggle();
|
$('#settings_infoblock').toggle();
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#column_select').on('click', function() {
|
|
||||||
$('#column_select_window').toggle();
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#column_select_close_box').on('click', function() {
|
|
||||||
$('#column_select_window').hide();
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#settings_close').on('click', function() {
|
$('#settings_close').on('click', function() {
|
||||||
$('#settings_infoblock').hide();
|
$('#settings_infoblock').hide();
|
||||||
});
|
});
|
||||||
|
|
@ -369,6 +373,43 @@ function initialize() {
|
||||||
toggleAllColumns(true);
|
toggleAllColumns(true);
|
||||||
})
|
})
|
||||||
|
|
||||||
|
$('#adsb_datasource_checkbox').on('click', function() {
|
||||||
|
toggleADSBAircraft(true);
|
||||||
|
refreshDataSourceFilters();
|
||||||
|
})
|
||||||
|
|
||||||
|
$('#mlat_datasource_checkbox').on('click', function() {
|
||||||
|
toggleMLATAircraft(true);
|
||||||
|
refreshDataSourceFilters();
|
||||||
|
})
|
||||||
|
|
||||||
|
$('#other_datasource_checkbox').on('click', function() {
|
||||||
|
toggleOtherAircraft(true);
|
||||||
|
refreshDataSourceFilters();
|
||||||
|
})
|
||||||
|
|
||||||
|
$('#tisb_datasource_checkbox').on('click', function() {
|
||||||
|
toggleTISBAircraft(true);
|
||||||
|
refreshDataSourceFilters();
|
||||||
|
})
|
||||||
|
|
||||||
|
$('#column_select_button').on('click', function() {
|
||||||
|
this.classList.toggle("config_button_active");
|
||||||
|
$('#column_select_panel').toggle();
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
$('#filter_button').on('click', function() {
|
||||||
|
this.classList.toggle("config_button_active");
|
||||||
|
$('#filter_panel').toggle();
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#stats_page_button').on('click', function() {
|
||||||
|
if (myAdsbStatsSiteUrl) {
|
||||||
|
window.open(myAdsbStatsSiteUrl);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
// Event handlers for to column checkboxes
|
// Event handlers for to column checkboxes
|
||||||
checkbox_div_map.forEach(function (checkbox, div) {
|
checkbox_div_map.forEach(function (checkbox, div) {
|
||||||
$(div).on('click', function() {
|
$(div).on('click', function() {
|
||||||
|
|
@ -383,12 +424,18 @@ function initialize() {
|
||||||
mapResizeTimeout = setTimeout(updateMapSize, 10);
|
mapResizeTimeout = setTimeout(updateMapSize, 10);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Initialize settings from local storage
|
||||||
filterGroundVehicles(false);
|
filterGroundVehicles(false);
|
||||||
filterBlockedMLAT(false);
|
filterBlockedMLAT(false);
|
||||||
toggleAltitudeChart(false);
|
toggleAltitudeChart(false);
|
||||||
toggleAllPlanes(false);
|
toggleAllPlanes(false);
|
||||||
toggleGroupByDataType(false);
|
toggleGroupByDataType(false);
|
||||||
toggleAllColumns(false);
|
toggleAllColumns(false);
|
||||||
|
toggleADSBAircraft(false);
|
||||||
|
toggleMLATAircraft(false);
|
||||||
|
toggleOtherAircraft(false);
|
||||||
|
toggleTISBAircraft(false);
|
||||||
|
refreshDataSourceFilters();
|
||||||
|
|
||||||
// Get receiver metadata, reconfigure using it, then continue
|
// Get receiver metadata, reconfigure using it, then continue
|
||||||
// with initialization
|
// with initialization
|
||||||
|
|
@ -1118,24 +1165,23 @@ function refreshSelected() {
|
||||||
// emerg.className = 'hidden';
|
// emerg.className = 'hidden';
|
||||||
// }
|
// }
|
||||||
|
|
||||||
$("#selected_altitude").text(format_altitude_long(selected.altitude, selected.vert_rate, DisplayUnits));
|
$("#selected_altitude").text(format_altitude_long(selected.altitude, selected.vert_rate, DisplayUnits));
|
||||||
|
$('#selected_onground').text(format_onground(selected.altitude));
|
||||||
$('#selected_onground').text(format_onground(selected.altitude));
|
|
||||||
|
|
||||||
if (selected.squawk === null || selected.squawk === '0000') {
|
if (selected.squawk === null || selected.squawk === '0000') {
|
||||||
$('#selected_squawk').text('n/a');
|
$('#selected_squawk').text('n/a');
|
||||||
} else {
|
} else {
|
||||||
$('#selected_squawk').text(selected.squawk);
|
$('#selected_squawk').text(selected.squawk);
|
||||||
}
|
}
|
||||||
|
|
||||||
$('#selected_speed').text(format_speed_long(selected.gs, DisplayUnits));
|
$('#selected_speed').text(format_speed_long(selected.gs, DisplayUnits));
|
||||||
$('#selected_ias').text(format_speed_long(selected.ias, DisplayUnits));
|
$('#selected_ias').text(format_speed_long(selected.ias, DisplayUnits));
|
||||||
$('#selected_tas').text(format_speed_long(selected.tas, DisplayUnits));
|
$('#selected_tas').text(format_speed_long(selected.tas, DisplayUnits));
|
||||||
$('#selected_vertical_rate').text(format_vert_rate_long(selected.baro_rate, DisplayUnits));
|
$('#selected_vertical_rate').text(format_vert_rate_long(selected.baro_rate, DisplayUnits));
|
||||||
$('#selected_vertical_rate_geo').text(format_vert_rate_long(selected.geom_rate, DisplayUnits));
|
$('#selected_vertical_rate_geo').text(format_vert_rate_long(selected.geom_rate, DisplayUnits));
|
||||||
$('#selected_icao').text(selected.icao.toUpperCase());
|
$('#selected_icao').text(selected.icao.toUpperCase());
|
||||||
$('#airframes_post_icao').attr('value',selected.icao);
|
$('#airframes_post_icao').attr('value',selected.icao);
|
||||||
$('#selected_track').text(format_track_long(selected.track));
|
$('#selected_track').text(format_track_long(selected.track));
|
||||||
|
|
||||||
if (selected.seen <= 1) {
|
if (selected.seen <= 1) {
|
||||||
$('#selected_seen').text('now');
|
$('#selected_seen').text('now');
|
||||||
|
|
@ -1158,7 +1204,7 @@ function refreshSelected() {
|
||||||
$('#selected_flag').addClass('hidden');
|
$('#selected_flag').addClass('hidden');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (selected.position === null) {
|
if (selected.position === null) {
|
||||||
$('#selected_position').text('n/a');
|
$('#selected_position').text('n/a');
|
||||||
$('#selected_follow').addClass('hidden');
|
$('#selected_follow').addClass('hidden');
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -1171,23 +1217,24 @@ function refreshSelected() {
|
||||||
} else {
|
} else {
|
||||||
$('#selected_follow').css('font-weight', 'normal');
|
$('#selected_follow').css('font-weight', 'normal');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (selected.getDataSource() === "adsb_icao") {
|
|
||||||
$('#selected_source').text("ADS-B");
|
if (selected.getDataSource() === "adsb_icao") {
|
||||||
} else if (selected.getDataSource() === "tisb_trackfile" || selected.getDataSource() === "tisb_icao" || selected.getDataSource() === "tisb_other") {
|
$('#selected_source').text("ADS-B");
|
||||||
$('#selected_source').text("TIS-B");
|
} else if (selected.getDataSource() === "tisb_trackfile" || selected.getDataSource() === "tisb_icao" || selected.getDataSource() === "tisb_other") {
|
||||||
} else if (selected.getDataSource() === "mlat") {
|
$('#selected_source').text("TIS-B");
|
||||||
$('#selected_source').text("MLAT");
|
} else if (selected.getDataSource() === "mlat") {
|
||||||
} else {
|
$('#selected_source').text("MLAT");
|
||||||
$('#selected_source').text("Other");
|
} else {
|
||||||
}
|
$('#selected_source').text("Other");
|
||||||
$('#selected_category').text(selected.category ? selected.category : "n/a");
|
}
|
||||||
|
|
||||||
|
$('#selected_category').text(selected.category ? selected.category : "n/a");
|
||||||
$('#selected_sitedist').text(format_distance_long(selected.sitedist, DisplayUnits));
|
$('#selected_sitedist').text(format_distance_long(selected.sitedist, DisplayUnits));
|
||||||
$('#selected_rssi').text(selected.rssi.toFixed(1) + ' dBFS');
|
$('#selected_rssi').text(selected.rssi.toFixed(1) + ' dBFS');
|
||||||
$('#selected_message_count').text(selected.messages);
|
$('#selected_message_count').text(selected.messages);
|
||||||
$('#selected_photo_link').html(getFlightAwarePhotoLink(selected.registration));
|
$('#selected_photo_link').html(getFlightAwarePhotoLink(selected.registration));
|
||||||
|
$('#selected_altitude_geom').text(format_altitude_long(selected.alt_geom, selected.geom_rate, DisplayUnits));
|
||||||
$('#selected_altitude_geom').text(format_altitude_long(selected.alt_geom, selected.geom_rate, DisplayUnits));
|
|
||||||
$('#selected_mag_heading').text(format_track_long(selected.mag_heading));
|
$('#selected_mag_heading').text(format_track_long(selected.mag_heading));
|
||||||
$('#selected_true_heading').text(format_track_long(selected.true_heading));
|
$('#selected_true_heading').text(format_track_long(selected.true_heading));
|
||||||
$('#selected_ias').text(format_speed_long(selected.ias, DisplayUnits));
|
$('#selected_ias').text(format_speed_long(selected.ias, DisplayUnits));
|
||||||
|
|
@ -1977,6 +2024,31 @@ function onFilterByAltitude(e) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function onFilterByAircraftType(e) {
|
||||||
|
e.preventDefault();
|
||||||
|
updatePlaneFilter();
|
||||||
|
refreshTableInfo();
|
||||||
|
}
|
||||||
|
|
||||||
|
function onResetAircraftTypeFilter(e) {
|
||||||
|
$("#aircraft_type_filter").val("");
|
||||||
|
updatePlaneFilter();
|
||||||
|
refreshTableInfo();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function onFilterByAircraftIdent(e) {
|
||||||
|
e.preventDefault();
|
||||||
|
updatePlaneFilter();
|
||||||
|
refreshTableInfo();
|
||||||
|
}
|
||||||
|
|
||||||
|
function onResetAircraftIdentFilter(e) {
|
||||||
|
$("#aircraft_ident_filter").val("");
|
||||||
|
updatePlaneFilter();
|
||||||
|
refreshTableInfo();
|
||||||
|
}
|
||||||
|
|
||||||
function filterGroundVehicles(switchFilter) {
|
function filterGroundVehicles(switchFilter) {
|
||||||
if (typeof localStorage['groundVehicleFilter'] === 'undefined') {
|
if (typeof localStorage['groundVehicleFilter'] === 'undefined') {
|
||||||
localStorage.setItem('groundVehicleFilter' , 'not_filtered');
|
localStorage.setItem('groundVehicleFilter' , 'not_filtered');
|
||||||
|
|
@ -2065,6 +2137,26 @@ function updatePlaneFilter() {
|
||||||
PlaneFilter.minAltitude = minAltitude;
|
PlaneFilter.minAltitude = minAltitude;
|
||||||
PlaneFilter.maxAltitude = maxAltitude;
|
PlaneFilter.maxAltitude = maxAltitude;
|
||||||
PlaneFilter.altitudeUnits = DisplayUnits;
|
PlaneFilter.altitudeUnits = DisplayUnits;
|
||||||
|
|
||||||
|
var aircraftTypeCode = $("#aircraft_type_filter").val().trim().toUpperCase()
|
||||||
|
if (aircraftTypeCode === "") {
|
||||||
|
aircraftTypeCode = undefined
|
||||||
|
}
|
||||||
|
|
||||||
|
var aircraftIdent = $("#aircraft_ident_filter").val().trim().toUpperCase()
|
||||||
|
if (aircraftIdent === "") {
|
||||||
|
aircraftIdent = undefined
|
||||||
|
}
|
||||||
|
|
||||||
|
PlaneFilter.aircraftTypeCode = aircraftTypeCode;
|
||||||
|
PlaneFilter.aircraftIdent = aircraftIdent;
|
||||||
|
}
|
||||||
|
|
||||||
|
function refreshDataSourceFilters () {
|
||||||
|
PlaneFilter.ADSB = (localStorage.getItem('sourceADSBFilter') === 'selected') ? true : false;
|
||||||
|
PlaneFilter.MLAT = (localStorage.getItem('sourceMLATFilter') === 'selected') ? true : false;
|
||||||
|
PlaneFilter.Other = (localStorage.getItem('sourceOtherFilter') === 'selected') ? true : false;
|
||||||
|
PlaneFilter.TISB = (localStorage.getItem('sourceTISBFilter') === 'selected') ? true : false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getFlightAwareIdentLink(ident, linkText) {
|
function getFlightAwareIdentLink(ident, linkText) {
|
||||||
|
|
@ -2151,6 +2243,20 @@ function flightFeederCheck() {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function setStatsLink() {
|
||||||
|
$.ajax('/status.json', {
|
||||||
|
success: function(data) {
|
||||||
|
if (data.unclaimed_feeder_id) {
|
||||||
|
var claim_link = "https://flightaware.com/adsb/piaware/claim/" + data.unclaimed_feeder_id;
|
||||||
|
$('#stats_page_button').text("Claim this feeder on FlightAware")
|
||||||
|
myAdsbStatsSiteUrl = claim_link;
|
||||||
|
} else if (data.site_url) {
|
||||||
|
myAdsbStatsSiteUrl = data.site_url;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// updates the page to replace piaware with flightfeeder references
|
// updates the page to replace piaware with flightfeeder references
|
||||||
function updatePiAwareOrFlightFeeder() {
|
function updatePiAwareOrFlightFeeder() {
|
||||||
if (isFlightFeeder) {
|
if (isFlightFeeder) {
|
||||||
|
|
@ -2357,3 +2463,71 @@ function toggleAllColumns(switchToggle) {
|
||||||
|
|
||||||
localStorage.setItem('selectAllColumnsCheckbox', selectAllColumnsCheckbox);
|
localStorage.setItem('selectAllColumnsCheckbox', selectAllColumnsCheckbox);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function toggleADSBAircraft(switchFilter) {
|
||||||
|
if (typeof localStorage['sourceADSBFilter'] === 'undefined') {
|
||||||
|
localStorage.setItem('sourceADSBFilter','selected');
|
||||||
|
}
|
||||||
|
|
||||||
|
var sourceADSBFilter = localStorage.getItem('sourceADSBFilter');
|
||||||
|
if (switchFilter === true) {
|
||||||
|
sourceADSBFilter = (sourceADSBFilter === 'deselected') ? 'selected' : 'deselected';
|
||||||
|
}
|
||||||
|
if (sourceADSBFilter === 'deselected') {
|
||||||
|
$('#adsb_datasource_checkbox').removeClass('sourceCheckboxChecked');
|
||||||
|
} else {
|
||||||
|
$('#adsb_datasource_checkbox').addClass('sourceCheckboxChecked');
|
||||||
|
}
|
||||||
|
localStorage.setItem('sourceADSBFilter', sourceADSBFilter);
|
||||||
|
}
|
||||||
|
|
||||||
|
function toggleMLATAircraft(switchFilter) {
|
||||||
|
if (typeof localStorage['sourceMLATFilter'] === 'undefined') {
|
||||||
|
localStorage.setItem('sourceMLATFilter','selected');
|
||||||
|
}
|
||||||
|
|
||||||
|
var sourceMLATFilter = localStorage.getItem('sourceMLATFilter');
|
||||||
|
if (switchFilter === true) {
|
||||||
|
sourceMLATFilter = (sourceMLATFilter === 'deselected') ? 'selected' : 'deselected';
|
||||||
|
}
|
||||||
|
if (sourceMLATFilter === 'deselected') {
|
||||||
|
$('#mlat_datasource_checkbox').removeClass('sourceCheckboxChecked');
|
||||||
|
} else {
|
||||||
|
$('#mlat_datasource_checkbox').addClass('sourceCheckboxChecked');
|
||||||
|
}
|
||||||
|
localStorage.setItem('sourceMLATFilter', sourceMLATFilter);
|
||||||
|
}
|
||||||
|
|
||||||
|
function toggleOtherAircraft(switchFilter) {
|
||||||
|
if (typeof localStorage['sourceOtherFilter'] === 'undefined') {
|
||||||
|
localStorage.setItem('sourceOtherFilter','selected');
|
||||||
|
}
|
||||||
|
|
||||||
|
var sourceOtherFilter = localStorage.getItem('sourceOtherFilter');
|
||||||
|
if (switchFilter === true) {
|
||||||
|
sourceOtherFilter = (sourceOtherFilter === 'deselected') ? 'selected' : 'deselected';
|
||||||
|
}
|
||||||
|
if (sourceOtherFilter === 'deselected') {
|
||||||
|
$('#other_datasource_checkbox').removeClass('sourceCheckboxChecked');
|
||||||
|
} else {
|
||||||
|
$('#other_datasource_checkbox').addClass('sourceCheckboxChecked');
|
||||||
|
}
|
||||||
|
localStorage.setItem('sourceOtherFilter', sourceOtherFilter);
|
||||||
|
}
|
||||||
|
|
||||||
|
function toggleTISBAircraft(switchFilter) {
|
||||||
|
if (typeof localStorage['sourceTISBFilter'] === 'undefined') {
|
||||||
|
localStorage.setItem('sourceTISBFilter','selected');
|
||||||
|
}
|
||||||
|
|
||||||
|
var sourceTISBFilter = localStorage.getItem('sourceTISBFilter');
|
||||||
|
if (switchFilter === true) {
|
||||||
|
sourceTISBFilter = (sourceTISBFilter === 'deselected') ? 'selected' : 'deselected';
|
||||||
|
}
|
||||||
|
if (sourceTISBFilter === 'deselected') {
|
||||||
|
$('#tisb_datasource_checkbox').removeClass('sourceCheckboxChecked');
|
||||||
|
} else {
|
||||||
|
$('#tisb_datasource_checkbox').addClass('sourceCheckboxChecked');
|
||||||
|
}
|
||||||
|
localStorage.setItem('sourceTISBFilter', sourceTISBFilter);
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -55,47 +55,6 @@ html, body {
|
||||||
overflow-x: scroll;
|
overflow-x: scroll;
|
||||||
}
|
}
|
||||||
|
|
||||||
#column_select {
|
|
||||||
position: relative;
|
|
||||||
float: right;
|
|
||||||
background-color: #002F5D;
|
|
||||||
color: #FFFFFF;
|
|
||||||
}
|
|
||||||
|
|
||||||
#column_select_window {
|
|
||||||
position: absolute;
|
|
||||||
right: 1px;
|
|
||||||
top: 80px;
|
|
||||||
width: 150px;
|
|
||||||
min-height: 180px;
|
|
||||||
background: #ffffff;
|
|
||||||
box-shadow: 4px 4px 10px #444444;
|
|
||||||
padding: 20px;
|
|
||||||
z-index: 9999;
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
#column_select_header {
|
|
||||||
display: table;
|
|
||||||
background-color: #002F5D;
|
|
||||||
color: #ffffff;
|
|
||||||
font-size: smaller;
|
|
||||||
padding: 5px;
|
|
||||||
text-align: center;
|
|
||||||
width: 120px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#column_select_close_box {
|
|
||||||
position: absolute;
|
|
||||||
right: 15px;
|
|
||||||
top: 21px;
|
|
||||||
background-image: url('images/close-settings.png');
|
|
||||||
background-size: cover;
|
|
||||||
width: 20px;
|
|
||||||
height: 20px;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
.columnOptionContainer {
|
.columnOptionContainer {
|
||||||
position: relative;
|
position: relative;
|
||||||
display: table;
|
display: table;
|
||||||
|
|
@ -271,7 +230,9 @@ div#loader { z-index: 99; position: absolute; left: 0; top: 0; bottom: 0; right:
|
||||||
}
|
}
|
||||||
|
|
||||||
#units_container,
|
#units_container,
|
||||||
#altitude_filter_form {
|
#altitude_filter_form,
|
||||||
|
#aircraft_type_filter_form,
|
||||||
|
#aircraft_ident_filter_form {
|
||||||
font-size: small;
|
font-size: small;
|
||||||
margin: 10px 0 10px 0;
|
margin: 10px 0 10px 0;
|
||||||
}
|
}
|
||||||
|
|
@ -333,6 +294,10 @@ div#loader { z-index: 99; position: absolute; left: 0; top: 0; bottom: 0; right:
|
||||||
width: 50px;
|
width: 50px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.aircraftFilterInput {
|
||||||
|
width: 80px;
|
||||||
|
}
|
||||||
|
|
||||||
.rangeRingsInput {
|
.rangeRingsInput {
|
||||||
width: 30px;
|
width: 30px;
|
||||||
float: right;
|
float: right;
|
||||||
|
|
@ -683,8 +648,10 @@ select.error, textarea.error, input.error {
|
||||||
.legendTitle {
|
.legendTitle {
|
||||||
line-height: 19px;
|
line-height: 19px;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
padding-right: 20px;
|
padding-right: 5px;
|
||||||
padding-left: 5px;
|
padding-left: 5px;
|
||||||
|
border-radius: 5px;
|
||||||
|
margin-right: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#settings_infoblock {
|
#settings_infoblock {
|
||||||
|
|
@ -723,6 +690,22 @@ select.error, textarea.error, input.error {
|
||||||
background-image: url('images/box-checked.png') !important;
|
background-image: url('images/box-checked.png') !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.sourceCheckbox {
|
||||||
|
width: 13px;
|
||||||
|
height: 13px;
|
||||||
|
background-image: url('images/box-empty.png');
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-position: center;
|
||||||
|
background-size: contain;
|
||||||
|
cursor: pointer;
|
||||||
|
margin-top: 3px;
|
||||||
|
margin-right: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sourceCheckboxChecked {
|
||||||
|
background-image: url('images/box-checked.png') !important;
|
||||||
|
}
|
||||||
|
|
||||||
.settingsCloseBox {
|
.settingsCloseBox {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 8px;
|
right: 8px;
|
||||||
|
|
@ -861,3 +844,37 @@ select.error, textarea.error, input.error {
|
||||||
background-image: url("images/map-icon@3x.png");
|
background-image: url("images/map-icon@3x.png");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.config_button {
|
||||||
|
position: relative;
|
||||||
|
background-color: #FEBC11;
|
||||||
|
color: #002F5D;
|
||||||
|
cursor: pointer;
|
||||||
|
text-align: center;
|
||||||
|
width: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.config_button:hover, .config_button_active {
|
||||||
|
background-color: #abcad8;
|
||||||
|
}
|
||||||
|
|
||||||
|
.config_button_row {
|
||||||
|
position: relative;
|
||||||
|
margin-top: 5px;
|
||||||
|
padding: 3px 0 3px 0;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.panel {
|
||||||
|
position: relative;
|
||||||
|
padding: 3px 3px 10px 3px;
|
||||||
|
display: none;
|
||||||
|
margin-bottom: 5px;
|
||||||
|
border: solid;
|
||||||
|
border-color: #002F5D;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wrapper {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(3, 1fr);
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue